Ephemeral Rollup
The guard PDA delegates into the ER so Drift checks run inside a slot, then commits back to L1.
Wick reads a leveraged perps position on every slot and acts at the threshold — autonomous on Drift, co-signed on Jupiter. You hold the keys. Wick holds the trigger.
The guard PDA delegates into the ER so Drift checks run inside a slot, then commits back to L1.
The guard holds a delegation and signs the reduce-only CPI itself. Nonce commits on land.
No delegation, so the guard builds the instruction and waits. You sign it on L1.
Every tick prices against a PriceUpdateV2 inside the staleness and confidence gate.
Per-action and daily caps are checked in USD notional, and the daily total accumulates.
A bounded binary search finds the least you have to close to get back above the buffer.
Every state-mutating instruction checks the pause flag — and rejects if it is missing.
A delegated guard reads the position's health each tick. When it dips, the guard responds on the authority regime the venue allows — autonomously where it holds a delegation, build-only where it does not.
Health is recomputed on every tick from the verified Pyth price, your collateral and position size — in fixed point, cross-multiplied, never divided. The trigger buffer sits above the liquidation threshold, so there is room to move.
At the threshold the guard acts. A bounded solver finds the smallest partial close that restores the buffer, caps are enforced in USD, and the order is reduce-only by construction — the guard cannot open exposure.
The nonce only commits once the venue action actually lands, so a failed dispatch never looks like a success. Nothing is silently skipped: if no action fits inside your caps, the guard escalates instead of no-oping.
Dispatch is measured from the tick entering the guard to the venue CPI landing. Every number below is read out of a recorded benchmark run — not a live feed, and not a projection.
litesvm in-process: OnTick -> velocity place_perp_order CPI lands
Liquidations happen inside a slot. A guard that can only act once per block is reading a price that has already moved. Wick delegates its guard PDA into a MagicBlock Ephemeral Rollup so it can check, decide and dispatch many times inside the window the move is actually happening in.
Powered by MagicBlockEPHEMERAL ROLLUPSA liquidation cascade moves inside a slot. If the guard only wakes when the next block lands, the price it read is already history and the position is already gone.
1 check per 400ms slot
The guard PDA delegates into a MagicBlock Ephemeral Rollup. Checks run on delegated state at ER speed, and the state commits back to L1 — so the guard reacts inside the window the cascade actually happens in.
≈2,139 checks fit in the same slot
The critical path inside a single OnPriceTick instruction. The order is load-bearing: price before health, health before nonce, caps before dispatch. Any stage can reject, and a rejected tick mutates nothing.
WATCH → DETECT → ACT → CONFIRM