Understanding Impermanent Loss (IL)
Impermanent Loss (IL) is one of the most critical – yet often misunderstood – concepts for liquidity providers in decentralized exchanges (DEXes).
What Causes Impermanent Loss?
When you provide liquidity to a DEX, you take the opposite side of every trade.
- If traders swap Token X → Token Y, liquidity providers effectively swap Token Y → Token X.
- This changes the pool’s reserves, altering the relative pricesof the tokens.
IL occurs when the value of your LP position becomes lower than simply holding the tokens (HODLing) due to price fluctuations.
Key Assumptions for Simplifying IL Calculation
To isolate IL’s mechanics, we assume:
- No DEX fees (ignoring fee income for now).
- No liquidity additions/removals (only swaps occur).
- LP’s stake is relatively small (doesn’t impact reserves significantly).
Mathematical Derivation of Impermanent Loss
1. Initial Setup
Starting Pool reserves:
- x of Token X
- y of Token Y
Starting prices (denominated in Token Y):
Alice, liquidity provider, deposits:
- x1 of Token X
- y1 of Token Y
Her deposit maintains the initial price ratio:
Value of Alice’s LP position (in Token Y):
2. After Swaps (New Reserves & Prices)
Alice’s new reserves:
- x2 of Token X
- y2 of Token Y
New prices:
Value of Alice’s LP position (in Token Y):
Since we are solving for IL, which is spread across all LP providers equally (within a specific timeframe), Alice could have just HODLed her original set of reserves. Thus, the value of original reserves at x1 and y1 would now be priced at P(X)2 and P(Y)2, respectively. Alice’s HODLed value will be equal to:
Critical Assumption: Small LP Share
This calculation assumes Alice’s liquidity provision is insignificant compared to total reserves. If her stake were relatively large:
- Withdrawing it would substantially impact pool reserves
- The price P(X)2 would be different (likely worse due to slippage)
- The actual IL would be lower than calculated
3. Calculating Impermanent Loss (%)
Basic Formula
The percentage IL compares the LP value to the HODL value:
Simplifying the Expression
Introducing Price Ratio (d)
Define d as the price change ratio:
This implies:
Substituting into the IL formula:
Relating to d:
Multiplying both parts by :
k stays the same due to no DEX fees:
Replacing with k’s:
Final simplification to cancel out k’s:
Final IL formula:
Interpreting Impermanent Loss
The derived formula reveals several key insights about liquidity provision:
- Price Sensitivity: IL occurs whenever d ≠ 1 (i.e., when prices change from their initial ratio)
- IL is Inevitable: Large price moves in either direction cause losses
- Convexity: The IL curve is convex, with losses accelerating for larger price movements
- Compensation Mechanism: DEX fees offset IL, which we’ll analyze next

IL Numerical Examples
- d = 25% (Token X drops by 75%) → IL = -20.0%
- d = 50% (Token X drops by 50%) → IL = -5.7%
- d = 75% (Token X drops by 25%) → IL = -1.0%
- d = 125% (Token X rises by 25%) → IL = -0.6%
- d = 150% (Token X rises by 50%) → IL = -2.0%
- d = 200% (Token X rises by 100%) → IL = -5.7%
- d = 300% (Token X rises by 200%) → IL = -13.4%
This complete derivation shows why liquidity providers must earn sufficient fees to make market-making profitable despite inherent IL. The next segment will incorporate fee income into this framework.