Impermanent loss is the difference in value you would have if you simply held your tokens versus if you provided them as liquidity in an Automated Market Maker(AMM).
How it happens:
When you provide liquidity to an AMM, you deposit two tokens in equal value. The AMM automatically adjusts prices based on supply and demand, using the constant product formula(x*y=k).
If the price of one token changes significantly, you end up with a different ratio of tokens than when you started and that difference can result in a loss compared to just holding.
Why "impermanent"?
- If the price returns to the original ratio, the loss disappears.
- You only realize the loss if you withdraw when prices are imbalanced
- You earn trading fees that can offset or exceed the IL
Example:
Initial Deposit
Deposit liquidity into an ETH-USDC pool:
- Supply: 1 ETH ($2,000) + 2,000 USDC ($2,000) = $4,000 total
-
Constant product:
k = 1 × 2,000 = 2,000
ETH Price Rises to $4,000
Using the constant product formula: x × y = k
Given:
x × y = 2,000-
y / x = 4,000(new price ratio) y = 4,000x
Solving for new position:
x × 4,000x = 2,000
4,000x² = 2,000
x² = 0.5
x = √0.5 = 0.707 ETH
y = 4,000 × 0.707 = 2,828 USDC
New LP position:
- 0.707 ETH (initial 1, lost 0.293)
- 2,828 USDC (initial 2,000, gained 828)
New LP Value
(0.707 ETH × $4,000) + (2,828 USDC × $1)
= $2,828 + $2,828
= $5,656
Comparison: Holding vs. LP Provision
| Scenario | ETH | USDC | Total Value |
|---|---|---|---|
| Just holding | 1 ETH ($4,000) | 2,000 USDC ($2,000) | $6,000 |
| Providing liquidity | 0.707 ETH ($2,828) | 2,828 USDC ($2,828) | $5,656 |
Impermanent Loss
Impermanent loss = $6,000 - $5,656 = $344 (~5.7%)
What happened:
- Lost: 0.293 ETH (forced to sell as price rose)
- Gained: 828 USDC (forced to buy as price rose)
The AMM rebalanced the position to maintain the constant product, causing you to sell ETH at lower prices than the market peak.
Top comments (0)