Liquidity Pool Divergence Loss Calculator

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

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 (1 − 2√r / (1 + r)) × 100 as a percent of the hold value, shown as a positive number, 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 a divergence loss of 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 realized 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 fall to cost more than the matching rise. A move of −50% and one of +100% are the same 2× ratio, so they give the same loss.
  • Ignoring trading fees and rewards. The tool leaves them out, so a pool can still beat holding once fees are counted, even with this loss.
  • 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