What Is the Formula for Impermanent Loss in On-Chain Liquidity Pools?
Direct Formula:IL = 2√r / (1 + r) - 1, whereris the price change multiplier
The formula for impermanent loss (IL) is not complex. It compares the final value of two asset allocations: one holding a position in aliquidity pool (LP), and the other simplyholding (HODLing)the two assets without any action.
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!
1. Variables and Principles of the Formula
This formula holds for theconstant product market maker (CPMM)model (e.g., Uniswap v2 and compatible protocols).
Define variable
r:r = new price / old price. It is the core metric measuring the magnitude of price change.Interpreting the formula:
When
r = 1(no price change),IL = 0, meaning there is no loss initially.When
r > 1orr < 1, the result is negative (since2√r / (1 + r)is always less than or equal to 1). This negative value represents thepercentage reduction in value relative to simply holding the assets. The loss issymmetric: a doubling of one asset's price (r=2) and a halving (r=0.5) result in the same loss percentage, approximately 5.72%.
2. Concrete Calculation Example
Assume you deposit 1 ETH and an equivalent amount of USDC into an ETH/USDC pool, with an initial price ofP0. Subsequently, the ETH price doubles, sor = 2.
Plug into the formula:
IL = 2 × √2 / (1 + 2) - 1 ≈ 2.828 / 3 - 1 ≈ 0.9428 - 1 = -0.0572Thus, the impermanent loss is approximately
-5.72%.Interpreting the result:
Value of holding assets: If you initially held 1 ETH and 2000 USDC (assuming ETH price was 2000 USDC at the time), when ETH rises to 4000 USDC, your total asset value is
1 ETH * 4000 + 2000 USDC = 6000 USDC.Value of LP position: According to the constant product formula
x * y = k, the assets in the pool rebalance after the price change. Withr=2, your LP share is worth approximately5656 USDC.Loss difference:
6000 - 5656 = 344 USDC, which is exactly about 5.72% of the total value.
3. Price Change vs. Impermanent Loss Reference Table
The following table shows impermanent loss for common price change ratios, helping you quickly assess risk:
| Price Change (r) | Impermanent Loss (IL) |
|---|---|
| +25% (r=1.25) | ≈ 0.62% |
| +50% (r=1.50) | ≈ 2.02% |
| +100% (r=2.00) | ≈ 5.72% |
| +200% (r=3.00) | ≈ 13.40% |
| +400% (r=5.00) | ≈ 25.46% |
The key point:The larger the price change, the more severe the impermanent loss.
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!
4. Additional Notes on Uniswap v3
The above formula is the baseline impermanent loss calculation for CPMM (e.g., Uniswap v2). ForUniswap v3 (concentrated liquidity), impermanent loss is amplified.
Principle: v3 allows LPs to provide liquidity within custom price ranges, improving capital efficiency. However, if the price moves outside your set range, your positionfully converts into one of the assets, resulting in greater losses than in v2.
Formula evolution: Impermanent loss in v3 builds on the v2 baseline but must be multiplied by an amplification factor related to your price range
(1 / (1 - ...)), thus leading to higher losses. The exact value depends on the width of your chosen price range; narrower ranges typically incur larger potential impermanent losses.
