Execution Model
The engine runs on a pull-based execution model. There are no timers inside the contract, no privileged operators, and no scheduled jobs on-chain. The Treasury exposes permissionless entrypoints, anyone may call them, and the contract itself decides, from live state alone, whether an action should occur. A call made when conditions do not hold simply does nothing (or reverts, where a revert is the clearer signal). Calling more often never makes the engine do more than its rules allow.
Three entrypoints drive the engine, one per behaviour:
accumulate()— the buy side. Executes a bounded buy when the price is at or below the accumulation anchor and all gates pass.liquidate()— the steady-state sell side. Samples the pool's base-asset reserve on a fixed cadence and sells a bounded fraction of fresh buying pressure into demonstrated strength.launchPhaseLiquidate()— the launch-phase sell side. Active only during the short, finite launch window, then permanently done.
Each call is a self-contained decision: read the pool, compute the anchors, check every gate, and act only if everything passes. The engine reacts to exactly three kinds of input (elapsed time, canonical pool reserve state, and its own accounting) and nothing else. If the market is inactive, the engine is inactive. If execution is delayed, behaviour does not pile up and release all at once; missed opportunities are simply missed.
Buy and sell execution can never overlap in the same transaction or block.
The keeper
Permissionless does not mean self-triggering: someone has to make the calls. In practice, an off-chain keeper (an automation service) drives liquidate() on the sampling cadence (for $PURE, every 120 seconds) and calls accumulate() opportunistically.
Maintaining that keeper is a team responsibility, and it is an honest dependency worth understanding precisely. The system stays correct without the keeper: no state can corrupt, no wrong trade can execute, and anyone else can call the entrypoints at any time. What a keeper outage costs is opportunity: buying pressure that arrives and dissipates during a gap is not retroactively harvested. The engine only ever acts on conditions as they stand at the moment of the call.