The Mathematics of Loss
Understanding the mechanics behind constant product liquidity pools.
Impermanent Loss Formula
The standard formula for a 50/50 liquidity pool (like Uniswap v2) calculates the divergence loss based on the price ratio change k.
k =
Price Ratio exit Price Ratio entry
IL = (
2 √k 1 + k
- 1 ) × 100HODL Value Change
((1 + k) / 2 - 1) × 100
Value change if you just held the assets.Variable k
Represents the price ratio move. If an asset doubles in price relative to the other, k = 2.
Key Assumptions
- Constant Product: Assets follow the $x \cdot y = k$ invariant.
- 50/50 Weight: Both assets represent equal value at deposit.
- No Fees: This specific formula excludes trading fee revenue.
Practical Example
If entry ratio is 1 and the price of Asset A quadruples (Ratio becomes 4):
k = 4 / 1 = 4
IL = (2 * √4 / (1 + 4) - 1) * 100
IL = (4 / 5 - 1) * 100 = -20%
IL = (2 * √4 / (1 + 4) - 1) * 100
IL = (4 / 5 - 1) * 100 = -20%
Result: 20% less value than HODLing.