Stress test
Set the market yourself: drag any day's price move and watch the hook fee, the cover bought on 1inch Aqua and the payout to LPs respond.
Daily UNI/ETH moves
Price: oracle vs pool
Cover price and hook fee
Five conditions side by side
| Condition | Week-2 fee | Cover bought | LONG paid | Paid to LPs | LPs in week 2: without → with |
|---|---|---|---|---|---|
| Crash, then crash | 0.30% | 0.131 LONG | 100.0% | 0.131 WETH | −0.449 → −0.318 WETH |
| Crash, then calm | 0.30% | 1.769 LONG | 0.1% | 0.002 WETH | +0.143 → +0.145 WETH |
| Calm, then crash | 0.0008% | 0.000 LONG | 100.0% | 0.000 WETH | −0.498 → −0.498 WETH |
| One-day spike | 0.30% | 0.637 LONG | 61.3% | 0.390 WETH | −0.157 → +0.233 WETH |
| Calm | 0.0008% | 0.005 LONG | 0.1% | 0.000 WETH | +0.143 → +0.143 WETH |
The fee only rises after a week that hurt LPs, and cover only pays when the week it covers is volatile. So Tremor helps most when a bad week follows a bad week, costs a little when calm follows a crash, and barely helps against a first shock after a quiet week. Rows are recorded contract runs; click one to load it above.
What each part does here
- Price moves. A Chainlink-style feed publishes a new UNI/ETH price each day; an arbitrageur trades the Uniswap pool to it, and LPs lose on that trade.
- Loss measured. Each day's swaps are valued with the CRE workflow's formula and delivered to the receiver. When week 1 closes, the receiver sets the hook fee.
- Cover priced and bought. LONG is priced by our SwapVM instruction on 1inch Aqua; its price climbs as volatility arrives. In week 2 the hook spends the fees on LONG.
- Payout. When week 2 ends, the market settles from every feed round in the week; the hook redeems its LONG and donates the WETH to in-range LPs.
The five presets were run on a mainnet fork against the deployed Uniswap v4 PoolManager and 1inch Aqua and Tremor's live-build contracts, with a controllable test price feed and daily measurements computed with the CRE workflow's formula (not a CRE run). Moving a slider re-runs the same two weeks in your browser with the contracts' formulas (web/src/lib/sim.ts), which reproduce every recorded step within 0.01%. Sources: contracts/test/scenario/PriceShock.t.sol, web/src/lib/sim.ts.