Liquidity Pools and Impermanent Loss with Numbers
Calculate what a liquidity provider earns and loses, use the impermanent loss formula, and compare fee income with simply holding the tokens.
What you will learn
- How providing liquidity works and what LP tokens are.
- Why price changes create impermanent loss (IL) compared with holding.
- How to use the IL formula and a pool calculation step by step.
- How to judge whether fee income can cover IL.
Explanation
A liquidity provider (LP) deposits two tokens into an AMM pool (Lesson 4), normally in equal value. In return the LP receives LP tokens (or, in some designs, a position NFT, a non-fungible token that is unique) that represent a share of the pool. When the LP withdraws, they receive their share of whatever the pool holds at that moment, plus collected fees.
Where the loss comes from
When the price of one token rises elsewhere, arbitrageurs buy it cheaply from the pool until the pool price matches. The pool therefore ends up holding less of the token that rose and more of the one that fell. Compared with simply holding the two tokens in a wallet ("HODL" value), the LP has less value. This shortfall is impermanent loss. It is called "impermanent" because it shrinks if the price returns to the starting ratio; if you withdraw at the new price, it becomes a real, realised loss.
The formula
For a 50/50 constant-product pool, with r = new price ÷ starting price:
IL = 2 × √r ÷ (1 + r) − 1
| Price change of token A | r | IL versus holding |
|---|---|---|
| +25% | 1.25 | −0.6% |
| +50% | 1.5 | −2.0% |
| +100% (2×) | 2 | −5.7% |
| +200% (3×) | 3 | −13.4% |
| +300% (4×) | 4 | −20.0% |
| −50% | 0.5 | −5.7% |
| −75% | 0.25 | −20.0% |
Note the symmetry: a doubling and a halving give the same percentage IL. IL measures the gap to holding, not the gain or loss versus your starting euros.
Fees versus IL
LPs earn a share of swap fees. Fee income depends on trading volume ÷ pool size: a pool with high volume relative to its liquidity pays more per euro deposited. Fee rates shown as APR (annual percentage rate) are usually based on recent volume and can fall quickly.
Pair choice and concentrated liquidity
- Stable pairs (two stablecoins) have very small IL as long as both hold their peg, but a de-peg (Lesson 3) can leave you holding mostly the failed coin.
- Volatile pairs have larger IL but often higher fees.
- Concentrated liquidity earns more fees per euro inside a chosen price range, but IL inside that range is also amplified, and outside the range you hold 100% of the weaker token and earn no fees.
Worked example
Hypothetical example: you deposit 10 ETH and 20,000 USDC when ETH = $2,000. Value: $40,000. You own the whole pool for simplicity, so k = 10 × 20,000 = 200,000. Gas, taxes and smart-contract risk are excluded.
- ETH rises to $4,000 (r = 2). Arbitrage moves the pool until y ÷ x = 4,000.
- Pool amounts: x = √(k ÷ price) = √(200,000 ÷ 4,000) = √50 = 7.0711 ETH; y = √(k × price) = √800,000,000 = 28,284.27 USDC.
- LP value: 7.0711 × $4,000 + $28,284.27 = $28,284.27 + $28,284.27 = $56,568.54.
- HODL value: 10 × $4,000 + $20,000 = $60,000.
- IL: $56,568.54 − $60,000 = −$3,431.46, which is −5.72%, the same as the formula.
- Suppose the pool earned $1,200 in fees. Net versus HODL: −$3,431.46 + $1,200 = −$2,231.46. Versus your starting $40,000 you are still up $17,768.54, but holding would have been better.
Common mistake
Practice activity
On paper, using the same start (10 ETH + 20,000 USDC, ETH $2,000, k = 200,000): ETH falls to $1,000. Calculate (a) the pool amounts, (b) LP value and HODL value, (c) IL in dollars and percent, (d) the fee income needed to match HODL.
Show solution
(a) x = √(200,000 ÷ 1,000) = √200 = 14.1421 ETH; y = √(200,000 × 1,000) = 14,142.14 USDC.
(b) LP: 14.1421 × $1,000 + $14,142.14 = $28,284.27. HODL: 10 × $1,000 + $20,000 = $30,000.
(c) IL: −$1,715.73, i.e. −5.72% (r = 0.5).
(d) You need $1,715.73 of fees just to match holding.
Limitations: real pools are shared with other LPs, fees accrue over time, and price paths are not a single jump.
Key takeaways
- LPs end up with more of the falling token and less of the rising one.
- IL = 2√r ÷ (1 + r) − 1; it is about −5.7% for a 2× or 0.5× move and −20% for 4× or 0.25×.
- Always compare LP results with holding, after fees, gas and reward-token changes.
- Concentrated liquidity raises both fee income and IL.
Next step
The next lesson moves from trading pools to lending protocols, where collateral and liquidation rules decide your risk.
Self-check
Answer the questions, then check your answers. You can retry as often as you like.
Automatic self-check for your own revision. Your answers are checked in your browser and are not seen or assessed by us. It is not an exam and not a qualification.
Your progress
“Complete” only means you marked the lesson as done. It is not a test of your understanding. Progress and notes are saved only in this browser on this device — not in an account.