Liquidity Pools
Liquidity pools are the engine of decentralized exchanges. Instead of matching buyers and sellers through an order book, AMMs use pools of tokens and math to enable trading. Understanding them is essential for DeFi.
How Liquidity Pools Work
The Concept
A liquidity pool is a smart contract holding two (or more) tokens. Traders swap against the pool rather than another trader.
Example: An ETH/USDC pool holds:
- 100 ETH
- 300,000 USDC
A trader who wants to buy ETH sends USDC to the pool and receives ETH from it.
The Constant Product Formula
Most AMMs (Uniswap, Raydium) use:
x × y = k
Where:
- x = Amount of Token A in pool
- y = Amount of Token B in pool
- k = Constant (doesn't change during a swap)
Example:
- Pool: 100 ETH × 300,000 USDC = 30,000,000 (k)
- Trader buys 1 ETH
- New pool: 99 ETH × ? USDC = 30,000,000
- ? = 30,000,000 / 99 = 303,030 USDC
- Trader paid: 303,030 - 300,000 = 3,030 USDC for 1 ETH
- Effective price: $3,030 per ETH
Notice: the price moved slightly because of the swap. This is price impact.
Price Impact & Slippage
- Small pool + Big trade = Large price impact (bad)
- Large pool + Small trade = Minimal price impact (good)
This is why deep liquidity matters. Larger pools mean better prices for traders.
Being a Liquidity Provider (LP)
How to Provide Liquidity
- Deposit an equal value of both tokens into a pool
- Receive LP tokens representing your share of the pool
- As trades happen, you earn a portion of the trading fees
- When you withdraw, you redeem LP tokens for your share of the pool
What You Earn
- Trading fees: Usually 0.2-0.3% of every swap, proportional to your pool share
- Protocol incentives: Some pools offer bonus token rewards
- Fee income compounds automatically in most AMMs
The Math
If a pool does $1M in daily volume with a 0.3% fee:
- Daily fees generated: $3,000
- If you own 1% of the pool: $30/day
Volume drives LP returns, not token price.
Impermanent Loss (IL)
This is the most important concept for LPs to understand.
What It Is
When the price ratio of the two tokens changes from when you deposited, you end up with a different ratio than you started with. You'll have more of the token that went DOWN and less of the one that went UP.
Example
You deposit:
- 1 ETH ($3,000) + 3,000 USDC = $6,000 total
ETH price doubles to $6,000:
- If you had just held: 1 ETH ($6,000) + 3,000 USDC = $9,000
- In the pool: ~0.707 ETH ($4,243) + 4,243 USDC = $8,486
Impermanent loss = $9,000 - $8,486 = $514 (5.7%)
You still made money ($8,486 vs $6,000 starting), but less than if you just held.
Why "Impermanent"?
If the price ratio returns to where it was when you deposited, the loss disappears. It only becomes permanent when you withdraw at a different ratio.
IL by Price Change
| Price Change | Impermanent Loss | |-------------|-----------------| | ±25% | 0.6% | | ±50% | 2.0% | | ±100% (2x) | 5.7% | | ±200% (3x) | 13.4% | | ±400% (5x) | 25.5% |
The more the price diverges, the worse IL gets. This is exponential, not linear.
Choosing Pools Wisely
Low IL Risk
- Stablecoin/Stablecoin pairs (USDC/USDT) — prices barely diverge
- Correlated pairs (ETH/stETH) — prices move together
Medium IL Risk
- Major pairs (ETH/USDC, BTC/USDC) — some IL but high volume = more fees
High IL Risk
- Small cap / Volatile pairs — massive price swings = massive IL
- New token launches — price can 10x or crash 90%
Concentrated Liquidity
Newer AMMs (Uniswap v3, Orca Whirlpools) let you concentrate your liquidity in a specific price range.
Advantages
- Higher capital efficiency — your liquidity is focused where trades happen
- Higher fee earnings — earning from a narrower range means higher % returns
Disadvantages
- More active management — if price moves out of your range, you earn nothing
- Higher impermanent loss — concentration amplifies IL
Who Should Use It
- Active DeFi users who monitor positions
- Traders who have a view on price range
- Not recommended for passive, set-and-forget LPs
LP Strategy Tips
- Fees must exceed IL — this is the break-even equation for LPs
- High volume pools with stable pairs are the safest starting point
- Don't LP with tokens you don't want to hold — IL means you'll end up with more of the loser
- Monitor your position — don't just deposit and forget
- Factor in incentives — protocol rewards can offset IL significantly
Key Takeaway
Liquidity pools are how decentralized trading works. As an LP, you earn trading fees but face impermanent loss. The key is selecting pools where trading fees generated > impermanent loss suffered. Start with stable pairs, understand the math, and only move to volatile pairs when you can actively manage the risk.