Uniswap v4 Hooks Explained: Singleton, Custom AMMs, and the UNIfication Thesis
Uniswap v4 is the most consequential AMM redesign since concentrated liquidity. By combining a singleton architecture with a hook system, v4 turns Uniswap from a fixed protocol into a programmable liquidity platform — one where developers can ship custom AMM logic without forking the core. This guide walks through the architecture, the hook ecosystem as it stands in 2026, the v3-to-v4 migration question, how v4 fits next to intent-based DEXs like CowSwap, and the UNIfication tokenomics narrative now driving UNI.
The architectural break: singleton + hooks
Singleton: one contract, all pools
In Uniswap v3 every pool was its own contract, deployed by a factory. Creating a new pool cost roughly 5M gas and produced an isolated address. v4 reverses that: a single PoolManager contract holds all pool state. New pools cost ~99 percent less to create because there's no deployment, just a state entry. Multi-hop routes become dramatically cheaper because token transfers between hops are virtual — the singleton tracks net deltas and only settles balances at the end of a transaction. This is enabled by flash accounting, where intermediate states can be transiently negative and only the net obligation must be cleared by transaction end.
Second-order effect: the singleton makes flash-loans free in spirit. Any caller can borrow within a transaction so long as they restore balances before settle, removing the rationale for a separate flash-loan contract.
Hooks: lifecycle plugins
A hook is a contract address attached to a pool at creation time. The PoolManager invokes it at fixed lifecycle points: beforeInitialize, afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, afterDonate. The hook can also override return values — beforeSwap can return a custom delta, effectively replacing the constant-product math with anything the developer wants.
Hook permissions are encoded in the bottom 14 bits of the hook contract's address — a clever device that lets the PoolManager check at deployment what callbacks a hook needs without storing extra state. A hook that wants beforeSwap and afterSwap callbacks must be deployed at an address whose bits match those flags. Tooling like CREATE2-mining libraries handle this address vanity-mining.
Flash accounting and the lock pattern
v4 enforces a lock pattern: the singleton can only be operated on inside an unlock callback. A swapper unlocks the manager, executes any number of operations (swaps, liquidity changes, transfers), and at the end of the callback all balances must net to zero. This is what makes routing across N pools cost roughly the same as one pool — there are no intermediate ERC-20 transfers, just internal accounting.
What hooks unlock
Custom AMM curves
The most powerful capability: replace the Uniswap math entirely. A beforeSwap hook can compute a custom price from a constant-sum, constant-power, or fully off-curve formula and return the resulting delta. Stableswap-style curves, weighted pools, oracle-priced pools, and concentrated liquidity over arbitrary distributions are all expressible as hooks. This collapses the historical reason to build a separate AMM (Curve, Balancer) — you can now ship those mechanics as a v4 hook and inherit Uniswap's routing, frontends, and liquidity gravity.
Dynamic fees
v3's fee tiers (1bp, 5bp, 30bp, 100bp) are static. A hook can set the fee per swap based on volatility, pool inventory imbalance, time-of-day, or the identity of the swapper. Bunni v2's hook adjusts fees in proportion to realized variance — fees rise during volatile windows (compensating LPs for adverse selection) and fall in quiet markets (attracting flow). Empirical results from Bunni's mainnet pools in 2025 showed material LP outperformance versus equivalent v3 positions in volatile assets.
MEV protection and RFQ filling
A beforeSwap hook can route the order to an off-chain solver auction before touching public liquidity, mimicking RFQ desks. Sorella Labs' Angstrom hook auctions order flow to professional market makers, returning rebates to swappers and pushing toxic flow off the public AMM. The result: cleaner LP returns and tighter retail execution, all without leaving the v4 surface. This is the hook ecosystem's most direct answer to CowSwap-style intents.
Just-in-time liquidity
JIT — placing concentrated liquidity right before a known large swap and removing it immediately after — was a controversial v3 strategy because professional searchers crowded out passive LPs. A v4 hook can either restrict JIT (e.g., a minimum dwell time) or institutionalize it, e.g., a managed-liquidity hook that automatically tightens ranges around incoming swaps and shares profits with depositors.
On-chain limit orders and TWAMM
A hook can register conditional liquidity — capital that becomes active only when the pool's price crosses a threshold — implementing native limit orders. TWAMM (Time-Weighted Average Market Maker) hooks execute slow-running orders block by block, designed for whales who want to acquire or unwind a position over hours without market impact. Cron Finance pioneered on-chain TWAMM but announced it was winding down in 2023, before v4 launched; in v4 the design is expressible directly as a hook.
Standout hooks in 2026
The v4 hook ecosystem is still maturing — total v4 TVL crossed $1B in early 2026, well behind v3's $4-5B but climbing fast. The hooks pulling the most attention:
- Bunni v2 — dynamic-fee hook with surplus-yield rehypothecation. LPs deposit into Bunni-managed v4 pools; idle inventory routes to Aave/Morpho; fees adjust to volatility. Has become the default 'smart-LP' venue for the long tail.
- Sorella Angstrom — sandwich-resistant hook that auctions order flow to professional fillers and rebates value that would otherwise be captured as MEV back to swappers.
- Doppler — token launch hook with a Dutch-auction bonding curve, designed to replace bonded-curve launchpads with on-AMM TGE.
- Arrakis HOT (Hyper-Optimized-Trading) — institutional managed-liquidity vault, RFQ-style fills against curated counterparties; popular with treasury desks.
- TWAMM hooks — time-weighted average MM for slow execution, building on the design Cron Finance pioneered before winding down in 2023.
- Eulerswap — Euler Finance's lending-aware AMM where LPs simultaneously earn AMM fees and lending interest.
Most of the long tail is experimental — KYC pools, social-graph-gated pools, cross-domain LP hooks. The 80/20 reality: a small number of professional hooks will capture the majority of TVL, the same way a handful of v3 pools dominate fee generation today.
v3-to-v4 migration
Uniswap v4 launched on Ethereum mainnet in early 2025 and rolled out across Optimism, Arbitrum, Base, Polygon, BSC, Avalanche, and Unichain through 2025. Migration is voluntary; v3 continues to operate. As of Q1 2026, v4 holds roughly 20-25 percent of cumulative Uniswap TVL with the rest still on v3, but v4's share of swap volume is rising faster than its share of TVL — a sign that hook-bearing pools are out-trading static v3 fee tiers per dollar of liquidity.
LPs migrating from v3 to v4 face a question: which hook? A vanilla v4 pool (no hook attached) is mostly equivalent to v3 with slightly better gas. The decision is whether to deposit into a hook-managed pool that promises better fee dynamics or routing, accepting the additional smart-contract risk of the hook contract. The Uniswap front end (app.uniswap.org) curates the hook list users see; the on-chain reality is permissionless.
For swappers, v4 is mostly invisible — the auto-router picks the best venue across v2, v3, and v4 pools, and gas costs on multi-hop routes are noticeably lower.
v4 vs CowSwap intents
A recurring debate: do hooks make intent-based DEXs redundant, or vice versa?
Intents (CowSwap, UniswapX, 1inch Fusion) are an off-chain auction layer. A user signs an order describing what they want; solvers compete to fill it against any combination of liquidity venues. Intents win on flexibility (any source of liquidity), MEV protection (auctions are private), and gasless UX (the solver pays gas). They lose on settlement latency (multi-block), composability (off-chain orders are harder to chain into other on-chain logic), and on the long tail (small orders below solver attention).
v4 hooks are on-chain infrastructure. Hooks like Sorella's bring intent-style MEV protection on-chain, narrowing the gap. But intents systems also route into v4 — a CowSwap solver picks v4 pools when they offer best price. The two layers compose: intent front end + hook-protected pool = both worlds.
The likely steady state: intents capture institutional and large retail flow; v4 hooks capture programmable on-chain liquidity; small swaps route through whichever is cheaper at the moment. Both expand the addressable market for Uniswap's underlying liquidity.
UNIfication: tokenomics and the fee switch
UNI has historically been a pure governance token — no cash flow accrual to holders. The 'fee switch' has been governance-debated since 2022: turn on a protocol fee that diverts a slice of LP earnings to a treasury or stakers. Multiple snapshot votes have signaled support but the final on-chain activation has been delayed by tax and regulatory considerations.
The UNIfication thesis bundles three catalysts:
- Fee switch activation — directing a percentage of LP fees (typical proposals: 10-25 percent) to UNI stakers, transitioning UNI from governance token to cash-flow token.
- Unichain — Uniswap Labs' own L2 (launched 2024-2025) that captures sequencer revenue. Unichain block production is paid for in ETH; profits accrue to a Unichain treasury that, in current proposals, would flow to UNI stakers as a separate revenue stream.
- v4 hook revenue — pools with hooks can implement protocol-level fee splits. As hook adoption grows, UNI gains a programmable lever to capture surplus.
If all three activate, UNI's economic profile shifts materially. As of early 2026 fee-switch governance is the closest to passage, with multiple Uniswap Labs and Foundation signals indicating activation is a question of when, not if. The catalyst windows: tax-clarification milestones in the U.S. (post-GENIUS Act), Unichain TVL crossing material thresholds, and v4 fee revenue overtaking a baseline.
Tokenomics snapshot
- UNI total supply: 1,000,000,000 (fixed; governance can mint at ~2 percent annually post year-4, currently inactive)
- Circulating: ~600M (60 percent of supply)
- Treasury: held by Uniswap governance contract; multi-billion-dollar mark-to-market
- Fee accrual: zero today; pending fee-switch activation
Risks
Hook risk. A malicious or buggy hook can drain LPs or grief swaps. The PoolManager itself is locked down — bugs there would be systemic — but hooks are user-deployed code with full callback authority. Best practice for LPs: only deposit into pools whose hooks have been audited, are open-source, and have material TVL elsewhere; treat hook code as you would treat a vault strategy.
Singleton concentration. All v4 liquidity flows through one contract. v4-core was audited by Trail of Bits, OpenZeppelin, Spearbit, ABDK, and Certora (formal verification of core invariants), with a $15.5M Cantina bounty before launch — among the most heavily reviewed contracts in DeFi history. But concentration of risk remains: a critical core bug would simultaneously affect every v4 pool.
Liquidity fragmentation. v3 and v4 will coexist for years. LPs choosing between versions face a real tradeoff between v3's battle-tested simplicity and v4's hook-driven optimization.
Governance dependency. UNI's value thesis depends on fee-switch activation, which in turn depends on resolving tax treatment and on-chain governance flows. Delay risk is real.
Hook centralization at the front end. Users predominantly access v4 through app.uniswap.org, which curates a hook allow-list. This reintroduces a soft permissioning layer despite on-chain permissionlessness.
Bottom line
Uniswap v4 is less a DEX upgrade and more an AMM operating system. The singleton makes deployment cheap and routing efficient; hooks make pools programmable. The 2026 question is not whether v4 wins on architecture — it does — but how fast the hook ecosystem matures into a durable category of programmable liquidity primitives. UNI's value path runs through three intertwined catalysts: fee switch, Unichain, and v4 fee growth. The protocol that started as a Vyper experiment in 2018 is now the closest thing crypto has to a default liquidity layer.
Related comparisons
- Compare: Uniswap v3 vs Uniswap v4
- Compare: Uniswap v4 vs Uniswap v2
- Compare: Curve vs Uniswap v4
- Compare: Uniswap v4 vs Balancer
- Compare: Uniswap v4 vs PancakeSwap
- Compare: Uniswap v4 vs Raydium
Sources and further reading
- Uniswap v4 whitepaper — https://uniswap.org/whitepaper-v4.pdf
- Uniswap v4 docs — https://docs.uniswap.org/contracts/v4/overview
- v4-core repository — https://github.com/Uniswap/v4-core
- Atrium Academy hook tutorials — https://atrium.academy
- Bunni v2 — https://bunni.pro
- Sorella Labs research — https://sorellalabs.xyz
About the author
DeFi Intel Research is the in-house research team at DeFi Intel, focused on on-chain capital markets, MEV, ZK infrastructure, and verifiable AI.