Impermanent Loss
Impermanent Loss
🌊 1. The Meaning — What Is “Impermanent Loss”?
Let’s begin simple.
Impermanent loss is the loss of value an LP experiences compared to just holding the tokens outside the pool, due to price changes between the paired assets.
⚙️ Example (The Intuitive View)
Imagine:
-
You’re an LP in an ETH/USDT pool.
-
You deposit 1 ETH = $1000, and 1000 USDT.
-
Total value = $2000.
The pool ratio is 1:1000 (price of ETH = $1000).
Now ETH price rises to $2000 on external markets.
If you had simply held:
-
1 ETH = $2000
-
1000 USDT = $1000
→ total = $3000
But the pool adjusts itself using the AMM formula .
Let’s see what happens.
🧮 2. How the Pool Reacts to Price Change
Step 1: Initial condition
-
reserveETH = 10 ETH
-
reserveUSDT = 10,000 USDT
-
price = 1000 USDT/ETH
-
Step 2: ETH price doubles to 2000 USDT.
Traders arbitrage:
-
Buy ETH from the pool until the pool’s internal price matches external price.
-
So pool adjusts.
Let’s find new reserves.
and
→ substitute reserveUSDT = 2000 × reserveETH
Step 3: LP owns same % share of pool
Originally you owned 10% of pool →
so now you own:
-
0.7071 ETH (10% of 7.071)
-
1,414.2 USDT (10% of 14,142)
Your total =
(0.7071 × 2000) + 1414.2 = $2,828.4
Step 4: Compare to HODL
If you had just held:
-
1 ETH ($2000) + 1000 USDT = $3000
So you lost $171.6 in relative value.
This is the impermanent loss.
📉 3. Why It’s Called Impermanent?
Because the loss is not realized until you withdraw.
If later the ETH price returns to $1000,
the pool ratio returns,
and the LP’s value becomes equal again — no loss.
→ But if you withdraw while prices are still different,
that loss becomes permanent.
Hence the term impermanent loss = “temporary loss relative to HODL, caused by price divergence”.
🧩 4. The Mathematical Formula
Impermanent loss (IL) depends only on the price ratio change (r):
where:
You can calculate the loss as a percentage of the original value.
🧮 Example Calculations
| Price Ratio (r) | IL (%) |
|---|---|
| 1.00 (no change) | 0.00% |
| 1.25 | -0.60% |
| 1.50 | -2.00% |
| 2.00 | -5.72% |
| 3.00 | -13.40% |
| 4.00 | -20.00% |
| 5.00 | -25.46% |
So the more volatile the price,
the larger the IL.
⚖️ 5. Why Does This Happen? (Core Intuition)
The AMM always keeps the product constant (x*y=k).
So when one asset’s price increases,
the pool automatically sells some of it to rebalance.
That means:
-
When price goes up → LP sells part of the rising asset early.
-
When price goes down → LP buys more of the falling asset.
So the pool is always rebalancing in the opposite direction of the market —
that’s why it loses compared to simply holding.
💡 Impermanent loss = the cost of providing liquidity (inventory rebalancing loss).
🧠 6. Visualizing It
Imagine you have a see-saw:
ETH on one side, USDT on the other.
Whenever ETH’s price rises, the see-saw tilts —
the pool adjusts weights to keep balance.
You end up with less of the rising asset and more of the stable one.
That’s exactly what IL represents —
the pool automatically “sells winners and buys losers”.
💰 7. Why LPs Still Earn (Fees Offset IL)
Despite impermanent loss, LPs often still profit due to trading fees.
Let’s say:
-
Pool charges 0.3% per trade.
-
ETH price doubles → lots of trading activity.
-
You earn accumulated fees proportional to your pool share.
If total trading volume is high enough,
your fee income can exceed the impermanent loss.
That’s why AMMs on volatile pairs (like ETH/USDT) are profitable only when there’s enough trading volume.
🧩 8. Code-Level Intuition (How You’d Simulate IL)
You can calculate impermanent loss off-chain or in a Solidity helper function like this:
Call with:
🧮 9. Real-World Illustration
Case A — HODL
-
1 ETH = $1000 → $2000 = 2×
-
1 ETH + 1000 USDT → $3000 total.
Case B — LP
After AMM rebalance:
-
You hold 0.7071 ETH + 1414 USDT = $2828.
-
Loss = -5.72%.
But if during that period you earned, say, $250 in trading fees →
$2828 + $250 = $3078 → still profitable.
That’s the fee vs IL balance every LP must consider.
⚙️ 10. Factors Affecting IL
| Factor | Impact |
|---|---|
| Volatility | Higher volatility → higher IL |
| Stable pairs | Low IL (e.g., USDC/DAI) |
| Fees | Can offset IL |
| Liquidity depth | Deep pools have smaller price impact per trade |
| Time in pool | Long-term exposure to volatility accumulates IL |
💡 11. How LPs Minimize IL
-
Provide liquidity to stablecoin pairs (e.g., DAI/USDC).
→ Price doesn’t change much → near-zero IL. -
Use Concentrated Liquidity (Uniswap v3)
→ Provide liquidity only in tight price ranges. -
Use hedging strategies
→ Hedge exposure with derivatives or shorting. -
Rely on fees and incentives
→ High-volume pools can compensate for IL.
⚖️ 12. Summary Table
| Concept | Meaning | Example |
|---|---|---|
| Impermanent Loss | Value loss vs HODL due to price movement | ETH price doubles, LP value drops 5.7% |
| Why “impermanent”? | It disappears if price returns | Only realized when withdrawn |
| Formula | IL = 2√r / (1+r) - 1 | r = new price / old price |
| Main Cause | Pool sells rising asset | AMM rebalancing |
| Offset | Trading fees, incentives | 0.3% per trade |
🎯 13. In One Line
Impermanent Loss is the opportunity cost of providing liquidity —
you give up part of the upside when prices diverge,
in exchange for earning fees from traders.
Comments
Post a Comment