Liquidity Lu saysUniswap v4 puts every pool in ONE singleton contract and lets each pool register hooks — callbacks before/after swaps, mints, and burns — for custom logic like on-chain limit orders.
Uniswap v4 makes two huge changes. First, the singleton: every pool lives in one contract instead of having a dedicated deployment per pool, killing inter-contract call gas. Second, hooks: at pool creation, each pool can register callbacks (beforeSwap, afterSwap, beforeAddLiquidity, etc.) into a hooks contract — letting protocols layer custom logic like dynamic fees, MEV-resistant ordering, or on-chain limit orders without forking Uniswap.
Singleton savings alone are large: 1000 pools deployed v2-style cost roughly 1000× as much as one singleton + per-pool metadata. The demo compares deployment cost.
Power-ups you unlock
Singleton: every pool lives in one contract
Massive gas savings on inter-pool calls (flash accounting)