yieldlogic
↓ JUMP TO CALCULATOR

DeFi Impermanent Loss Calculator

Quantify divergence loss across constant-product liquidity pools (Uniswap, Curve) and model fee yields required for net profitability.

INPUTS (50/50 CONSTANT PRODUCT)
USD
OUTPUT
IMPERMANENT LOSS
-5.72%
-$857.86 vs HODL
LP POOL VALUE
$14,142.14
HODL VALUE
$15,000.00
1.25×
-0.62%
1.50×
-2.02%
2.00×
-5.72%
3.00×
-13.40%
5.00×
-25.46%
// formula
IL(r) = 2√r / (1 + r) − 1 where r = (A_end/A_start) / (B_end/B_start)

How it works

Calculate impermanent loss in constant product AMM pools (xy=k). Compare pool value vs holding (HODL) and simulate fee compensation thresholds. Designed for liquidity providers on decentralized exchanges (uniswap v2/v3, aerodrome, raydium, trader joe) seeking to evaluate divergence risks.

// formula
IL = 2 × √(k) / (1 + k) - 1 where k = P_ratio_t / P_ratio_0

FAQ

▶What causes impermanent loss in AMMs?

Impermanent loss occurs when the price ratio of pooled tokens changes from when you deposited them. Arbitrageurs rebalance the pool by buying the appreciating asset at a discount and selling the depreciating asset, leaving LPs with more of the cheaper token and less of the valuable token compared to holding.

▶Why is it called "impermanent" loss?

It is termed impermanent because if the price ratio returns to its original entry ratio, the loss disappears. However, if you withdraw your liquidity while the price ratio remains diverged, the loss becomes permanent and realized.

▶Can trading fees compensate for impermanent loss?

Yes. If the trading volume in the pool produces cumulative fee yields that exceed the percentage loss caused by divergence, the net LP return will be positive relative to holding. This calculator models both fee accrual and divergence.