Foundations · Exchanges, DEX & DeFi

Impermanent Loss

Impermanent loss is the gap between the value of tokens held in a liquidity pool and the value of simply holding them, which opens whenever their relative price changes.

  • Advanced
  • 5 min read
  • Updated

Why it matters

Impermanent loss is the main cost of providing liquidity, and it appears on no fee schedule. A pool can display an attractive yearly rate while its providers end up with less than they would have had by doing nothing.

The name is also misleading, which makes the idea one of the most misunderstood in DeFi.

How it works

Impermanent loss against the change in price ratio
-30-20-100012345No change: 0%2x: -5.7%4x: -20%Price ratio compared with the start (1 = unchanged)Pool versus holding (%)
The loss is zero only where the ratio is back at its starting value. It grows in both directions, slowly at first and then faster. Constant-product pool with two tokens of equal value at deposit, before fees.

Impermanent loss is the difference between two values at the same moment:

  • what a provider’s share of the pool is worth now;
  • what the same tokens would be worth had they stayed in a wallet.

It exists because a pool rebalances itself. In a constant-product pool, when token A rises on the wider market, arbitrage traders buy A from the pool until its price catches up. The pool is left with less A and more B. It has, in effect, sold some of the rising token on the way up. When A falls, the opposite happens: the pool buys more of the falling token on the way down.

Either way, the provider ends up holding less of whichever token did better. Before fees, the pool position is never worth more than holding. It can only match it, when the price ratio is back where it started.

In plain words

A shopkeeper promises to always keep equal values of apples and oranges on the shelf. When apples become expensive, customers buy them up and leave oranges behind. The shopkeeper’s shelf is still full, but it holds fewer of the fruit that went up.

How it is calculated

IL = 2 × sqrt(r) / (1 + r) - 1r is the new price ratio of the two tokens divided by the ratio at deposit. The result is the pool position's value relative to holding, before fees.
Change in price ratio, r Pool versus holding
1 (no change) 0%
1.25x, or 0.8x -0.6%
1.5x, or 0.67x -2.0%
2x, or 0.5x -5.7%
3x, or 0.33x -13.4%
4x, or 0.25x -20.0%
5x, or 0.2x -25.5%

The loss depends only on how far the ratio has moved, not on its direction: a ratio that doubles and one that halves give the same figure. It also accelerates. The step from 1x to 2x costs 5.7%, and the step from 2x to 4x costs a further 14.3 percentage points.

The formula applies to a simple two-token constant-product pool. Other designs follow other curves.

Why “impermanent”

The loss shrinks to zero if the ratio returns exactly to its value at deposit. Until then it is real, and it becomes final when the provider withdraws at a different ratio. Nothing ensures that the ratio will come back, which is why some writers prefer the term divergence loss.

Fees against the loss

Fees may or may not cover it

Swap fees are the compensation for impermanent loss, and they do not always outweigh it. Fee rates quoted as APR or APY are variable, are not guaranteed, are often boosted by reward tokens whose price can fall, and come with every risk of the pool. A position can earn fees every day and still be worth less than the tokens would have been in a wallet, or less than the original deposit.

Going deeper

It is measured against holding, not against the deposit. If both tokens fall in price, the position loses value from that fall, and impermanent loss is added on top.

Stable pairs. Two tokens meant to trade at the same price have a ratio that barely moves, so the loss is normally small. If one of them breaks from its target, the pool fills up with the failing token. See stablecoin risks.

Price ranges. Positions confined to a narrow price range earn more fees per token and suffer a larger loss for the same price move.

Volatility cuts both ways. A more volatile pair tends to bring more trading and fees, and moves the ratio further.

A hypothetical 4x move, up and downHypothetical illustration

Made-up numbers. A provider deposits 10 A and 1,000 B when A is priced at 100 B. The deposit is worth 2,000 B. Treating the share as a small pool of its own, k = 10 × 1,000 = 10,000.

A rises to 400 (r = 4). The pool must satisfy two conditions: balances that multiply to 10,000, and a ratio of 400 B per A.

  • A balance: sqrt(10,000 / 400) = sqrt(25) = 5 A.
  • B balance: 5 × 400 = 2,000 B.
  • Pool value: 5 × 400 + 2,000 = 4,000 B.
  • Holding value: 10 × 400 + 1,000 = 5,000 B.
  • 4,000 / 5,000 - 1 = -20%. The formula agrees: 2 × 2 / 5 - 1 = -20%.

The position doubled in value, yet holding would have been worth 1,000 B more. Fees would have to add that much to close the gap.

A falls to 25 (r = 0.25).

  • A balance: sqrt(10,000 / 25) = 20 A. B balance: 20 × 25 = 500 B.
  • Pool value: 20 × 25 + 500 = 1,000 B.
  • Holding value: 10 × 25 + 1,000 = 1,250 B.
  • 1,000 / 1,250 - 1 = -20%.

Here holding lost 37.5% of the original 2,000 B, and the pool position lost 50%.

A deposit worth 2,000 after token A goes from 100 to 400
Held in a wallet5,000

10 A at 400, plus 1,000 B.

Held in the pool4,000

5 A at 400, plus 2,000 B. 20% less than holding, before fees.

Both outcomes are above the starting 2,000. Impermanent loss measures the distance between them, not a fall below the deposit. Hypothetical numbers.

What it does NOT mean

  • “Impermanent” does not mean it will reverse. It reverses only if the price ratio returns to its starting value.
  • It is not a fee, and nobody collects it as one. It is value that leaves the pool through arbitrage trades.
  • It does not mean the position lost money. A position can be up against its deposit and still be behind holding.
  • Zero impermanent loss does not mean no loss. Both tokens can fall together while their ratio stays the same.

Common misunderstandings

  1. Thinking it only happens when prices fall. A sharp rise in one token produces the same loss as an equal fall.
  2. Comparing with the deposit instead of with holding. The concept is defined against the tokens sitting in a wallet.
  3. Applying the table to every pool. Weighted pools, stable-pair curves and range positions have different numbers.
  4. Assuming time heals it. Waiting helps only if the ratio comes back, and it may move further away.

Risks and limits

  • The loss can exceed all fees earned, particularly after a large one-way price move.
  • If one token goes toward zero, the position ends up almost entirely in that token.
  • The formula ignores gas, fees and reward tokens, so it describes one part of the result.

Key takeaway

Impermanent loss is what a liquidity provider gives up, relative to holding, when the two tokens’ price ratio moves: about 5.7% for a 2x move and 20% for a 4x move in a constant-product pool. It disappears only if the ratio returns, and fees may or may not make up for it.

Sources and further reading