Calcady
Home / Financial / Impermanent Loss Calculator (DeFi AMM)

Impermanent Loss Calculator (DeFi AMM)

Calculate Impermanent Loss for Liquidity Providers (LPs) in Automated Market Makers (AMMs) like Uniswap. Analyze price divergence and lost opportunity cost against holding tokens in a wallet.

Asset Price Divergence

%
%

Example: If Token A doubles in price, enter 100%. If Token B is a stablecoin pegged to $1, enter 0%.

Standard $1,000 Portfolio Example

Assume you started with $500 in Token A and $500 in Token B.

Moderate Impermanent Loss (5-20%)

Impermanent Loss

-5.72%
Wealth lost vs simply holding
Tracking the $1k Example:
1. Wallet HODL Value:$1,500.00
2. Actual AMM Pool Value:$1,414.21
Money lost to AMM Rebalancing:-$85.79
You need to earn at least 5.72% in trading fee APY from this pool just to break even against someone who simply held the two tokens in their cold wallet.
Email LinkText/SMSWhatsApp

Quick Answer: What exactly is Impermanent Loss?

Impermanent Loss (IL) is the hidden cost of being a Liquidity Provider (LP) in DeFi. If one token in your pool skyrockets in price while the other does not, the smart contract mathematically forces you to slowly sell your winning asset as it goes up to maintain balance. As a result, you will always have less total money inside the pool than you would have had if you just left the tokens untouched in your wallet. LPs accept this mathematical drain explicitly because they expect the Trading Fees (APY) to eventually exceed the IL cost.

Divergence Penalty Formula

Core AMM Equation

IL = (2 × √P) / (1 + P) − 1

Standard Impermanent Loss Milestones

1.25x Divergence -0.6% IL
1.50x Divergence -2.0% IL
2.00x Divergence -5.7% IL
5.00x Divergence -25.5% IL

⚠ The Asymmetric Risk

Impermanent loss is mathematically direction-agnostic. It does not literally care if the tokens violently pump to the moon or violently crash to zero. It purely measures the relative divergence between the two. However, if a hyper-volatile token crashes 90% against USDC, you absorb both the horrific 90% fiat loss AND a massive 42.5% secondary impermanent loss penalty on top of it as the AMM forces you to buy the falling knife all the way to absolute zero.

Liquidity Farming Strategies

✓ Correlated Asset Pools

Minimized Divergence | Safe Farming

  1. The Asset: A farmer provides liquidity to an ETH / stETH (Lido Staked ETH) pool on Curve.
  2. The Environment: Both tokens represent Ethereum. When ETH pumps 50%, stETH mathematically pumps 50% identically.
  3. The Math: Because the price ratio (P) never shifts from 1.0, Impermanent Loss is essentially 0.00%.

→ The farmer safely harvests the 4% trading fee APY entirely isolated from the mathematical threat of IL. This same concept applies heavily to Stablecoin/Stablecoin pools like USDC/DAI.

✗ The Rug-Pull Death Spiral

Infinite Divergence | Zero Liquidation

  1. The Asset: A greedy farmer enters a SCAM / USDC pool offering an unbelievable 500% APY.
  2. The Catastrophe: The developers of SCAM dump their supply, crashing the token 99.9%.
  3. The AMM Mechanics: To maintain the 50/50 ratio, the Uniswap contract violently sells all of the farmer's valuable USDC to frantically buy the worthless falling SCAM tokens.

→ When the farmer withdraws, they discover the pool has perfectly drained 100% of their USDC. They are left holding solely a massive stack of permanently worthless SCAM tokens. The 500% APY could not outpace a 99% Impermanent Loss.

Pool Topology Matrix

Pool Classification Example Pair IL Risk Profile
Stable / StableUSDC / USDTEssentially Zero
Correlated AssetsETH / stETHNear Zero
Blue-Chip / StableBTC / USDCModerate (5-10%)
Micro-Cap / StableMEME / ETHExtreme (20-80%)

LP Defensive Engineering

Do This

  • Exploit Asymmetric Weighted Pools. Balancer protocol allows you to create 80/20 pools instead of rigid Uniswap 50/50 pools. If you deploy an 80% ETH / 20% USDC pool, your explicit total Impermanent Loss mathematically drops by exactly over 50% compared to a standard baseline AMM configuration.
  • Provide Liquidity During Consolidation. The optimal time to LP is when you mathematically predict the market is entering a long, boring, sideways consolidation phase (A crab market). Divergence stays near zero (P=1), allowing you to aggressively harvest heavy trading fees without triggering any structural AMM selling pressure.

Avoid This

  • LPing into a Bull Market. If you believe a massive super-cycle bull market is triggering, you must immediately remove your liquidity. When Ethereum rockets 400%, the AMM contract will violently sell out of your ETH the entire way up. A pure HODL wallet will severely mathematically destroy an LP portfolio during a parabolic upward phase.
  • Ignoring Concentrated Liquidity Risks. Uniswap V3 introduced 'Concentrated Liquidity', where you provide liquidity only within a tight mathematical price range. While this drastically amplifies APY fees, it mathematically magnifies Impermanent Loss exposure exponentially. If the price slips fully out of your established range, your entire portfolio automatically converts 100% to the depreciating loser token.

Frequently Asked Questions

How can an LP transaction be profitable if I have impermanent loss?

Profitability relies on the mathematical netting of two forces: Trading Fees vs Impermanent Loss. If the pool pays you a massive 30% Annual Percentage Yield in pure trading fees continuously, and the price divergence only generates a minor 5% Impermanent Loss over that year, your net algorithmic profit remains an extremely lucrative 25%.

Why do smart contracts explicitly sell my winning tokens?

Automated Market Makers operate strictly on the constant product formula `x * y = k`. They do not connect to external oracles. When an asset spikes in value externally, arbitrage bots rush to the AMM pool, inject cheap stablecoins (y), and extract the mispriced valuable token (x) until the ratio balances. The smart contract essentially allows arbitrageurs to legally raid your portfolio.

Can Impermanent Loss occur in stablecoin to stablecoin pools?

In standard macroeconomic conditions, no, because both USDC and USDT theoretically stay locked rigidly at exactly $1.00 relative to each other (Divergence P = 1.0). However, if one stablecoin critically loses its peg and collapses to $0.80 (like Terra UST), massive violent impermanent loss activates as the pool violently drains all of the good stablecoin to buy the dying asset.

When does Impermanent Loss become Permanent Loss?

The exact millisecond you execute the 'Withdraw Liquidity' transaction on the blockchain. As long as you leave the LP tokens in the pool, there is a statistical possibility the prices revert to their start mathematically erasing the IL. Once you physically extract the assets, the transaction is finalized on the ledger and the value destruction is mathematically permanently realized.

Related Yield Strategy Simulators