Every DeFi tutorial mentions impermanent loss. Most wave it away with “but you earn fees!” without quantifying whether the fees actually compensate. This post does the math properly — deriving the IL formula from first principles, calculating real P&L under different scenarios, and showing exactly when LP provision is profitable.
Table of contents
Open Table of contents
What Is Impermanent Loss?
When you provide liquidity to an AMM (like Uniswap), you deposit two tokens in a fixed ratio. As prices change, arbitrageurs rebalance the pool to reflect market prices. This rebalancing means you end up holding a different token ratio than you started with — and that different ratio is always worth less than if you’d simply held the original tokens.
The loss is “impermanent” because it disappears if prices return to their original ratio. It becomes permanent when you withdraw liquidity at a different price ratio.
The Mathematical Derivation
Start with a Uniswap V2 pool with tokens X and Y:
Initial state:
- Reserve X:
x₀ - Reserve Y:
y₀ - Price:
P₀ = y₀/x₀(price of X in terms of Y) - Invariant:
k = x₀ · y₀
You own a fraction s of the pool, so your position is worth:
V_pool₀ = s · (P₀ · x₀ + y₀) = 2s · y₀(Equivalent to 2 × P₀ × s × x₀ = twice the value of your X holdings. The pool always has equal value in both tokens by construction.)
Now price changes to P₁ = r · P₀ where r = P₁/P₀ is the price ratio.
After arbitrage, the pool rebalances to maintain k:
x₁ · y₁ = k = x₀ · y₀y₁/x₁ = P₁ = r · P₀Solving:
x₁ = x₀ / √ry₁ = y₀ · √rYour pool position value at the new price:
V_pool₁ = s · (P₁ · x₁ + y₁) = s · (r·P₀ · x₀/√r + y₀·√r) = s · (P₀·x₀·√r + y₀·√r) = s · √r · (P₀·x₀ + y₀) = s · √r · 2y₀ = 2s · y₀ · √rIf you’d just held (not provided liquidity):
V_hold₁ = s · (P₁ · x₀ + y₀) = s · (r·P₀·x₀ + y₀) = s · y₀ · (r + 1) [since P₀·x₀ = y₀] = s · y₀ · (r + 1)Impermanent Loss:
IL = V_pool₁/V_hold₁ - 1 = (2√r) / (r + 1) - 1This is the classic IL formula. Let’s verify with intuition:
r = 1(no price change):IL = 2·1/(1+1) - 1 = 0✓r = 2(price doubled):IL = 2√2/(2+1) - 1 ≈ -5.72%r = 4(price 4x):IL = 2·2/(4+1) - 1 = 0.8 - 1 = -20%
The IL Table
| Price change | Price ratio r | IL |
|---|---|---|
| -50% | 0.5 | -5.72% |
| -25% | 0.75 | -0.95% |
| No change | 1.0 | 0% |
| +25% | 1.25 | -0.60% |
| +50% | 1.5 | -2.02% |
| +100% (2x) | 2.0 | -5.72% |
| +200% (3x) | 3.0 | -13.40% |
| +400% (5x) | 5.0 | -25.46% |
| +900% (10x) | 10.0 | -42.46% |
Key observations:
- IL is symmetric: a 2x price increase causes the same IL as a 50% decrease
- IL is always negative (you always lose vs holding)
- IL grows approximately with
|r - 1|²for small changes - At 10x price change, IL is >42%
Real P&L Calculation
IL alone doesn’t tell you if LP is profitable. You need:
Net P&L = Fee revenue - Impermanent lossExample: ETH/USDC Pool
- Initial ETH price: $2,000
- Position size: $10,000 ($5,000 USDC + 2.5 ETH)
- Pool fee tier: 0.3%
- APY from fees (based on pool volume): 15% annually
Scenario A: ETH stays at $2,000 (1 year)
Fee income = $10,000 × 15% = $1,500IL = 0%Net P&L = +$1,500 (+15%)Straightforward. Flat market = fees win.
Scenario B: ETH rises to $3,000 (+50%)
Fee income (assumes 6 months before withdrawal) = $10,000 × 7.5% = $750IL = -2.02% × $10,000 = -$202
But also, the pool value grew: $10,000 × (P₁/P₀ component)...Let me compute this properly.
When ETH = $3,000 (r = 1.5), your pool holdings are:
x₁ = 2.5 / √1.5 = 2.041 ETHy₁ = 5,000 × √1.5 = 6,124 USDC
Pool value = 2.041 × $3,000 + $6,124 = $12,247If you had held: 2.5 × $3,000 + $5,000 = $12,500
IL in dollar terms: $12,247 - $12,500 = -$253
Percentage IL: -253/12,500 = -2.02% ✓ (matches formula)
With $750 in fees:
Net P&L = $12,247 + $750 - $10,000 = +$2,997 (+30%)Hold would have been: $12,500 - $10,000 = +$2,500 (+25%)LP wins by $497 because fees more than compensate for IL.
Scenario C: ETH 5x to $10,000
r = 5, IL = -25.46%
x₁ = 2.5 / √5 = 1.118 ETHy₁ = 5,000 × √5 = 11,180 USDC
Pool value = 1.118 × $10,000 + $11,180 = $22,361
Hold value = 2.5 × $10,000 + $5,000 = $30,000
IL in dollars = $22,361 - $30,000 = -$7,639 (-25.5%)
With fees (assume 1 year at 15% on average position): ~$1,600Net LP P&L: $22,361 + $1,600 - $10,000 = +$13,961 (+139.6%)Hold P&L: $30,000 - $10,000 = +$20,000 (+200%)LP significantly underperforms holding. Fees of $1,600 don’t compensate for $7,639 in IL.
Break-Even Analysis
The critical question: at what fee rate does LP become worth it?
For IL to be compensated by fees:
fee_revenue ≥ |IL| × initial_valuefee_APY × time ≥ |IL|For ETH going 5x in one year, with 25.46% IL:
Required fee APY ≥ 25.46% / 1 year = 25.46%Most ETH/USDC pools have 10-20% fee APY. At a 5x ETH move, LP would need >25% fee yield to break even vs holding. That’s rare.
The Break-Even Price Change for a Given Fee APY
Rearranging: at what price ratio r does IL exactly equal fee income?
|2√r/(r+1) - 1| = fee_APY × time
For fee_APY = 15%, time = 1 year:|2√r/(r+1) - 1| = 0.152√r/(r+1) = 0.85 or 1.15Solving numerically:
r ≈ 1.85(price up 85%) — above this, holding beats LPr ≈ 0.55(price down 45%) — below this, holding beats LP
At 15% fee APY, LP wins only if ETH stays within ±45-85% of entry price within one year.
V3 Concentrated Liquidity and IL
In UniswapV3, you provide liquidity in a range [P_a, P_b]. The math changes:
- If price stays in range: capital efficiency gain → more fees → better than V2
- If price moves out of range: position becomes 100% one token, earns 0 fees
The IL within range is amplified by the capital efficiency factor. For a ±10% range (10.5x capital efficiency):
IL_v3 ≈ IL_v2 × efficiency_factor ≈ IL_v2 × 10.5A 5% price move in a ±10% V3 range causes roughly the same IL as a 50% move in V2 — but you’re earning 10.5x more fees while price is in range.
V3 LP is profitable only if your range prediction is accurate. If ETH moves from $2,000 and you set range $1,900-$2,100:
- Good outcome: ETH oscillates in range, you earn fees at 10x efficiency
- Bad outcome: ETH trends to $2,500 (out of range), you’re 100% USDC earning nothing
When LP Is Actually Profitable
Based on the math, LP makes sense when:
- Stable or range-bound assets: Stablecoin pairs (USDC/USDT) have near-zero IL, high fee efficiency
- High volume relative to TVL: More fees per dollar of liquidity
- Correlated assets: ETH/stETH, WBTC/renBTC move together — IL is minimal
- Short time horizon with active management: V3 with tight ranges when you can rebalance frequently
LP is risky when:
- You’re bullish on one token (hold it instead — better upside)
- The market is trending (IL accumulates without reverting)
- Fee yield is below 20% and you expect >2x moves
The math doesn’t lie: LP is a bet that fees outpace price divergence. Make that bet deliberately.
Related posts
- UniswapV3 — Concentrated Liquidity, Ticks, and Why It’s Genius — explains the tick system and price ranges that amplify IL in V3 positions
- UniswapV2 — The Math Behind Automated Market Makers — the constant-product invariant that the IL formula is derived from