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.

When you swap tokens on a decentralized exchange, no counterparty sits on the other side of your trade. Instead, it all runs through the infrastructure at the heart of DeFi: liquidity pools and Automated Market Makers (AMMs). Understanding how these work puts you in a much stronger position as a trader or liquidity provider.
What Are AMMs and Liquidity Pools?
When you swap tokens on a decentralized exchange (DEX), 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
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 the 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 most significant 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
Liquidity provision is one of the core strategies in yield farming. Before committing capital, every LP must understand both the upside and the downside.
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)
Impermanent loss is 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 (HODLed). The name "impermanent" is somewhat misleading â it only becomes permanent when you withdraw at an unfavorable ratio.
Warning
2025 data shows that 54.7% of Uniswap v3 LPs in volatile pairs lost money. Only 37.2% of non-stablecoin positions ended in profit. The majority set price ranges too wide or failed to adjust them as markets moved.
IL by Price Change
| Price Change | Impermanent Loss |
|---|---|
| Âą25% | ~0.6% |
| Âą50% | ~2.0% |
| Âą75% | ~3.8% |
| 2Ă increase | ~5.7% |
| 3Ă increase | ~13.4% |
| 5Ă increase | ~25.5% |
How to Minimize Impermanent Loss
- Choose stable pairs: USDC/USDT or similar low-volatility pairs
- Correlated assets: ETH/stETH or similar tokens that tend to move together
- Set appropriate ranges: Not too narrow (frequent rebalancing) or too wide (low capital efficiency)
- Use higher fee tiers: Opt for the 1% fee tier on volatile pairs to offset IL risk
- Rebalance regularly: Monitor positions and adjust as price moves
Tip
Starting with stablecoin pairs like USDC/USDT on Curve is an excellent way to learn the mechanics with near-zero impermanent loss risk before moving to more volatile pairs.
Getting Started as an LP
Step 1: Prepare
- Set up a crypto wallet (MetaMask, Rabby, etc.)
- Hold native tokens for gas fees on your chosen chain
- 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 a price range (for concentrated liquidity)
- Enter deposit amount and approve the transaction
- Receive your LP token or NFT position
Note
Start with a small amount ($50â$100) to learn the mechanics before scaling up. Low-fee chains like Arbitrum, Base, or Solana are recommended â Ethereum L1 gas costs can make small LP positions unprofitable.
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. Stablecoin pairs are the exception, where impermanent loss is minimal.
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 is the practical expression of impermanent loss.
Which chain should I start on?
Low-fee chains like Arbitrum, Base, or Solana are recommended for beginners. 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 before depositing capital.
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. For a broader picture of how AMMs fit into the ecosystem, explore the full DeFi guide and consider reading about DEX vs CEX to understand where AMMs sit relative to centralized alternatives.
Important
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.
Keep learning

Impermanent Loss Explained: The Hidden Risk of DeFi Liquidity
Learn what impermanent loss is, how to calculate it, and how to minimize it in 2026. From the IL formula to Uniswap V4 hooks and options hedging â a complete

DEX vs CEX: Which Crypto Exchange Should You Use?
A complete comparison of decentralized and centralized exchanges. Learn key differences in security, fees, custody, and usability to choose the right exchange

Stablecoins Explained: USDT vs USDC, Types & Yield Strategies
Learn what stablecoins are, how USDT and USDC differ, and how yield-bearing stablecoins work. A complete 2026 guide to the $317B stablecoin market.
Explore related topics

Crypto Scams in 2026: 10 Types and How to Protect Yourself
Crypto scams cost $17B in 2025. Learn the 10 most common scam types â phishing, rug pulls, pig butchering â and a prevention checklist to keep your funds safe.

Bitcoin Hits 20 Million Coins Mined: The Scarcity Era Begins
Bitcoin mined its 20 millionth coin â 95.2% of total supply. The remaining 1 million takes 114 years. What this milestone means for investors and BTC's future.