Pool-specific logic before or after key actions.
Liquidity became programmable.
Uniswap v4 keeps the concentrated-liquidity engine of v3, then rebuilds the architecture around a single PoolManager and optional plug-ins called hooks.
v4 retains v3-style concentrated liquidity while adding a singleton PoolManager, EIP-1153-powered flash accounting, optional hook callbacks, custom accounting, and native ETH support.
Every pool lives inside one PoolManager contract.
Intermediate balance changes can stay internal.
ETH pairs no longer require WETH wrapping.
From pool islands to a shared core.
In v3, every pool is its own contract. In v4, pools are records managed inside one contract. That shared home is what makes cheaper pool creation and more efficient multi-pool journeys possible.
The v4 singleton encapsulates pool state and logic in PoolManager. A pool is keyed by currencies, fee, tick spacing, and an optional hook address rather than represented by a newly deployed pool contract.
One PoolManager. Every pool.
Creating a pool becomes a state update instead of a new contract deployment. Shared accounting also lets routes cross pools without moving intermediate tokens between contracts.
hook
Hooks turn moments into extension points.
A hook is an external smart contract attached to a pool. The PoolManager can call it before or after initialization, liquidity changes, swaps, and donations.
One optional hook contract is encoded into a pool’s key. Address-level permission flags tell the PoolManager which callbacks to invoke; a single hook can serve many pools.
Raise the fee when volatility rises.
A pool can ask its hook for a fee immediately before each swap, responding to market conditions instead of staying inside one fixed tier.
Move the result—not every intermediate token.
During a complex action, v4 records what is owed as internal deltas. Once the sequence finishes, the PoolManager checks that everything balances and settles the final input and output.
Inside an unlock callback, swaps and liquidity operations update transient BalanceDelta values. EIP-1153 transient storage makes this accounting practical; all deltas must resolve before control returns.
The caller unlocks the PoolManager and starts the route. No intermediate token transfer has happened yet.
A fee can become a strategy.
v4 pools may use dynamic LP fees. A hook can update the fee per swap, or the PoolManager can update it on another schedule.
- React to volatility, volume, depth, time, or another chosen signal.
- Keep fee-setting logic outside the immutable core AMM.
- Choose the mechanism at pool creation; dynamic-fee capability is immutable.
This toy model raises the displayed fee with volatility and lowers it with depth. Real hooks choose and secure their own model.
Four more pieces worth knowing.
The architecture unlocks more than hooks. These supporting features matter to swappers, liquidity managers, integrators, and protocol designers.
No wrap / unwrap detour.
v4 pools can pair directly with native ETH, avoiding the extra WETH wrapping step and its associated transfer overhead.
Hooks can return deltas.
Custom accounting can adjust swap or liquidity amounts—supporting hook fees, withdrawal fees, or even alternative pricing curves.
Claims instead of transfers.
Power users can leave assets in the PoolManager and receive lightweight ERC-6909 claim tokens, then burn claims in later interactions.
Positions can notify.
A position owner can attach a subscriber contract that is notified when ownership or liquidity changes—useful for staking and liquidity-mining designs without custodying the position NFT.
What v4 changes—and what it doesn’t.
- For swappers
Routes and pool behavior can become more efficient or more tailored. But a hook-enabled pool also introduces custom code whose behavior should be understood.
- For liquidity providers
More pool designs and fee strategies are possible. More choice also means comparing hook logic, risk, and routing—not only token pair and fee tier.
- For builders
The core becomes a settlement and liquidity primitive. Products can compose around shared liquidity without forking the entire AMM.
- The invariant
v4 preserves v3-style concentrated liquidity in the core. Hooks extend behavior; they do not make every pool automatically safer, cheaper, or better.
Go deeper in the official docs.
This independent educational prototype is not affiliated with or endorsed by Uniswap Labs or Uniswap Foundation. Uniswap is a trademark of its respective owner.