Uniswap LPs are short volatility. We valued every swap in the UNI/WETH 0.3% pool on Ethereum at Binance one-minute prices for two years: arbitrage loss came to 93% of LP fees, LPs lost money in 14 of 104 weeks, and the worst week cost them $137,516. The losses arrive exactly when the market swings, which is what insurance is for.
Tremor is a Uniswap v4 hook that turns that loss into cover:
- Measure. A Chainlink CRE workflow reads the pool's swaps, values each one against exchange prices, and reports the week's arbitrage loss on-chain.
- Charge. At the week's close the hook fee is set to half the measured loss rate, capped at 0.30%. Without a fresh report it expires to zero.
- Cover. The hook converts its fees to WETH and buys LONG claims on the next week's realized volatility from one 1inch Aqua strategy, through our own SwapVM instruction (0x22). Every LONG/SHORT pair is fully backed by WETH.
- Pay. Chainlink Data Feeds settle the week from every price round in it, and the hook donates the payout back to in-range LPs. A liquidity penalty stops just-in-time LPs from taking it.
Anyone can trade the other side in the app: buy LONG if you expect a swing, SHORT if you expect calm. Writers fund the strategy through a vault and share its premium.
What you can check:
- Live app on Sepolia: trade LONG/SHORT on an open window, and run the stress-test simulator, where you drag each day's price move and watch the fee, the cover and the LP payout respond. Its five presets are real contract runs on a mainnet fork, and the simulator reproduces every step within 0.01%.
- Every step ran on Sepolia against the real v4 PoolManager and Aqua: CRE reports set the fee, swaps paid it, the hook bought cover, Chainlink rounds settled the window, and the payout was donated to LPs (transactions in the README).
- A mainnet-fork replay of the October 2025 crash week: the fee rose to its cap, the cover paid in full, and 1.235 WETH went back to LPs.
- 107 tests, including two rounds of red-team attacks against the real Aqua and v4 contracts.
Honest benchmark: simply raising the LP fee earns about 8% more on average. Tremor cuts the worst week by 43%. It's insurance for the tail, not extra yield.
Contracts (Solidity, Foundry). Four pieces:
- TremorHook: OpenZeppelin BaseHookFee with afterSwap + afterSwapReturnDelta. The fee is taken on the unspecified currency as ERC-6909 claims; handleHookFees redeems them inside unlock, swaps UNI to WETH in the same pool with a Chainlink price limit, and buys cover. Payouts go back with PoolManager.donate, dripped over blocks. We also inherit OpenZeppelin's LiquidityPenaltyHook (address flags 0x547, mined with CREATE2) so liquidity added and removed within 100 blocks forfeits its share of the payout.
- VarianceMarket: weekly windows of fully collateralized LONG/SHORT claims. checkpoint walks every Chainlink round by round ID and is phase-aware; finalize settles realized variance from all of them and refuses to settle on partial data. Quotes pause until the newest round is ingested, and while the pool price (read at the start of the block) is more than 2% from the last round.
- 1inch: a new SwapVM instruction, 0x22 CappedPayoffCurve, appended to SwapVM v1.0.2's instruction set in our AquaSwapVMRouter (21,935 bytes, under EIP-170). It prices claims from projected volatility, a spread that narrows through the week, price impact, and an inventory skew read from the strategy's Aqua rawBalances. TremorVault mints complete sets and ships [WETH, LONG, SHORT] as one strategy to the deployed Aqua registry; writers deposit WETH for pro-rata shares.
- TremorReceiver (Chainlink ReceiverTemplate): accepts only contiguous CRE reports and sets the hook fee at each weekly close.
Chainlink CRE workflow (TypeScript SDK): each run makes 15 EVM reads and 2 HTTP calls, within the service limits. It reads the pool's Swap logs in 100-block chunks, fetches Binance one-minute prices in node mode with consensus, values every swap in integer maths so every node gets the same number, and fails rather than reporting if price data has gaps. Live mode measures only blocks 64 confirmations deep. We ran it with cre workflow simulate, both live on Sepolia and as a 42-run backfill of the October 2025 crash on a mainnet fork.
Testing: 65 unit tests, including 10,508 pricing vectors cross-checked against a Python reference model; 8 mainnet-fork tests with asserted historical results; 29 red-team tests (25 attacks on a mainnet fork against the real Aqua and v4 contracts, 4 pricing fuzz tests); 5 price-shock scenarios. The red team found a sandwich of the hook's cover buy (+5.66 WETH in our proof of concept) and front-running a pending Chainlink round; both are fixed and the attacks now lose money.
Data: Python scripts measured LP arbitrage loss swap by swap for 104 weeks against Binance one-minute candles; that dataset drives the landing page charts and the backtest.
App: Next.js, wagmi and viem on Sepolia, deployed on Vercel. The stress-test page runs a TypeScript port of the pool, arbitrage, loss formula, fee rule and the 0x22 pricing curve, calibrated against recorded fork runs to within 0.01% at every step, so you can drag each day's price move and watch the protocol respond.
Hacky bits: Sepolia has no UNI/ETH feed, so the Sepolia market settles on ETH/USD with a test UNI token. CRE reports reach Sepolia through the simulation forwarder, so the receiver accepts them only from our signer. AI tools were used throughout; AI_USAGE.md lists where.