๐ Calculating IL: The Math Behind Losses
Learn the formula to predict impermanent loss at any price ratio
Your Progress
0 / 5 completed๐งฎ Calculating Impermanent Loss
You can calculate impermanent loss using a mathematical formula based on the price ratio between deposit and withdrawal. This helps you understand your risk before providing liquidity.
๐ฎ Interactive: IL Calculator
0.1x10x
If You Held
$10000
As LP
$10000
IL
0.00%
Dollar Impact
$0 gain
Price Movement
0%
The IL Formula
IL = 2 ร โ(price_ratio) / (1 + price_ratio) - 1
Where price_ratio = current_price / initial_price
Example: If ETH goes from $2000 to $4000, price_ratio = 2
1.25x price change-0.6% IL
1.5x price change-2.0% IL
2x price change-5.7% IL
4x price change-20.0% IL
5x price change-25.5% IL
๐ก
Important Notes
- โขIL is the same whether price goes up or downโonly the ratio matters
- โขFormula assumes 50/50 value split (most common AMM setup)
- โขTrading fees are NOT included in this calculationโthey offset IL
- โขConcentrated liquidity (Uniswap v3) has different IL characteristics
Real-World Example
๐
Bull Market Scenario
You provide $10,000 liquidity (5000 USDC + 2.5 ETH at $2000). ETH pumps to $4000.
If held:$15,000
As LP:$14,142
IL:-$858 (-5.7%)
๐
Bear Market Scenario
Same $10,000 start. ETH crashes to $1000 (0.5x price ratio).
If held:$7,500
As LP:$7,071
IL:-$429 (-5.7%)
When Fees Offset IL
| Pool Type | Daily Volume | Annual Fee APR | IL Break-Even |
|---|---|---|---|
| Stablecoin | High | 5-15% | Easy - low IL |
| Blue Chip | Very High | 20-50% | Possible - moderate IL |
| Volatile Pair | Medium | 10-30% | Difficult - high IL |
| Meme Coin | Low | 5-20% | Unlikely - extreme IL |