...
BTC$87,250.002.34%
ETH$4,120.001.18%
SOL$178.004.72%
BNB$645.000.95%
XRP$2.656.41%
ADA$0.82000.62%
AVAX$42.503.14%
DOGE$0.18002.07%
LINK$32.501.89%
DOT$8.900.44%
UNI$14.202.56%
MATIC$0.58000.71%
BTC$87,250.002.34%
ETH$4,120.001.18%
SOL$178.004.72%
BNB$645.000.95%
XRP$2.656.41%
ADA$0.82000.62%
AVAX$42.503.14%
DOGE$0.18002.07%
LINK$32.501.89%
DOT$8.900.44%
UNI$14.202.56%
MATIC$0.58000.71%
DeFiAdvancedUpdated March 2026

Uniswap v4 Hooks: The Complete Guide for 2026

Uniswap v4 launched in January 2025 with a feature that quietly rewrites what a DEX can be: Hooks. Instead of one fixed AMM design, any developer can now attach custom smart contract logic to individual liquidity pools — enabling dynamic fees, on-chain limit orders, MEV revenue sharing, KYC-gated pools, and much more. This guide explains exactly how Hooks work, what you can build with them, and the risks you need to understand as a DeFi user.

Updated March 2026 · 13 min read

⚡ Uniswap v4 Key Stats (March 2026)

Launch Date
Jan 31, 2025
Cumulative Volume
$180B+
TVL (All Versions)
$6.8B
Days to $1B v4 TVL
177
Custom Hooks Built
2,500+
L2 Volume Share
67.5%

1. What Is Uniswap v4?

Uniswap is the largest decentralized exchange (DEX) by volume. It allows anyone to swap tokens directly from their wallet, with no sign-up, no KYC, and no custodian — just you, your wallet, and a smart contract that runs automatically. The protocol launched in November 2018 and has grown through four major versions, each adding a fundamental new primitive to how liquidity works on-chain.

Uniswap v4 launched on January 31, 2025, as the most significant architectural upgrade the protocol has ever shipped. While v3 introduced concentrated liquidity (letting LPs focus capital in specific price ranges for higher yield), v4 goes a level deeper: it turns Uniswap from a single AMM design into a platform for infinite AMM experimentation.

The key innovations are four interrelated changes: Hooks (custom smart contract extensions), a Singleton architecture (one contract for all pools), Flash Accounting (batch settlement), and native ETH support. Together they cut gas costs by up to 99% for pool creation and unlock an entirely new layer of DeFi composability.

2. What Are Hooks?

Think of Hooks as plugins for liquidity pools. A Hook is an external smart contract that gets attached to a specific Uniswap v4 pool at creation time. Once attached, the Hook's code automatically executes at defined points in the pool's lifecycle — before and after swaps, before and after liquidity changes, and when the pool is initialized.

Before v4, if you wanted to build a DEX with dynamic fees or auto-compounding liquidity, you had two bad options: fork the entire Uniswap codebase (losing its liquidity network), or build a new protocol from scratch (expensive and fragmented). Hooks solve this by giving developers standardized extension points inside Uniswap itself — you get the benefit of Uniswap's deep liquidity while adding your own logic on top.

💡 Key Concept: Hooks are Not New to Software

The concept of "hooks" (also called middleware or plugins) is a standard software pattern. WordPress plugins, React lifecycle hooks, and GitHub Actions all use the same idea: inject custom logic at predefined execution points without modifying the core system. Uniswap v4 brings this pattern to on-chain liquidity for the first time.

Each pool can have exactly one Hook contract, but a single Hook contract can serve an unlimited number of pools. This architecture keeps complexity manageable while enabling virtually unlimited customization possibilities.

3. The Hook Lifecycle Explained

Hooks can execute at up to eight points in a pool's operation. Each execution point has a "before" and "after" variant, giving fine-grained control over every pool action:

Hook PointWhen It FiresWhat You Can Do
beforeInitializeBefore pool creationEnforce creation conditions, whitelist deployers
afterInitializeAfter pool creationSet initial state, bootstrap liquidity
beforeAddLiquidityBefore LP depositValidate LP identity, apply KYC checks
afterAddLiquidityAfter LP depositIssue LP receipt tokens, trigger rewards
beforeRemoveLiquidityBefore LP withdrawalApply lock-up periods, calculate exit fees
afterRemoveLiquidityAfter LP withdrawalTrigger auto-compound, send fee rebates
beforeSwapBefore each swapApply dynamic fees, check allowlists, run TWAMM
afterSwapAfter each swapShare MEV revenue, update oracles, auto-rebalance

🔧 Hook Lifecycle Explorer

Click any hook point to see what you can build with it

SwapHigh Risk
beforeSwap()

Fires before every swap. The highest-impact Hook point — enables dynamic fees that adjust in real time, TWAMM execution, MEV protection by inspecting the swap context before execution, or allowlist enforcement on who can trade.

Example Uses
Calculate dynamic fees based on volatility
Execute TWAMM orders
Block non-allowlisted traders
Apply MEV protection logic

When a Hook executes, it can return deltas — adjustments to the token balances involved in the operation. This "custom accounting" mechanism lets Hooks take fees from swaps, override default pricing, or even route flows to entirely different protocols mid-swap.

⚠️ Not Every Pool Uses Hooks

Hooks are optional. Many Uniswap v4 pools will simply use the standard AMM with no Hook attached, giving users the same behavior as v3 but cheaper. When a Hook IS present, it's encoded in the pool address — technically, the address bits tell the PoolManager which of the eight hook points to call.

4. Key Features Hooks Enable

Dynamic Fees

v3 pools have a fixed fee tier: 0.01%, 0.05%, 0.3%, or 1%. With Hooks, a pool can implement any fee algorithm you can write in Solidity. Fees can adjust based on volatility (higher fees during volatile markets protect LPs from impermanent loss), time of day, trading volume, current price momentum, or any on-chain data source. This turns LP positions from passive fee collectors into actively managed yield strategies.

Singleton Architecture & Flash Accounting

In v3, each pool is a separate deployed contract. With millions of token pairs, this means millions of contracts and a huge amount of wasted gas on cross-pool interactions. v4 deploys a single PoolManager contract that handles all pools. This alone cuts pool creation gas by 99%.

Flash Accounting pairs with this: instead of settling token transfers after every individual swap, v4 batches them across an entire transaction. You can route through five pools in one transaction, and only the net balance change across all pools gets settled at the end. This enables complex multi-hop strategies at dramatically lower gas cost.

Native ETH Support

v1–v3 required wrapping ETH to WETH before trading. v4 natively supports ETH as a pool token, removing one approval transaction and saving gas on every ETH-involved swap.

5. Real-World Hook Use Cases

By March 2026, over 2,500 custom pools have been deployed using Hooks. Here's what the builder community has created so far:

📈

On-Chain Limit Orders

Execute limit orders directly in a pool. When price hits your target, a Hook triggers the fill automatically — no off-chain relayer needed.

🔄

Auto-Compound LP

Earned fees are automatically re-invested into the LP position after every swap, compounding returns without any user action.

🛡️

MEV Revenue Sharing

Hooks can intercept MEV profits on a pool (from arbitrageurs) and redistribute a share back to LPs, turning MEV from pure extraction into a yield source.

⏱️

TWAMM (Time-Weighted AMM)

Execute large orders over time to minimize price impact — same as a TWAP order on a CEX, but entirely on-chain via Hook logic.

🔐

KYC-Gated Pools

Institutional pools can require identity verification before allowing LP deposits or swaps, enabling compliant DeFi without sacrificing on-chain settlement.

🎯

Prediction Markets

Pool logic extended to support outcome-based settlement. UniMarket is a live example of a prediction market built directly on top of a v4 Hook.

6. Uniswap v4 vs v3: What Changed

FeatureUniswap v3Uniswap v4
CustomizationNone — fixed AMM logicHooks: unlimited custom logic per pool
ArchitectureSeparate contract per poolSingleton — one contract, all pools
SettlementPer-swap token transfersFlash Accounting — net batch settlement
Fee Tiers4 fixed options (0.01–1%)Unlimited — any fee algorithm via Hooks
Native ETHNo (must wrap to WETH)Yes — native ETH supported
Pool Creation Gas~$50–$200~$0.10–$1 (99%+ reduction)
LP ComposabilityBasic ERC-721 positionsCustom position logic via Hooks
LaunchMay 2021January 31, 2025

It's worth noting that v3 pools are not being deprecated. Uniswap v3 will continue to run alongside v4 indefinitely. Most casual users will migrate naturally as v4 liquidity deepens on key pairs.

7. Security Risks You Need to Know

Hooks dramatically expand the attack surface of any pool. Before interacting with a v4 pool that uses a Hook, you need to understand these risks:

Malicious Hooks

A Hook contract could be deliberately written to steal funds. When you swap on a v4 pool with a Hook, that Hook code runs with access to your swap context. Always verify the Hook contract has been audited and the source code is verified.

Improper Delta Handling

Hooks return 'deltas' that affect token balances. A misconfigured delta return can cause fund misallocation, unexpected fees, or unfair pricing — even without malicious intent.

Async Hook Custodianship

Some Hooks temporarily take custody of assets during execution. During this window, poorly written logic could be exploited, causing user funds to be locked or misdirected.

Centralization Risks

If a Hook has an admin key or governance mechanism, a malicious upgrade could change behavior after you've provided liquidity. Always check if a Hook is upgradeable and who controls it.

No Hook Does Not Mean Safe

Even pools without Hooks can have other risks (smart contract bugs, oracle manipulation). Hooks add to the risk surface — they don't replace standard DeFi due diligence.

⚠️ This guide is for informational purposes only. It is not financial advice. DeFi protocols including Uniswap v4 carry smart contract risk, economic risk, and the specific risks of any Hook deployed on a given pool. Always do your own research and only risk funds you can afford to lose.

8. How to Use Uniswap v4 Today

For most DeFi users, interacting with Uniswap v4 works exactly like using v3 through the Uniswap interface at app.uniswap.org. The router automatically finds the best price across all v4 pools, including Hook-enabled ones.

If you want to specifically use a Hook-powered feature (like a limit-order pool), you'll typically access it through a specialized front-end built on top of the Hook contract rather than the main Uniswap UI. The ecosystem is still maturing — expect specialized Hook UIs to proliferate throughout 2026 as the Uniswap Foundation's Hook Incubator program graduates more projects.

For LPs: Providing liquidity on v4 is similar to v3, but with a new consideration — which Hook does this pool use, if any? For core pairs like ETH/USDC or WBTC/USDC, you'll find large pools with no Hook (safe defaults). More exotic Hook-enabled pools offer potentially higher yield with correspondingly higher smart contract risk.

🏗️ Building a Hook? Start Here

  • Use BaseHook from Uniswap's official repo — it enforces the interface correctly.
  • Get a security audit before deploying to mainnet — no exceptions.
  • Apply to the Uniswap Foundation Hook Incubator for mentorship and funding.
  • Test on the v4 testnet deployments (Sepolia, Base Sepolia) before mainnet.

Frequently Asked Questions

What are Uniswap v4 Hooks?

Hooks are external smart contracts that attach to individual Uniswap v4 liquidity pools and execute custom logic at specific lifecycle points — before/after swaps, before/after liquidity changes, and at pool initialization. They let developers add features like dynamic fees, limit orders, or MEV revenue sharing to any pool.

When did Uniswap v4 launch?

Uniswap v4 launched on January 31, 2025. It reached $1B in TVL within 177 days and processed over $180B in cumulative volume by September 2025. As of March 2026, overall Uniswap TVL across all versions sits around $6.8B.

What's the difference between Uniswap v3 and v4?

v4's biggest changes are: Hooks (custom pool logic), the Singleton architecture (one contract instead of one per pool), Flash Accounting (batch token settlement), and native ETH support. Together these cut gas costs dramatically and unlock a new layer of DeFi programmability that wasn't possible in v3.

Are Uniswap v4 Hooks safe to use?

Hooks expand the attack surface of any pool. A malicious or buggy Hook can drain funds or manipulate pricing. Always verify that any Hook contract you interact with has been audited, that the source code is verified on-chain, and that you understand who controls any admin functions. Pools with no Hook attached have the same security profile as standard v3 pools.

What can you build with Uniswap v4 Hooks?

Already-live examples include on-chain limit orders, dynamic fee pools (fees that adjust based on volatility), auto-compounding LP positions, MEV revenue sharing, KYC-gated institutional pools, TWAMM (time-weighted average market making), and prediction markets. Over 2,500 custom pools have been deployed using Hooks since launch.

Does Uniswap v4 still use the UNI token?

Yes. UNI is the governance token for the Uniswap Protocol. UNI holders vote on protocol upgrades, fee switches, treasury allocations, and chain deployments. Uniswap v4 did not change this governance structure.

Related Guides