The proof
eth_simulateV1 request against the chain's real PoolManager at the latest block: nothing is sent, nothing is paid, and the result is the hook's behaviour on the chain state of that block.Compile
The source is compiled on the site with solc 0.8.26, the optimizer at 200 runs and the cancun EVM, with the IR pipeline only when the legacy one runs out of stack. These are the settings a deploy uses, so the code that was proven is the code that ships. A contract over 24,576 bytes stops here.
Own hook: twin pools
- The hook is deployed inside the simulation at an address mined for its callbacks.
- A pool is opened with it, next to a twin pool with the same tokens, no hook and no fee, and both get the same liquidity.
- At each moment the recipe cares about, the same small swap goes through both pools, from two wallets: a plain one, and one that holds an ERC-8004 agent identity. A wallet tries several swaps in a row, so a cooldown shows.
- Paid is what the swapper received less than in the twin, as a share of the trade: the fee, the tax and the rebate together.
- At the end, the liquidity is taken out, which shows a lock. The gas of the hook is the hooked swap less the twin swap.
The moments
Time moves inside the simulation from block to block, so every rule that depends on time is seen at the moment it changes:
- The open, always.
- Half of the anti-snipe window and its end.
- The end of the allowlist window.
- One second after the cooldown, when the cooldown is an hour or less.
- 30 seconds after the open, for the volatility fee and the price guard.
- A weekday with the stock market open, and a Saturday, for the off-hours fee.
- One hour after the open, when the recipe gives fewer than three moments.
Stacked hook: cold calls
A stacked hook is called exactly the way the hook stack calls it, on the live TSLA / USDG pool of v4 Marketplace: onStack first, then beforeSwap at each moment, from both wallets, with a second call from the same wallet when the recipe has a cooldown. Each call is its own transaction, so storage is as cold as on a real swap, and the gas of every answer is measured.
The hook is listed with the heaviest answer plus a quarter, rounded up to the next 1,000 gas, within the hook stack's 10,000 to 80,000. An answer over 80,000 gas fails the proof.
Real runs
The three example recipes, run on the live chain:
Fair Launch
Anti-snipe fee from 25% to zero over 10 minutes, 30-second cooldown, 30-day liquidity lock, base fee 0.30%.
| Moment | Swap | Paid |
|---|---|---|
| At the open Small swap | Small swap | 24.98% |
| 31 seconds after the open Small swap | Small swap | 23.69% |
| 5 minutes after the open Small swap | Small swap | 12.49% |
| 10 minutes after the open Small swap | Small swap | 0.30% |
| Within the 30-second cooldown 2nd, 3rd and 4th swap of the same wallet | 2nd, 3rd and 4th swap of the same wallet | Refused: cooling down |
| At the end Liquidity exit | Liquidity exit | Refused: locked until 2026-11-26 |
Stock Hours
Volatility fee from 0.05% when calm up to 2%, off-hours fee of 1%, price guard of 5% in 15 minutes, as a stacked hook.
| Moment | Swap | Proposal |
|---|---|---|
| A weekday, market open Fee proposal on TSLA / USDG | Fee proposal on TSLA / USDG | 0.05% |
| Saturday, market closed Fee proposal on TSLA / USDG | Fee proposal on TSLA / USDG | 1.00% |
Agent Lane
AI agent rebate of 50% and a swap tax of 0.20% sent to 0x…dEaD, base fee 0.30%.
| Moment | Swap | Paid in total |
|---|---|---|
| Any time A plain wallet | A plain wallet | 0.50% |
| Any time A wallet holding an ERC-8004 agent identity | A wallet holding an ERC-8004 agent identity | 0.35% |
