Uniswap V4 Hooks · interactive mechanism simulation

Swaps and liquidity flow through one singleton PoolManager. A pool's attached hook contract runs custom logic (dynamic fees, MEV-aware ordering, rehypothecation) on every call, then the PoolManager nets and settles balances via flash accounting into pool reserves. Hooks are trusted code — a buggy one (like Bunni v2) can drain the reserves it governs even though the core has never been exploited.
Traders initiate swaps 1.6 swaps/s Liquidity providers add liquidity PoolManager (singleton) one contract, every pool 187 hook-enabled pools flash accounting: nets deltas per tx EIP-1153 transient storage Hook contract dynamic fee: 0.30% before/afterSwap callbacks HOOK EXPLOITED Settlement net balances paid at tx end 0 hook fee accrued Pool reserves (TVL) $4,200,000
Swaps executed
0
Cumulative volume
$0
Pool reserves (TVL)
$4,200,000
Hook-enabled pools
187
Hook fees accrued
$0
Parameters — edit me
1.6/s
0.30%
20%
0.4/s
Controls

Illustrative simulation. Dollar figures, swap sizes and timing are randomized for visualization — not live onchain data. Uniswap V4's actual core has never been exploited to public knowledge; the "trigger a hook exploit" button dramatizes the documented risk that a buggy third-party hook (e.g. Bunni v2, ~$8.3M, Sept 2025) can drain the reserves of the pool it governs. Drag the sliders to explore how swap rate, dynamic fees, and LP activity move the flywheel. Part of The Onchain Experiment Atlas.