Liquidity Pool Divergence Loss Calculator

Enter your deposit value and how much one token's price moved to see your divergence loss versus holding.

Result

-5.72%
$857.86
$14,142.14
$15,000.00

How it is calculated

The tool models a 50/50 constant-product pool. Let r = 1 + price change % / 100 be how much the price of token A moved against the paired token (a price change of +100 % gives r = 2). Holding the two tokens would be worth hold = deposit × (1 + r) / 2, while the pool position is worth LP = deposit × √r. The divergence loss is (2√r / (1 + r) − 1) × 100 as a percent of the hold value, and the dollar loss is hold − LP. The result depends only on the price ratio, not on the direction: +100 % and −50 % give the same percentage loss. Trading fees and farming rewards are excluded, and the deposit value is in dollars. A price change of −100 % or lower is rejected, and 0 % gives zero loss.

Worked example

Deposit 10,000 and token A doubles in price against its pair (+100 %). Step 1: r = 1 + 1.00 = 2. Step 2: holding both tokens would be worth 10,000 × (1 + 2) / 2 = $15,000.00. Step 3: the pool position is worth 10,000 × √2 = $14,142.14. Step 4: loss = 15,000 − 14,142.14 = $857.86, which is -5.72% of the hold value. The pool still gains in value, just less than simply holding.

Try this example →

Common mistakes

  • Calling the result a realised loss. It is a comparison with holding, and it shrinks again if the price returns to its starting ratio.
  • Entering the price move of one token in dollars when the pool pairs it with another volatile token. The input is the change of the price ratio between the two tokens, not each token's change against dollars.
  • Expecting a big loss for a big price drop to be larger than for the same rise. The loss for +100 % and −50 % is the same, because only the ratio matters.
  • Ignoring trading fees and rewards. The tool leaves them out, so a pool can still beat holding after fees even when this figure is negative.
  • Typing the price change as a ratio (2 for doubling). The field is a percent, so doubling is 100.

Sources

About this calculator

Divergence loss, more commonly called impermanent loss, is what happens when you deposit two tokens into a 50/50 automated market maker (AMM) liquidity pool and their price ratio changes relative to when you deposited. Because the AMM's constant-product formula automatically rebalances the pool by selling the token that rises and buying the one that falls, you end up holding less of the appreciating token than if you had simply held both assets in your wallet. The standard formula expresses the loss as a function of the price ratio r: loss equals 2 times the square root of r, divided by (1 plus r), minus 1.

Liquidity providers on decentralized exchanges like Uniswap or PancakeSwap need this number to judge whether the trading fees and yield-farming rewards they earn from providing liquidity are enough to offset the divergence loss caused by price movement — a pool with two highly correlated tokens (like two stablecoins) has very low divergence loss, while a pool pairing a volatile token against a stable one can suffer heavy losses if the volatile side makes a large move.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators