Liquidity Pools, AMMs & Impermanent Loss
DeFi
• ~10 min read
• Updated: 08/08/2025
1) What is a Liquidity Pool?
A liquidity pool (LP) is a smart contract holding two (or more) tokens. Traders swap against the pool at
a price implied by its balances. When you deposit tokens, you become a Liquidity Provider and receive an
LP token that represents your share of the pool. As trades happen, the pool collects fees that accrue to LPs.
balances plus accumulated fees.
2) The AMM pricing curve: x · y = k
In a constant-product AMM (Uniswap v2-style), if the pool holds x units of token A and y units of token B,
their product k = x·y stays constant during trades (ignoring fees). Buying A adds B to the pool and removes A,
moving along the curve to a new price. Local price ~ y / x.
Start: x = 100 A, y = 100 B → k = 10,000 Trade: Add 10 B (minus fee) → new x', y' s.t. x'·y' = 10,000 Price(A in B) ≈ y'/x' (moves against the trader = slippage)
Concentrated liquidity (Uniswap v3): LPs choose a price range where their capital is active. Inside the
range you earn more fees per dollar; outside the range your position goes “inactive” (no fees) until price returns or you rebalance.
3) Where fees come from
Each swap pays a small fee (e.g., 0.05%–1%), kept inside the pool. Your earnings equal your pool share multiplied by
total fees earned while you’re in-range (for v3) or simply in the pool (v2).
4) Impermanent Loss (IL) explained
Impermanent Loss is the value difference between (A) passively holding your tokens versus (B) providing
them to an AMM, after prices move. When one token outperforms, the AMM continuously rebalances you into “more of the
loser, less of the winner.” The loss becomes permanent when you withdraw. Fees can offset IL, sometimes fully.
Example (simplified 50/50 pool): - Deposit 1 ETH @ $3,000 + 3,000 USDC. - ETH doubles to $6,000. - Arbitrage trades rebalance pool to new price. - If you withdraw, you hold fewer ETH + more USDC than if you had simply held. - Net result = hold PnL − LP PnL = “impermanent loss” (fees help offset).
R = P_new / P_old. IL ≈ 2·√R / (1 + R) − 1 (negative number = loss vs HODL).| Price change (R) | ~IL vs HODL |
|---|---|
| 1.25× | ≈ −0.6% |
| 1.5× | ≈ −2.0% |
| 2× | ≈ −5.7% |
| 3× | ≈ −13.4% |
| 5× | ≈ −25.5% |
5) How to reduce impermanent loss
- Stable/pegged pairs: USDC/DAI or stETH/ETH (closely tracking pairs) minimize divergence.
- Dynamic-fee pools: Protocols that raise fees during volatility can offset IL.
- Concentrated ranges (v3): Tighter ranges earn more fees but need active rebalancing; go wider if you can’t babysit.
- Asset selection: Provide assets you’re happy to hold after big moves (because you may withdraw skewed balances).
- Cost-aware compounding: Consider gas and tax implications when harvesting/rebalancing.
6) Other risks to know
- Smart-contract risk: Bugs in pools/routers can drain funds.
- Oracle/manipulation: Thin or isolated pools are vulnerable around liquidations/price updates.
- MEV & order flow: Large swaps can be sandwiched; use slippage limits and, when possible, MEV-protected order flow.
- Regulatory/counterparty: Tokens with issuer or legal risk can be frozen or delisted, stranding liquidity.
- Concentrated-liquidity risk: Going out-of-range earns zero fees until you adjust.
7) Further learning & resources
- Uniswap Docs — AMM design, v2/v3 mechanics.
- Curve Whitepaper — stable-swap curve (low slippage near peg).
- Balancer — multi-asset pools and custom weights.
- Cyfrin Updraft — secure smart contract development & AMM internals.
- Paradigm Research — AMM theory & liquidity papers.
Staking & Restaking: Risks and Rewards →
