
Volatus
Uniswap v4 hook that prices volatility, so protocols can insure LPs instead of paying emissions.
Demo
About
Volatus turns liquidity mining into a market. Every protocol running a liquidity mining program is doing the same thing: paying LPs to bear a risk they would otherwise refuse. That risk is impermanent loss. That payment is an insurance premium — it is just paid in permanent token dilution, priced by governance guesswork, and it keeps compounding whether or not the risk ever materialises. The moment emissions slow, the liquidity leaves. The reason nobody buys it as actual insurance is that there is no price for volatility onchain. Options desks quote implied volatility for BTC and ETH. For the thousands of tokens that actually live on Uniswap, that number does not exist — so there is nothing to price a hedge against. Volatus builds that price in three layers, two of which live entirely on Uniswap. 1. Measurement. A Uniswap v4 hook accumulates realized variance for a pool directly from that pool's own price path, sampled once per block in afterSwap. No oracle, no external feed. The measurement happens at the exact venue where the risk is borne, by the contract that already sees every price change. 2. The price. Each epoch mints two capped, fully collateralized ERC-20 legs against USDC: STORM pays out as realized variance rises, CALM is the exact complement. One USDC mints one of each, and a pair always redeems for at most one USDC — so the system is solvent by construction, with no insurance fund, no liquidation engine and no bad debt. STORM then trades in its own Uniswap v4 pool. Its market price is implied volatility, discovered by two parties with opposing views rather than computed by a model. 3. Coverage. A protocol treasury either buys STORM for its LPs at that market price — streamed per second in USDC over Circle Nanopayments, so it is a budget line rather than a contract — or takes the other side itself: post USDC, mint pairs, hand STORM to LPs in place of emissions, and keep CALM. If the pool stays quiet the collateral comes back. That second path needs no counterparty at all, which is how the market bootstraps and why a token owner can use Volatus on day one. The output is a public good. Every dynamic-fee hook on Uniswap currently estimates volatility from a trailing window because nothing better exists. With Volatus they read market-implied volatility — forward-looking rather than backward-looking — in a single view call. Lending markets sizing collateral haircuts and risk systems setting position limits have the same gap. Live on Unichain Sepolia and Arc Testnet. The hook, the vault, the variance legs, the volatility pool and the oracle are all deployed and verified. A real onchain trade moved STORM from 0.300 to 0.486 and the implied volatility other protocols read moved with it — a discovered price, not a configured parameter. A full epoch has run to settlement with the collateral reconciling exactly against the unredeemed legs.
How it's made
Contracts are Solidity with Foundry. Frontend is Next.js and TypeScript with viem and wagmi. Agents are TypeScript on Circle's Agent Stack. The hook. VolatusHook extends BaseHook from OpenZeppelin's uniswap-hooks v1.2.1 — BaseHook moved out of v4-periphery upstream, which cost us an day to work out. It declares AFTER_INITIALIZE and AFTER_SWAP, and the deployment address is CREATE2-mined so its low bits encode exactly those permissions: 0b01000001000000, with every return-delta bit clear. The measurement is the part we are happiest with. A Uniswap tick is already a log price — tick = log base 1.0001 of price. So the log return between two observations is just a tick difference scaled by ln(1.0001), and realized variance is a sum of squared tick deltas. That means no logarithms in Solidity, no fixed-point log library, and no oracle. The entire accumulator is integer arithmetic on int24 values. The hot path samples at most one observation per block, guarded by a stored lastBlock cursor. That does two jobs at once: it keeps gas low, and it eliminates intra-block wash trading outright, because round trips inside a single block contribute nothing to the index. Measured across three otherwise-identical pools: no hook 119,875 gas; a do-nothing hook 124,810 (v4's own dispatch); first swap of a block through VolatusHook 140,892; any later swap in the same block 128,146. The expensive part — converting the accumulator into a settlement price — is a view function that runs at read time and costs traders nothing. The most notable thing we hit. We designed the variance legs as ERC-6909, the same claims standard PoolManager itself uses. It does not work. STORM has to be a Uniswap v4 pool currency, and type Currency is address identifies a currency by address alone — there is nowhere to put a token id. So each leg is its own ERC-20, deployed per epoch as an EIP-1167 minimal-proxy clone. We documented it with the test that establishes it, and it is the single most useful thing we would tell the next team building a hook whose output needs to trade. Manipulation resistance is measured, not asserted. A test attacks a real pool: ten round trips across twenty blocks cost 0.30 in fees and moved the payoff by 0.00144, so an attacker would need 694x the attack's cost held in STORM before manufacturing variance broke even. Cost scales linearly with blocks while the payoff is capped, so past saturation every additional block is pure loss — and the fees the attacker pays go to the LPs the index exists to protect. Partner tech, and why each one is load-bearing. Unichain is not a convenience: a variance index samples per block, so ~1s blocks give ~86,400 observations a day against ~7,200 on L1, which is the difference between a statistically meaningful epoch taking minutes and taking days. Circle Nanopayments makes coverage a per-second subscription instead of a lump-sum contract — sub-cent USDC transfers verified in under a second are what make continuous risk transfer economical at all. A sync twenty-two seconds after funding moved exactly twenty-two seconds of coverage and 0.0022 USDC. One thing worth knowing about Arc: USDC is simultaneously the native gas asset (18-decimal view) and an ERC-20 at 0x3600...0000 (6-decimal view). Same pool of funds, two views, and conflating them is an easy hour lost. Privy session signers let a treasury delegate a recurring premium budget under a TEE-enforced policy scoped to two methods on one contract with a hard cumulative spend cap — which is the whole conversation when software is spending a treasury's money on a schedule. One deliberate architectural line. The index, the collateral and settlement live entirely in contracts on Unichain. Arc is a payment rail for the subscription and never part of settlement. If Arc, Gateway or the agents are unavailable, streams stop and coverage lapses — nothing is stuck, nothing is at risk, and no settlement depends on an off-chain component. Future: Two tenors, then a surface. A single implied-volatility point is a number; two concurrent epoch lengths on the same pool make it a curve, and a full term structure with multiple strikes makes it something a desk can actually quote against. Cross-pool netting, so one position can hedge a book's net exposure across correlated pools rather than one pool at a time. Calibrating annualization per pool and per horizon, which is currently a fixed constant. And the integration path: shipping a reference dynamic-fee hook that prices its fee off market-implied volatility instead of a trailing window, plus a skill contribution to the uniswap-ai repo so other builders can wire the feed in without reading our source. Tech stack: Solidity, Foundry, Uniswap v4 (PoolManager, PositionManager, StateView, Universal Router, Permit2), OpenZeppelin uniswap-hooks, EIP-1167 clones, Unichain, Circle Arc, Circle Nanopayments, Circle Gateway, Circle Wallets, Privy, Next.js, TypeScript, viem, wagmi Prize selection: Uniswap Foundation — Best Uniswap Stack Contribution. Circle Arc — both bounties (the stablecoin-native pool bounty and the agentic economy bounty; they're split among qualifying projects, so enter both and meet their stated bar precisely: working frontend and backend, architecture diagram, video, docs, repo link). Privy if a track is open.