AMM and Liquidity Pools Explained: How DEX Trading Works
Learn how AMMs and liquidity pools power decentralized exchanges. Covers the x*y=k formula, LP returns, impermanent loss, and Uniswap v4 — a 2026 guide.

What Are AMMs and Liquidity Pools?
When you swap tokens on a decentralized exchange (DEX), there's no counterparty on the other side. Instead, your trade executes against a liquidity pool — a reserve of tokens locked in a smart contract. The system managing this process is called an AMM (Automated Market Maker).
A Simple Analogy
Imagine a currency exchange booth that runs 24/7 with no staff.
- Traditional exchange (CEX): A clerk matches buyers and sellers, taking a spread
- AMM exchange (DEX): No clerk. A vault holds two currencies, and a math formula sets the exchange rate automatically. Anyone who deposits currency into the vault (provides liquidity) earns a share of the exchange fees
This is the core infrastructure of DeFi.
How Do AMMs Work?
The Core Formula: x × y = k
The most fundamental AMM formula is the Constant Product Formula.
x × y = k
x = quantity of Token A in the pool
y = quantity of Token B in the pool
k = constant (always maintained)
A Worked Example
An ETH/USDC pool holds 10 ETH and 20,000 USDC:
- k = 10 × 20,000 = 200,000
- Current price: 1 ETH = 2,000 USDC
When someone swaps 1 ETH for USDC:
- Pool now has 11 ETH
- To maintain k = 200,000: USDC = 200,000 ÷ 11 = 18,181.8
- USDC received: 20,000 - 18,181.8 = 1,818.2 USDC
- Effective rate: 1 ETH = 1,818.2 USDC (lower than market price of 2,000)
This difference is slippage. The larger the trade relative to the pool, the greater the slippage.
Types of AMMs
| AMM Type | Protocol | Key Feature | Best For |
|---|---|---|---|
| Constant Product (x×y=k) | Uniswap v2 | Simple, universal | All token pairs |
| Concentrated Liquidity | Uniswap v3/v4 | Focus liquidity in price ranges | Capital efficiency |
| StableSwap | Curve | Optimized for similar-value assets | Stablecoins, LSTs |
| Weighted Pools | Balancer | Custom token ratios | Portfolio-style pools |
Liquidity Pool Structure
Liquidity Providers (LPs)
Users who deposit tokens into a pool are called LPs (Liquidity Providers).
- Deposit two tokens in equal value (e.g., $1,000 ETH + $1,000 USDC)
- Receive LP tokens as proof of deposit
- Earn fee revenue from every trade in the pool
- Withdraw anytime by returning LP tokens
Fee Structures
| Protocol | Base Fee | LP Share | Notes |
|---|---|---|---|
| Uniswap v3 | 0.01–1% (tiered) | 100% | Most flexible fees |
| Curve | 0.01–0.04% | ~50% | Lowest fees for stable pairs |
| PancakeSwap | 0.25% | 68% | Largest on BNB Chain |
| Raydium | 0.25% | 84% | Largest on Solana |
DEX and AMM Market in 2026
Market Size
- DEX share of spot trading: 13.6% (doubled from 6.9% in January 2024)
- Monthly DEX volume: $231.3 billion (January 2026)
- Uniswap TVL: approximately $6.8 billion
DEX Market Share
| Rank | DEX | Market Share | Chain |
|---|---|---|---|
| 1 | Uniswap | ~36% | Ethereum, L2s |
| 2 | PancakeSwap | ~29% | BNB Chain |
| 3 | Raydium | ~27% (Jan surge) | Solana |
| 4 | Aerodrome | ~7% | Base |
| 5 | Curve | – | Ethereum |
Uniswap v4: The Next Evolution
The biggest AMM development in 2026 is Uniswap v4's Hooks system.
- Hooks: Plugin-like smart contracts that add custom logic to individual pools
- Over 150 hooks built by the community
- What's now possible:
- Dynamic fees: Fees that adjust automatically based on market volatility
- Auto-rebalancing: LP positions automatically adjusted to optimal ranges
- Impermanent loss insurance: IL insurance pools funded by protocol fees
- Custom AMM curves: Replace x×y=k with any swap curve
LP Returns and Risks
Sources of Revenue
- Trading fees: Every trade's fee is distributed proportionally to LP share
- Liquidity mining rewards: Some protocols offer additional token incentives
- LP token composability: LP tokens can be used as collateral in other DeFi protocols
Impermanent Loss (IL)
The biggest risk of providing liquidity.
When the price of tokens in your pool changes, you may end up with less value than if you had simply held (HODL).
IL by Price Change
| Price Change | Impermanent Loss |
|---|---|
| ±25% | ~0.6% |
| ±50% | ~2.0% |
| ±75% | ~3.8% |
| 2x increase | ~5.7% |
| 3x increase | ~13.4% |
| 5x increase | ~25.5% |
2025 Real-World Data
- 54.7% of Uniswap v3 LPs in volatile pairs lost money
- Only 37.2% of non-stablecoin positions ended in profit
- 67% of LPs set ranges too wide or didn't adjust, leading to losses
How to Minimize Impermanent Loss
- Choose stable pairs: USDC/USDT or similar low-volatility pairs
- Correlated assets: ETH/stETH or similar tokens that move together
- Set appropriate ranges: Not too narrow (frequent rebalancing) or too wide (low capital efficiency)
- Higher fee tiers: Use 1% fee tier for volatile pairs
- Regular rebalancing: Monitor and adjust positions periodically
Getting Started as an LP
Step 1: Prepare
- Set up a crypto wallet (MetaMask, Rabby, etc.)
- Hold native tokens for gas fees
- Prepare two tokens of equal value to deposit
Step 2: Recommended Strategies for Beginners
| Strategy | Example Pair | Expected APY | IL Risk |
|---|---|---|---|
| Safest | USDC/USDT (Curve) | 2–5% | Near zero |
| Moderate | ETH/USDC (Uniswap) | 5–15% | Medium |
| High risk | Memecoin/SOL | 50–200%+ | Very high |
Step 3: Execute
- Visit a DEX (e.g., app.uniswap.org)
- Navigate to "Pool" or "Liquidity"
- Select your token pair and fee tier
- Set price range (for concentrated liquidity)
- Enter deposit amount and approve the transaction
- Receive your LP token or NFT position
Start with a small amount ($50–$100) to learn the mechanics before scaling up.
FAQ
Is providing liquidity guaranteed profit?
No. You only profit when trading fee revenue exceeds impermanent loss. 2025 data shows that over half of LPs in volatile pairs lost money.
Can I withdraw liquidity anytime?
Yes. Return your LP tokens to withdraw your deposited assets at any time. However, the token ratio may differ from when you deposited.
Which chain should I start on?
Low-fee chains like Arbitrum, Base, or Solana are recommended. Ethereum L1 gas costs can make small LP positions unprofitable.
Conclusion
AMMs and liquidity pools are the beating heart of DeFi. They let anyone become a "market maker" and earn trading fees — without a bank, broker, or license. But impermanent loss is a real risk that every LP must understand.
In 2026, innovations like Uniswap v4 Hooks are significantly improving LP profitability and user experience. The key is to understand the mechanics and choose a strategy that matches your risk tolerance.
Disclaimer: This article is for informational purposes only and is not financial advice. Providing liquidity carries risks including impermanent loss and smart contract vulnerabilities. Always participate at your own discretion. NFA/DYOR.