Part 4 · Chapter 2

Liquidity Pools Explained

At a Glance

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.

x × y = kLP FeesImpermanent LossConcentrated Liquidity

Who Is This For?

  • DeFi users considering providing liquidity
  • Traders curious about how AMM pricing works

Learning Objectives

  1. 01Explain constant product pricing (x × y = k)
  2. 02Describe how LPs earn fees and face impermanent loss
  3. 03Decide when concentrated liquidity makes sense
Section 1

Pool Mechanics

Instead of matching buyers with sellers, AMMs use a mathematical formula to price every trade automatically.

📐 The Constant Product Formula

x × y = k
Token A quantity × Token B quantity = Constant
x
Amount of Token A in pool
(e.g., 100 ETH)
y
Amount of Token B in pool
(e.g., 200,000 USDC)
k
The constant (never changes)
(100 × 200,000 = 20,000,000)

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:

Pool ETH (x)
100
Pool USDC (y)
200,000
k (constant)
20,000,000
Current Price: 1 ETH = $2,000 USDC
0.3%
Trade Result:
You Pay
$10,000 USDC
You Get
4.7483 ETH
Price Impact
10.22%
Fee to LPs
$30.00
New pool price after trade:1 ETH = $2,204.37 USDC

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
1. Deposit

Deposit equal dollar value of both tokens (e.g., $5,000 ETH + $5,000 USDC). Receive LP tokens representing your pool share.

2. Earn

Every trade pays a fee (0.3% on Uniswap v2). Fees accumulate in the pool. Your LP tokens represent a growing share.

3. Withdraw

Burn LP tokens to claim your share. You'll receive both tokens — but the ratio may have changed (impermanent loss).

Section 2

Impermanent Loss

The most misunderstood concept in DeFi. When prices change, your LP position underperforms simply holding the tokens.

Why Does It Happen?

1
Pool Rebalances

When the price of one token rises, arbitrageurs trade with the pool to profit from the mispricing. This rebalances your position.

2
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.

3
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:

Price Change: +50.0%
Just Holding (No LP)
$12,500
2.5000 ETH + $5,000 USDC
LP Position (Before Fees)
$12,247.45
2.0412 ETH + $6,124 USDC
Impermanent Loss:
$-252.55 (-2.02%)
vs just holding both tokens

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 ChangeIL %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
Section 3

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
Best For:

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:

$0$3,750
$
Lower: $1,500Current: $2,000Upper: $2,500
Status
In Range
Earning fees
Capital Efficiency
7.9x
vs full-range position
Range Width
$1,000
Moderate
Watch Out

Common Mistakes & Gotchas

📉
ETH/SHIB pool has 200% APR — I'm providing liquidity!
High APR on volatile pairs often means massive impermanent loss. Model IL before entering. If the volatile token drops 90%, you'll hold almost all of the worthless token.
📊
This pool has great APR so the fees must be great too
Check the actual trading volume, not just APR. Low-volume pools pay tiny fees. High APR may come from unsustainable token emissions, not real trading activity.
🎯
I'll set a tight range on Uni v3 for maximum efficiency
Tight ranges earn more fees IN range but earn nothing when price moves out. Factor in gas costs to rebalance. For beginners, wider ranges or full-range positions are safer.
🎭
The pool token names look right, I'll deposit here
Always verify the pool contract address on the official DEX interface. Scam tokens with identical names and logos are common. One wrong pool = total loss.

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.

Test Yourself

Knowledge Check

Let's see how well you understood the material. Answer all 5 questions below.

1

What formula governs many AMMs?

2

Why does impermanent loss happen?

3

When might concentrated liquidity be useful?

4

What causes more slippage in an AMM trade?

5

Why are stable pair pools lower risk for LPs?

Next Steps

Continue learning: “Yield Farming Strategies” to see how LP tokens can be stacked for rewards
Hands-on practice: Use an IL calculator like DailyDeFi IL Calculator for a pair you're considering