Liquidity Pools Explained
AMM liquidity pools replace order books by letting you trade against pooled assets governed by math. You'll learn how pools price trades, reward LPs, and where impermanent loss comes from.
Who Is This For?
- •DeFi users considering providing liquidity
- •Traders curious about how AMM pricing works
Learning Objectives
- 01Explain constant product pricing (x × y = k)
- 02Describe how LPs earn fees and face impermanent loss
- 03Decide when concentrated liquidity makes sense
Pool Mechanics
Instead of matching buyers with sellers, AMMs use a mathematical formula to price every trade automatically.
📐 The Constant Product Formula
When you trade, you add one token and remove the other. The formula ensures the product stays constant, which automatically adjusts the price. Bigger trades shift the ratio more, creating slippage.
AMM Trade Simulator
See how trades affect pool price and slippage:
High slippage! This trade is large relative to pool size. In practice, you'd want a deeper pool or to split into smaller trades.
How Liquidity Providing Works
Deposit equal dollar value of both tokens (e.g., $5,000 ETH + $5,000 USDC). Receive LP tokens representing your pool share.
Every trade pays a fee (0.3% on Uniswap v2). Fees accumulate in the pool. Your LP tokens represent a growing share.
Burn LP tokens to claim your share. You'll receive both tokens — but the ratio may have changed (impermanent loss).
Impermanent Loss
The most misunderstood concept in DeFi. When prices change, your LP position underperforms simply holding the tokens.
Why Does It Happen?
Pool Rebalances
When the price of one token rises, arbitrageurs trade with the pool to profit from the mispricing. This rebalances your position.
You Sell the Winner
The pool ends up with less of the token that went up and more of the one that went down. You effectively sold the winner.
It's "Impermanent"
If prices return to the original ratio, the loss disappears. But if you withdraw at a different ratio, the loss becomes realized.
Impermanent Loss Calculator
See how price changes affect your LP position vs just holding:
Just Holding (No LP)
LP Position (Before Fees)
Note: This is before fees. If trading fees earned exceed the IL, LPing was still profitable. That's the tradeoff every LP must evaluate.
IL Quick Reference
| Price Change | IL % | Verdict |
|---|---|---|
| ±25% | ~0.6% | Negligible — fees likely cover it |
| ±50% | ~2.0% | Noticeable — check fee income |
| 2x (doubles) | ~5.7% | Significant — need high fees |
| 3x (triples) | ~13.4% | Painful — fees rarely cover it |
| 5x | ~25.5% | Severe — likely net loss |
Advanced Designs
The basic x×y=k model has evolved. Modern AMMs offer better capital efficiency and lower slippage.
Compare AMM Designs
Concentrated Liquidity
Uniswap v3, PancakeSwap v3
Instead of spreading liquidity across all prices (0 to ∞), you choose a specific price range. Your capital is much more efficient within that range, earning proportionally higher fees.
Pros
- ✓ Much higher capital efficiency (up to 4000x)
- ✓ More fees per dollar of liquidity
- ✓ Customizable risk/reward
- ✓ Works great for stable pairs
Cons
- ✗ Requires active management
- ✗ Earns nothing outside your range
- ✗ Higher impermanent loss risk
- ✗ Gas costs for rebalancing
Active LPs who monitor positions and pairs with predictable price ranges
Concentrated Liquidity Simulator
Set a price range and see how it affects capital efficiency:
Common Mistakes & Gotchas
Golden Rule: Only provide liquidity to pairs where you'd be happy holding both tokens long-term. The pool will give you more of whichever token drops — make sure that's okay with you.
Knowledge Check
Let's see how well you understood the material. Answer all 5 questions below.
What formula governs many AMMs?
Why does impermanent loss happen?
When might concentrated liquidity be useful?
What causes more slippage in an AMM trade?
Why are stable pair pools lower risk for LPs?