What Is Uniswap? AMM, Liquidity Pools, Fees and UNI Token Explained (2026)

Learn what Uniswap is, how its AMM and liquidity pools work, where trading fees come from, and how the UNI token fits into the protocol.
Intent check: This page is the definition-first explainer for Uniswap and AMM mechanics. If you want the beginner swap walkthrough, read How to Swap Tokens on Uniswap. If you want the broader interface guide with slippage and LP basics, read How to Use Uniswap. If you want the LP-specific guide for fee tiers, ranges, and impermanent loss, read How to Provide Liquidity on Uniswap.
What is Uniswap?
- The decentralized finance (DeFi) landscape relies on liquidity infrastructure to facilitate permissionless asset exchanges. At the absolute center of this ecosystem is Uniswap, the pioneer of the Automated Market Maker (AMM) model and the dominant decentralized exchange (DEX) by trading volume.
- Originally launched as a proof-of-concept to demonstrate that peer-to-pool trading could replace traditional financial matching engines, Uniswap DEX has evolved into an institutional-grade infrastructure layer.
- The protocol has fundamentally restructured how digital assets are issued, priced, and traded across public blockchains. This guide provides an analysis of Uniswap’s architecture, its evolutionary roadmap from v1 to v4, the mechanics of custom hooks, and the tokenomics of the native governance token.

1. The Origin of the Automated Market Maker (AMM)
- Traditional financial institutions and centralized cryptocurrency exchanges (CEXs) rely on an order book model. This layout requires continuous matching between individual limit buy and sell orders, a process requiring market makers to maintain narrow spreads. In early blockchain environments, the high latency and transaction costs made matching order books directly on-chain structurally impossible.
Uniswap solved this barrier by deploying the Automated Market Maker (AMM) framework.
Peer-to-Pool Architecture: Instead of matching buyers with specific sellers, users trade directly against a smart contract repository known as a liquidity pool.
Liquidity Provisioning: Anyone can become a Liquidity Provider (LP) by depositing an equivalent dollar value of two separate assets into a pool. In return for locking up their assets, LPs earn a pro-rata share of the transaction fees generated by users executing swaps.
The Constant Product Model: To discover prices mathematically without an external feed, early iterations relied on a fixed balance constraint. The protocol ensures that the relative ratio of the two assets within a pool adjusts programmatically during every swap, causing the token price to move automatically based on buy or sell volume.
2. Architectural Evolution: From v1 to v4
Uniswap's design history reflects the continuous search for greater gas optimization, capital efficiency, and system flexibility.
[v1: ETH-ERC20 Only] -> [v2: Direct ERC20 Pairs] -> [v3: Concentrated Liquidity] -> [v4: Modular Hooks Platform]
The Early Foundations (v1 and v2)
- Launched in late 2018, Uniswap v1 proved the viability of AMMs but was structurally limited: every pool required Ethereum as one side of the trading pair. The launch of Uniswap v2 resolved this bottleneck by enabling direct token-to-token trading pairs (such as USDC/USDT) and introducing native on-chain price oracles, transforming the DEX into a core price-discovery machine for the broader ecosystem.
Uniswap v3: Concentrated Liquidity
Uniswap v3 introduced Concentrated Liquidity, fundamentally altering the economics of capital deployment.
In legacy AMMs, liquidity was distributed uniformly across an infinite price scale, meaning the vast majority of deposited assets sat unused.
Uniswap v3 allowed LPs to bound their capital within specific price intervals. For instance, an LP could choose to allocate liquidity for a stablecoin pair strictly between 0.99 and 1.01.
This concentration dramatically improved capital efficiency, allowing smaller pools to support massive trading volumes with minimal price slippage. However, it turned liquidity provisioning into an active management strategy, as capital falling outside the active price interval stops earning fees and faces higher exposure to impermanent loss.
Uniswap v4: The Modular Infrastructure Layer
- Uniswap v4 transforms the protocol from a standalone token-swap engine into an open, customizable developer ecosystem. While v3 institutionalized efficient trading, its smart contracts were rigid and unalterable post-deployment. Version v4 introduces modular customizability while simultaneously optimizing core execution costs.
3. Deep Dive into Uniswap v4: Hooks and Singleton Architecture
The current operational standard of Uniswap is defined by three technical pillars introduced in its modular layout: Hooks, the Singleton design, and Flash Accounting.
+-----------------------------------------+ | PoolManager | | (Single Master Smart Contract) | +-----------------------------------------+ / | \ / | \ [v4 Pool: ETH/USDC] [v4 Pool: WBTC/USDT] [v4 Pool: UNI/WETH] | | | {Custom Hook} {Custom Hook} {Custom Hook} - Limit Orders - Dynamic Fees - MEV Rebates
The Power of Hooks
Hooks are external smart contracts that plug directly into a liquidity pool's lifecycle. They allow developers to execute custom code at specific transactional junctions, such as before or after a swap, or during an LP deposit or withdrawal. This architectural shift enables natively integrated features that previously required third-party wrappers:
Native Limit Orders: Executing standard buy or sell triggers at precise on-chain price points.
Dynamic Fee Allocation: Adjusting pool swap fees automatically based on real-time market volatility data.
Automated MEV Internalization: Redirecting value that would normally be captured by predatory bots back into the hands of the liquidity providers.
Custom Oracle Integration: Generating tailored time-weighted average price feeds directly from the pool state.
The Singleton Architecture
- In all previous versions of Uniswap DEX, every distinct trading pair required the deployment of an entirely independent smart contract on-chain. This structure was gas-intensive, requiring multiple token transfers across separate contracts during multi-hop route swaps.
- Uniswap v4 replaces this with the Singleton Contract model. All liquidity pools live inside a single, unified master smart contract called the
PoolManager. By storing the state of every trading pair collectively, the gas cost associated with initializing new token pools is compressed by up to 99.99%, lowering the barrier to entry for early-stage asset deployments.
Flash Accounting
- To complement the Singleton contract, Uniswap DEX uses Flash Accounting. Instead of physically transferring tokens in and out of individual contracts after every single leg of a multi-pool trade, the protocol tracks net balance changes internally.
- It calculates the final net balance across the entire transaction chain and executes a single token transfer at the absolute end of the transaction block, optimizing transaction processing fees.
4. The UNI Token and the "UNIfication" Fee Switch
What is Uniswap (UNI) token
- The native UNI token was introduced to decentralize the protocol’s operations, putting control of a multi-billion-dollar treasury and core protocol settings directly into the hands of a decentralized autonomous organization (DAO).
- For years, the token faced critique for acting as a pure governance asset without direct value capture, as 100% of swap revenues went straight to liquidity providers. However, the implementation of the "UNIfication" initiative fundamentally altered the token's economic alignment.
The Fee Switch and Burn Mechanism
The governance architecture activated the protocol-level fee switch. This update establishes a direct economic link between the exchange’s overall transaction volume and the token's circulating supply:
Fee Accumulation: When a swap occurs across supported v2, v3, or Unichain networks, a defined fraction of the existing trading fee is programmatically directed to the protocol instead of the LP.
The TokenJar: These collected fees accrue across multiple blockchain layers into a specialized smart contract called the
TokenJar.The Firepit: The accumulated assets are programmatically bridged back to the Ethereum mainnet and routed to the
Firepitcontract. This infrastructure automatically uses the accumulated fee capital to purchase UNI tokens directly from the open market and routes them to a permanent burn address, introducing a structural deflationary engine to the tokenomics.
Technical Trade-offs and Market Realities
Ecosystem Structural Evaluation
Systemic Advantages
Developer Customizability: The hook framework converts Uniswap into an application platform, allowing external teams to build custom lending, yield, and algorithmic trading layers directly on top of native liquidity pools.
Drastic Cost Optimizations: The combination of Singleton contracts and Flash Accounting provides significant gas savings for complex, multi-hop trades.
Aligned Tokenomics: The active fee switch removes the "governance-only" discount from the UNI token, creating a transparent, value-accruing asset supply contraction mechanism.
Structural Vulnerabilities
Smart Contract Attack Surface: While hooks allow for infinite innovation, they introduce critical vulnerabilities. A poorly audited or malicious hook contract can introduce code vectors that expose the underlying LP capital to exploits.
LP Margin Compression: The protocol fee switch acts as a direct take-rate from the revenue margins of liquidity providers. In highly competitive alternative Layer 2 environments, Uniswap must balance fee collection with yield competitiveness to prevent LPs from migrating to alternative DEX networks.
MEV Vulnerability: As the primary destination for on-chain volume, Uniswap DEXes pools remain a prime target for sandwich attacks and arbitrage extraction, requiring users to rely on private RPC nodes or MEV-resistant hook strategies during high-slippage market events
Remember: you can access DEXTools here and start trading easily and securely today!
Disclaimer: This article is for informational purposes only and does not constitute investment advice, financial advice, trading advice, or any other kind of advice. DEXTools does not recommend buying, selling, or holding any cryptocurrency or token. Users should conduct their own research and consult with a qualified financial advisor before making any investment decisions. Cryptocurrency investments are volatile and high-risk. DEXTools is not responsible for any losses incurred.