
Persistent state is the primitive every serious plan needs and almost no automation gets: a place to put a number down at the end of one run and pick it back up at the start of the next, onchain, without a server, a cron job, or a spreadsheet holding the truth off to the side.
The database gives a plug durable memory with real scope rules. A value can belong to the wallet, to a single plug, or to the exact version of a plug, so two automations never trample each other's numbers and a rewritten strategy does not inherit stale state from the one it replaced. Plain values, keyed maps, and nested maps cover everything from a single high-water mark to a full ledger of what happened per token per day.
That is the difference between a plug that reacts and a plug that remembers. A cost basis written when the position opened and compared against on every run since. A counter that caps how many times a rule may fire. The last price a strategy acted on, kept so it only acts again when the move is real. State written on one run steers every run after it, and no person has to carry the number in their head in between.
Plans without memory repeat themselves; plans with memory compound. The strategies worth automating are the ones that know what they did last time, and this is where they keep that knowledge.






Posts · 6