What Is Uniswap V4 (Hooks): Complete Customizable AMM Guide (2026)
— By Tony Rabbit in Tutorials

What is Uniswap V4? Complete 2026 hooks guide: singleton pool architecture, customizable plugins, dynamic fees, limit orders, TWAMM, V4 vs V3 comparison and UNI governance.
Uniswap V4 is the most ambitious upgrade in the history of decentralized exchanges. Launched on Ethereum mainnet in Q1 2026 after more than two years of development, audits, and community review, V4 replaces the rigid pool architecture of previous versions with a fully customizable system built around three core innovations: a singleton contract that holds every pool in a single storage slot, flash accounting that nets balances at the end of a transaction instead of after every step, and hooks that let developers inject custom logic into the lifecycle of any swap, liquidity event, or fee accrual.
If Uniswap V3 turned the simple constant-product formula into a capital-efficient market maker with concentrated liquidity, V4 turns the entire protocol into a programmable AMM platform. Anyone can deploy a pool with a custom hook contract that adds limit orders, dynamic fees, on-chain TWAMM execution, MEV redistribution, KYC gating, or a brand-new oracle, all without forking the codebase. The result is that Uniswap stops being a single product and becomes the underlying infrastructure for hundreds of specialized markets.
This guide explains exactly what Uniswap V4 is, how the singleton plus hooks architecture works in practice, which hooks have already been deployed and adopted, how V4 compares to V3 and V2, and how both traders and developers can start using or building on it today. By the end, you will understand why most DeFi analysts consider V4 the foundation for the next decade of decentralized finance.

What Is Uniswap V4?
Uniswap V4 is the fourth major version of the Uniswap protocol, the largest decentralized exchange by volume in the world. Where previous versions were monolithic contracts with hardcoded behavior, V4 is a modular system. Every pool now lives inside a single contract called the PoolManager, and every pool can optionally attach a hook contract that runs custom code before or after key actions. This means the protocol itself does not need to be upgraded for new features to ship. Anyone can deploy a new hook and a new pool that uses it, and that pool becomes part of the Uniswap ecosystem instantly.
The practical impact is enormous. In Uniswap V3, if you wanted limit orders, you had to use an external protocol or wait for the team to ship them. In V4, a developer can deploy a limit-order hook in an afternoon and any liquidity provider can route capital through a pool that uses it. The same applies to dynamic fees that adjust based on volatility, time-weighted average market makers (TWAMMs) for large orders, custom oracle integrations, and even compliance gates for regulated entities. V4 effectively turns the AMM into a platform the same way Ethereum turned currency into a platform.
The protocol is open source under a Business Source License that converted to GPL after a four-year exclusivity window, deployed on Ethereum mainnet plus most major L2s including Arbitrum, Base, Optimism, Polygon, BNB Chain, and Unichain. Governance is handled by holders of the UNI token through the Uniswap DAO, and the front-end at app.uniswap.org is operated by Uniswap Labs but the smart contracts are fully permissionless. Anyone can deploy pools, write hooks, and route trades directly against the PoolManager without going through any front-end.
A Brief History: From V1 in 2018 to V4 in 2026
To appreciate why V4 matters, it helps to walk through how Uniswap got here. The protocol has evolved through four distinct generations, each solving the biggest problem of its predecessor.
First production constant-product AMM. ETH-token pairs only. Proved that automated market making could replace order books on chain.
Any ERC20 pair without routing through ETH. Introduced flash swaps and price oracles. Became the canonical DEX during DeFi summer.
LPs choose a price range for their capital. 4000x capital efficiency on stablecoin pairs. Multiple fee tiers per pair (0.05%, 0.30%, 1%).
All pools in one contract. Flash accounting. Custom hooks for any logic. 99% gas savings on pool creation, 50% on multi-hop swaps.
V1 launched in November 2018 from Hayden Adams's solo development effort, funded by an Ethereum Foundation grant. It was the first AMM to gain real traction, but it only supported ETH-token pairs and had no fee customization. V2 arrived in May 2020 with direct ERC20-ERC20 pairs, flash swaps, and built-in TWAP oracles. This is the version that fueled the explosion of DeFi summer and made AMMs the dominant model for on-chain trading.
V3 shipped in May 2021 and introduced concentrated liquidity, the single biggest innovation in AMM design since V1. Liquidity providers could now specify the exact price range in which their capital was active, which made stablecoin pools 4000x more capital efficient and let LPs compete more directly with order book market makers. V3 also added three fee tiers per pair so that exotic and stablecoin pairs could price risk differently.
V4 was originally announced in June 2023 but spent more than two and a half years in audits, community feedback rounds, formal verification, and a four-month bug bounty totaling $15 million in maximum rewards. The protocol finally went live on Ethereum mainnet on January 30, 2026, with simultaneous deployments on Arbitrum, Base, Optimism, and Polygon. By the end of Q1 2026, V4 pools had attracted more than $4 billion in TVL and were processing roughly 20% of all DEX volume on Ethereum mainnet.
The Singleton Architecture Explained
The first major change in V4 is structural. In every previous version of Uniswap, every pool was a separate smart contract. If you wanted to create a USDC-WETH 0.05% pool, the factory contract would deploy a brand new contract with its own storage, its own bytecode, and its own address. This was clean from a security standpoint but extremely expensive. Deploying a new pool on V3 cost roughly $25 to $200 in gas depending on network conditions, and every multi-hop swap had to make multiple cross-contract calls to route through different pools.
In V4, there is exactly one contract called the PoolManager that holds the state of every pool on the network. When you create a new pool, you are not deploying a new contract. You are just calling initialize() on the PoolManager with the parameters of your pool, which writes the new pool's state into a mapping inside the singleton. The cost of creating a new pool drops by 99%, from $25 to $200 down to a few cents in gas. This single change makes it economically viable to deploy thousands of specialized pools that would never have made sense in V3.

The singleton also makes multi-hop swaps dramatically cheaper. In V3, swapping USDC to PEPE through WETH meant calling the USDC-WETH pool contract, then calling the WETH-PEPE pool contract, with all the gas overhead of two external contract calls including storage warming, balance checks, and event emission. In V4, the same swap happens inside a single contract, sharing storage and never paying the cost of jumping between contract addresses. Real-world measurements show that three-hop swaps in V4 cost about 50% less gas than the equivalent route in V3.
There is one tradeoff. Because every pool lives inside the same contract, a critical bug in the PoolManager would affect all pools on the network at once. Uniswap addressed this with the longest formal verification process in DeFi history, including audits from Trail of Bits, OpenZeppelin, Certora, and ABDK Consulting, plus a $15 million bug bounty that ran for four months on testnet. The contract has been frozen and immutable since deployment, with no upgrade key or admin controls.
Flash Accounting and the Lock Pattern
The second core innovation is flash accounting. In Uniswap V3, every step of a swap had to settle on chain. If you were doing a complex multi-hop trade, each intermediate token transfer happened immediately, debited and credited the relevant balances, and triggered a full ERC20 transfer call. This was simple to reason about but wasteful, because most intermediate transfers cancel out by the end of the transaction anyway.
V4 introduces a concept called the lock pattern. When you want to interact with the PoolManager, you call its unlock() function, which gives your contract exclusive access to the PoolManager for the rest of the transaction. Inside that lock, you can do as many swaps, liquidity additions, removals, or hook calls as you want, and the PoolManager just keeps a running tally of how much your contract owes or is owed in each token. No actual ERC20 transfers happen during these operations. Only at the very end, when your contract calls settle(), does the PoolManager perform the net token transfers to balance every account.
The savings here are substantial. A typical arbitrage transaction in V3 that touches four pools might pay for eight ERC20 transfers, each costing 35,000 to 65,000 gas. In V4, the same transaction does zero intermediate transfers and only one or two final settlements. This unlocks new strategies that were not economically viable on V3, especially for sophisticated MEV searchers and DEX aggregators that route across many pools.
Flash accounting also makes the PoolManager itself act like an internal accounting system. You can borrow tokens from a pool, use them for any purpose, and return them at the end of the lock, similar to how a flash loan works on Aave. The difference is that there is no fee for this borrowing inside V4 itself, as long as the lock balances out by the end. This effectively makes the entire PoolManager a giant atomic settlement layer for token operations.
The Hooks System: Eight Lifecycle Hook Points
Hooks are what make V4 genuinely revolutionary rather than just a gas optimization. A hook is a smart contract that you attach to a pool at creation time. Once attached, the PoolManager will call specific functions on your hook contract at specific points in the pool's lifecycle. There are exactly eight hook points, paired into four before/after sets that cover every interaction a user can have with a pool.
The most important hook by far is beforeSwap. This is where the magic happens for limit orders, dynamic fees, oracle updates, and almost every other interesting V4 use case. When a user wants to swap, the PoolManager calls your hook's beforeSwap function first, passes it the swap parameters, and lets the hook return either a modified set of parameters, an explicit fee override, or a signal to skip the AMM math entirely and have the hook handle the swap itself.
Hook addresses encode their permissions in the lowest bits of their Ethereum address. When you deploy a hook contract, you have to mine an address (using CREATE2) whose last few bytes match the specific hook functions you intend to implement. This is how the PoolManager knows in advance which hooks to call without doing an expensive interface check. It also means hook addresses are deterministic and verifiable on chain. Any pool can be audited by inspecting the hook's address and confirming exactly which lifecycle functions it has permission to override.
Top Hooks Deployed in 2026
By mid-2026, dozens of production hooks have been deployed and adopted. Here are the most important categories and the leading hooks in each.
Limit order hooks were the first major use case to ship on V4 and remain the most popular. Bunni Limit, deployed in February 2026, lets users place a swap order at a specific price and have it automatically fill when the pool crosses that price. The hook works by creating a tiny concentrated liquidity position at exactly one tick. When the pool's price crosses that tick, the position is fully swapped from one token to the other. The hook then detects the cross in afterSwap, closes the position, and credits the user. By mid-2026, more than $400 million in cumulative volume had gone through V4 limit order hooks, mostly on stablecoin and majors pairs.
Dynamic fee hooks are starting to dominate the long tail of volatile pairs. Atrium Dynamic Fee, the most widely adopted version, increases the swap fee from a baseline of 0.30% to as much as 1.50% during periods of high volatility, then drops it back down during quiet periods. LPs in these pools earn substantially more fees per dollar of liquidity than they would in fixed-fee pools, and traders are still willing to pay because they get better execution on the long side of moves.
TWAMM hooks have been the secret weapon for institutional flow. Paradigm's open-source TWAMM hook lets a user submit a single order to swap, say, $50 million worth of USDC into WETH over the next 24 hours. The hook automatically chops that order into thousands of tiny per-block swaps, which minimizes price impact and prevents the kind of front-running that wrecks large block trades on most DEXes. CoW Swap and 1inch both route some large orders through TWAMM V4 pools when the execution math works out.
Uniswap V4 vs V3 vs V2: Side-by-Side Comparison
Here is how the three current generations of Uniswap stack up on the dimensions that matter most.
The clearest takeaway is that V4 is strictly more capable than V3 for almost every use case. There are a few edge cases where V3 might still be preferred. Simpler pools that do not need custom logic can save the small overhead of having a hook attached, and some integrators have not yet upgraded their pool routing logic to support V4. But for any new deployment, V4 is the default. The Uniswap Labs front end now defaults to V4 routes whenever they offer better execution, which is the case more than 70% of the time as of Q2 2026.
Gas Savings in Practice
The gas numbers are where V4 really starts to feel different in daily use. The Uniswap Foundation published a benchmark study in March 2026 comparing identical operations across V2, V3, and V4 on Ethereum mainnet at the same block. The results are striking.
A simple single-hop ETH to USDC swap costs roughly 170,000 gas on V2, 130,000 gas on V3, and 110,000 gas on V4. That is a 15% improvement over V3 for the simplest case. For a three-hop swap routing ETH through USDC and WBTC into a tail-end token, V2 costs about 350,000 gas, V3 about 260,000 gas, and V4 just 145,000 gas. This is roughly a 44% reduction versus V3 because flash accounting eliminates the intermediate token transfers.
The savings get even more dramatic for pool creation. Creating a new V3 pool on Ethereum mainnet at 10 gwei would cost around $25 to $50 in gas. Creating a V4 pool at the same gas price costs about $0.50, a 50x to 100x improvement. This is why the number of unique V4 pools deployed in the first three months of 2026 already exceeds the total number of V3 pools deployed across all of 2021 and 2022. Gas optimization is one of the main reasons sophisticated traders and aggregators moved their default routing to V4 within weeks of launch.
Custom Liquidity Strategies
Concentrated liquidity in V3 was a huge step forward, but it forced LPs into one specific shape: a uniform distribution of liquidity across the range they chose. V4 hooks let LPs implement any distribution shape they want. A hook can dynamically rebalance liquidity, concentrate it more tightly around the current price during low volatility, spread it out during high volatility, and even implement bonding curves that change shape based on volume.
One popular pattern is the "vault hook" model, where a hook contract pools many LPs' capital, manages liquidity ranges and rebalancing on their behalf, and issues fungible LP tokens (using the ERC6909 standard built into V4) that represent each LP's claim on the vault. Arrakis, Bunni, and Gamma have all launched V4 vault products that abstract away the complexity of managing concentrated liquidity. An LP just deposits USDC and WETH, and the vault handles range selection, rebalancing, fee compounding, and emergency exits.

Another emerging strategy is "just-in-time" liquidity using hooks. A sophisticated LP can run a hook that watches the mempool, detects incoming large swaps, and adds liquidity in a tight range right before the swap executes. The LP earns the full fee on the swap and then immediately withdraws the liquidity. This was technically possible on V3 through external smart contracts, but doing it inside a hook is dramatically more gas efficient and lets the LP capture a larger share of the value.
How to Use Uniswap V4 as a Trader
For most users, switching to V4 is invisible. If you go to app.uniswap.org and swap a token today, the front end automatically routes through V4 pools whenever they offer the best execution. You do not need to change your wallet, install anything new, or learn any new concepts. The same MetaMask, Rabby, or hardware wallet you used for V3 works for V4 because the protocol still speaks the standard ERC20 interface for users.
What changes is that you should pay attention to which hook a pool uses before providing liquidity or routing large trades. A pool with a limit order hook behaves differently than a vanilla pool. A pool with a dynamic fee hook might charge you 1.5% during volatility instead of the 0.30% you expected. The Uniswap interface shows the hook attached to each pool, and you can click through to see the hook contract on Etherscan. Trusted hooks are flagged as verified, and the community maintains lists of hooks that have been audited or used at scale.
For arbitrage and routing, V4 is already where the action is. Most DEX aggregators including 1inch, Matcha, Paraswap, and CoW Swap have integrated V4 as a primary routing source. UniswapX, the off-chain order book that settles on chain, also routes through V4 when filler bots find V4 pools with better execution than alternatives. If you are running a trading strategy in 2026, you need V4 in your routing graph or you are leaving money on the table.
How to Deploy a Hook as a Developer
For developers, the V4 stack is well documented and surprisingly approachable. The official repositories are v4-core, which contains the PoolManager and all the core math, and v4-periphery, which contains common hook patterns, position managers, and routers. Both are written in Solidity and use Foundry for testing. Here is the high-level flow for deploying your own hook.
BaseHook.sol. Override the lifecycle functions you want, like beforeSwap or afterSwap, and return the appropriate flags from getHookPermissions().HookMiner helper to find a salt that produces an address matching your hook flags.forge script or a CREATE2 factory to deploy your hook at the mined address. Verify on Etherscan.PoolManager.initialize() with the pool key including your hook address. The pool is now live.The most important thing to understand as a developer is that hooks are extremely sensitive code. A bug in your hook can drain every LP position in any pool that uses it. Hooks should be treated with the same rigor as the core protocol: formal verification when possible, multiple independent audits, extended testnet periods, and ideally a bug bounty before mainnet deployment. The Uniswap Foundation maintains a grant program that funds audits for promising community hooks.
For learning, the official Uniswap V4 documentation at docs.uniswap.org includes a hook tutorial with worked examples. There are also third-party courses from Cyfrin Updraft, Patrick Collins on YouTube, and the Atrium Academy that walk through hook design patterns and gotchas. If you can write a Solidity contract and use Foundry, you can deploy a simple hook in a weekend.
UNI Tokenomics and Governance
The UNI token was launched in September 2020 with a fixed maximum supply of 1 billion tokens, vesting over four years to team, investors, advisors, and a community treasury. As of mid-2026, roughly 600 million UNI are in circulation. UNI is the governance token of the Uniswap DAO, which controls the deployment of new protocol versions, the activation of the fee switch, the treasury, and grants to ecosystem contributors.
The big tokenomics story of 2026 is the activation of the fee switch on V4 pools. After years of debate, the DAO voted in February 2026 to enable a 10% protocol fee on a subset of high-volume V4 pools, with the proceeds flowing to UNI stakers who lock their tokens through the new Uniswap staking module. This converted UNI from a pure governance token into a yield-bearing asset, similar to the evolution that other DeFi tokens have gone through. The change has been controversial. Supporters argue it aligns long-term incentives and rewards real protocol usage, while critics worry about the regulatory implications of paying yield to token holders.
Governance proposals go through a multi-stage process. A temperature check on the forum, an off-chain Snapshot vote, and finally an on-chain governance vote with a two-day timelock before execution. The two-day timelock is non-negotiable and is a significant defense against governance attacks. Major decisions like the fee switch activation typically require 40 million UNI in support to pass, a threshold that has only been met a handful of times in the DAO's history.
Risks and Considerations
V4 is the most powerful AMM ever deployed, but it comes with new risks that did not exist in earlier versions. Hooks are the biggest source of those risks. A malicious or buggy hook can do almost anything to a pool, including taking a portion of every swap, blocking liquidity withdrawals, or front-running its own users. Before providing liquidity to a V4 pool or routing a large trade through one, you should check what hook is attached, whether it has been audited, and what permissions it has.
Singleton risk is real but mitigated. The PoolManager is a single contract holding billions of dollars in TVL. A critical bug would be catastrophic. Uniswap addressed this with the most thorough audit campaign in DeFi history, formal verification of the core math, and the largest bug bounty ever offered, but you should still be aware that you are taking concentrated smart contract risk in a way that V3's per-pool architecture spread across many contracts.
MEV is still a concern, though less so than in V3. Hooks like Sorella's Angstrom redistribute MEV back to LPs, but most pools do not use these hooks. If you are doing large swaps on a vanilla V4 pool, you still need to use private mempools or aggregators like CoW Swap that protect against sandwich attacks. The default app.uniswap.org interface now routes most large trades through MEV-protected paths, but if you are interacting with V4 directly through your own contracts, you need to handle this yourself.
Finally, hook diversity has created a fragmentation problem. The same token pair might exist in five or ten V4 pools with different hooks, plus several V3 pools, plus pools on other DEXes. Liquidity is now spread thinner per individual pool than it was in V3. Aggregators handle this fragmentation well for users, but LPs need to think carefully about which pool will actually attract enough volume to compensate them for the impermanent loss of providing liquidity there.
Frequently Asked Questions
Q When did Uniswap V4 launch on mainnet?
Uniswap V4 launched on Ethereum mainnet on January 30, 2026, with simultaneous deployments on Arbitrum, Base, Optimism, Polygon, and BNB Chain. The launch followed more than two years of development, audits, and bug bounties.
Q What is the difference between Uniswap V3 and V4?
V3 introduced concentrated liquidity but kept the rigid one-contract-per-pool architecture. V4 keeps concentrated liquidity but adds three major innovations: a singleton PoolManager that holds every pool, flash accounting that nets balances at the end of a transaction, and hooks that let developers inject custom logic into the lifecycle of any swap or liquidity event. The result is roughly 50% gas savings on multi-hop swaps and unlimited customizability.
Q What is a Uniswap V4 hook?
A hook is a smart contract that you attach to a V4 pool at creation time. The PoolManager calls specific functions on the hook at specific points in the pool's lifecycle, like beforeSwap or afterSwap. This lets the hook add features like limit orders, dynamic fees, or KYC gating without modifying the core protocol.
Q Is Uniswap V4 safe to use?
The core protocol has been audited by Trail of Bits, OpenZeppelin, Certora, and ABDK, and went through a $15 million bug bounty. The PoolManager itself is widely considered one of the most thoroughly reviewed smart contracts in DeFi. However, hooks attached to specific pools can introduce risks. Always check which hook a pool uses and whether it has been independently audited before depositing significant capital.
Q Do I need to do anything to use Uniswap V4 instead of V3?
No. If you use the app.uniswap.org interface or any major DEX aggregator, V4 routing is automatic. The front end routes through V4 pools whenever they offer better execution. Your wallet, signing flow, and approval process remain identical.
Q Can I migrate my V3 liquidity positions to V4?
Not automatically, but the Uniswap front end provides a one-click migration tool that closes your V3 position, swaps any imbalance, and opens an equivalent V4 position in a vanilla pool (or in a hooked pool of your choice). Most LPs who have migrated report better fee capture on V4 due to lower swap costs attracting more volume.
Q What is flash accounting in Uniswap V4?
Flash accounting is the system that lets V4 net token balances at the end of a transaction instead of settling every intermediate step. When you interact with the PoolManager, it tracks how much your contract owes or is owed in each token, and only performs actual ERC20 transfers at the very end when you call settle(). This saves substantial gas on complex multi-step transactions.
Q Is V4 just for developers or can normal traders use it?
Both. Traders interact with V4 through the same interfaces they used for V3, with no learning curve. Developers can build custom hooks to deploy specialized markets, which expands what is possible on the protocol. Most of V4's benefits, including lower gas and better execution from custom liquidity strategies, flow to ordinary traders automatically.
Conclusion
Uniswap V4 is more than an upgrade. It is a re-architecture of decentralized trading that turns a single application into a platform for unlimited specialized markets. The singleton PoolManager makes pool creation effectively free. Flash accounting cuts gas costs on the operations that matter most. And the hooks system lets anyone deploy a pool with custom logic for limit orders, dynamic fees, TWAMM execution, MEV redistribution, KYC, custom oracles, or anything else a developer can imagine.
For traders, the practical impact is already visible. Better execution, lower fees on long-tail pairs, and access to new markets that simply could not exist on V3. For liquidity providers, V4 opens up a whole new design space for active liquidity management, from vault-based strategies that abstract complexity to just-in-time hooks that capture maximum value from incoming flow. For developers, V4 is the most expressive AMM platform ever shipped, with audited foundations and a clear path to deploying production code.
The protocol launched in January 2026 and has already captured roughly 20% of Ethereum mainnet DEX volume in its first quarter. By the end of 2026, most analysts expect that share to grow past 50%, and V3 to start its long sunset as a legacy version. If you are building anything that touches on-chain liquidity in 2026 or beyond, you are building on top of V4 whether you know it or not. The sooner you understand what the singleton, flash accounting, and hooks system make possible, the better positioned you are to take advantage of the next decade of DeFi innovation.