Calculate the impermanent loss from providing liquidity in DeFi pools. Understand how price divergence affects your LP position.
Impermanent Loss (IL) occurs when you provide liquidity to an AMM and the price ratio of your deposited assets changes compared to when you deposited them.
It's called "impermanent" because the loss only becomes permanent when you withdraw. If prices return to their original ratio, the loss disappears.
Key insight: IL is the opportunity cost of providing liquidity vs simply holding the assets. You compare your LP position value to what you would have if you just held.
// Impermanent Loss Formula
IL = 2 × √(price_ratio) / (1 + price_ratio) - 1
// Where:
price_ratio = new_price / old_price
This formula assumes a standard 50/50 AMM pool (like Uniswap V2). Concentrated liquidity (V3) and weighted pools have different IL characteristics.
| Price Change | 1.25x (25% up) | 1.50x (50% up) | 2x (100% up) | 3x (200% up) | 4x (300% up) | 5x (400% up) |
|---|---|---|---|---|---|---|
| Impermanent Loss | 0.6% | 2.0% | 5.7% | 13.4% | 20.0% | 25.5% |
* IL is the same whether price goes up or down by the same ratio. 2x up or 0.5x down both result in ~5.7% IL.
Pairs like USDC/USDT or ETH/WETH have minimal IL because they maintain a stable ratio.
Uniswap V3 lets you provide liquidity in specific price ranges, potentially earning more fees but with higher IL risk if price moves outside your range.
Some protocols allow single-sided LP which eliminates IL but may have other trade-offs.
Look for pools with high yield farming rewards that can offset potential IL.
Enter when you believe prices are at a temporary divergence and will revert.
Some DeFi protocols offer IL insurance or protection mechanisms for LPs.
You deposit into a liquidity pool, earn trading fees, and think you're making money. Then one token pumps while the other stays flat. You withdraw and realize you'd have been better off just holding. That's impermanent loss, and it catches almost every new LP by surprise. The math is counterintuitive: even when both your tokens go up, you can still underperform simply holding them. If one asset doubles relative to the other, you're down about 5.7% compared to holding. Triple? Nearly 13.4%. Before you provide liquidity anywhere, you need to understand exactly what you're signing up for.
AMMs like Uniswap hold two tokens in a pool. Prices are determined by the ratio between them, using the formula x * y = k. When someone trades, they add one token and remove the other, shifting the ratio and changing the price. You deposit equal value of both tokens to provide liquidity. Here's the problem: when prices move, the AMM automatically rebalances. As ETH rises against USDC, the pool sells ETH and buys USDC to stay balanced. As an LP, you end up with less ETH and more USDC than you started with. If you had just held, you'd have more ETH at the higher price. That difference is impermanent loss. The AMM sold your winners and bought your losers, automatically.