The mechanics of Uniswap v4 hooks
Uniswap v4 introduces hooks that allow developers to customize pool behavior and market structures with 99.99% lower deployment costs. The architecture utilizes singleton pools and flash accounting to consolidate liquidity into a single smart contract.
Custom logic and deployment efficiency
Uniswap v4 released on January 31, 2025. This version introduced hooks, which are contracts that customize how individual pools, swaps, fees, and liquidity provider positions interact. Developers use hooks to create new types of market structures, more assets, and new functionality on top of the protocol. The v4 architecture incorporates singleton pools and flash accounting. Users create pools at a 99.99% lower cost than in previous versions. Gas costs for managing liquidity positions are also lower. Because the codebase received hundreds of pull requests from the community, the protocol supports a vast array of custom logic. The Uniswap Labs, Uniswap Foundation, Certora, and Cantina teams conducted a $2.35M security competition to review the code and ensure that the v4 architecture remains secure for all users and all liquidity providers within the ecosystem. You should understand that these hooks change how pools behave without requiring a full protocol upgrade. This version also consolidates liquidity into a single smart contract. The introduction of hooks allows for the creation of custom logic for how pools and swaps interact. Hayden Adams, a former mechanical engineer at Siemens, founded Uniswap in 2018. He was inspired by a blog post written by Vitalik Buterin, the co-founder of Ethereum. The protocol allows users to exchange cryptocurrencies directly from their wallets. The implementation of the automated market maker model was his primary goal.
Governance and economic modifications
In December 2025, Uniswap governance approved the UNIfication proposal. This decision enables protocol fees through a fee switch and introduces a deflationary mechanism tied to protocol revenue. The UNIfication proposal modifies the fee structure for existing pools.
| Pool Version | Liquidity Provider Fee | Protocol Fee |
|---|---|---|
| Uniswap v2 | 0.25% | 0.05% |
| Uniswap v3 | Variable | Portion of LP fees |
The proposal also mandates a one-time burn of 100 million UNI from the treasury after a timelock period. An ongoing burn mechanism uses protocol fees and sequencer revenue from Unichain to fund additional token destruction. The Uniswap Foundation, which Devin Walsh and Ken Ng established in 2022 after 95% of UNI holders voted in favor, manages the development of the Uniswap Protocol and provides consistent, regular communication among all contributors. The Foundation’s Uniswap Unleashed proposal outlined plans to make the Uniswap Protocol the infrastructure for digital value transfer through major support for v4 and Unichain. This plan aims to bolster the protocol through the development of the Uniswap DAO. The governance of the protocol rests with holders of the UNI token, who vote on protocol upgrades and changes.
Liquidity management and version history
Liquidity providers add pairs of tokens to a smart contract to provide liquidity for the exchange. In Uniswap v4, the PositionManager manages positions using ERC-6909 for internal accounting. This differs from Uniswap v3, where positions use ERC-721 NFTs via the NonfungiblePositionManager. The protocol uses an automated market maker model where users trade against a pool’s reserves. This model uses a formula where the product of the two token reserves remains constant. While the v3 version introduced concentrated liquidity, the v4 version maintains this while adding architectural changes like singleton pools. The protocol remains permissionless, which means any user can swap tokens or provide liquidity without centralized gatekeepers. The Uniswap Foundation continues to support the development of the protocol through the Uniswap DAO. This organization also manages communication among contributors and the development of the Uniswap Protocol. Uniswap v2, which launched on November 2, 2018, introduced ERC-20 pairs, price oracles, and flash swaps. In v3 and v4, the constant product formula applies within each liquidity provider’s chosen price range. The formula ensures that larger trades relative to pool depth move the price more. Conversely, smaller trades execute closer to the spot price. This mechanism helps maintain liquidity across the protocol. Does the concentration of liquidity in single smart contracts increase the risk for individual liquidity providers?
Join the discussion