Estimate risks in DeFi liquidity pools with our free Impermanent Loss Calculator. Compare HODLing vs. providing liquidity on AMMs to protect your yield farming profits. Try it now!
Impermanent Loss Calculator
What exactly is impermanent loss in DeFi?
Impermanent loss is a fundamental risk faced by liquidity providers (LPs) in Decentralized Finance (DeFi) Automated Market Makers (AMMs) like Uniswap or SushiSwap. It occurs when the price of tokens deposited into a liquidity pool changes compared to when they were deposited.
Essentially, it is the difference in total fiat value between providing liquidity to a pool versus simply holding the exact same assets in a crypto wallet. Because AMMs use mathematical formulas to balance token ratios, a price divergence causes the pool to automatically sell the outperforming token and buy the underperforming one. This continuous rebalancing means LPs end up with less of the more valuable asset, resulting in a temporary "loss" on paper compared to a simple holding strategy.
Why is the loss considered impermanent?
The loss is labeled "impermanent" because it is strictly an unrealized or theoretical loss. It only exists on paper for as long as your tokens remain locked inside the liquidity pool.
The mathematical models governing AMM liquidity pools dictate that the ratio of the two assets must stay balanced in relation to external market prices. If prices diverge, the pool's ratio shifts, creating the loss. However, if the token prices eventually revert to the exact same ratio they were at when you originally deposited the funds, the impermanent loss vanishes entirely. Therefore, the loss is only temporary (impermanent) unless the provider decides to withdraw their assets while the prices are still out of balance.
When does impermanent loss become permanent?
Impermanent loss becomes a permanent (or realized) loss the exact moment a liquidity provider withdraws their assets from the pool at a different price ratio than when they made the deposit.
- Scenario A: You leave the funds in the pool. Prices fluctuate wildly, but eventually return to your deposit ratio. No loss is realized.
- Scenario B: You withdraw the funds while the prices are still misaligned from your initial entry point. The AMM gives you the newly rebalanced token amounts.
Once you execute the withdrawal, the trade is finalized. The theoretical opportunity cost between holding and providing liquidity is permanently locked in, meaning your portfolio holds less value than if you had simply kept the tokens in your wallet.
How does token price volatility affect the loss?
Token price volatility is the primary driver of impermanent loss. The greater the price divergence (volatility) between the two assets in a pool from their initial deposit ratio, the larger the impermanent loss becomes.
| Price Change Ratio | Approximate Impermanent Loss |
|---|---|
| 1.25x | 0.6% loss |
| 1.50x | 2.0% loss |
| 2.00x | 5.7% loss |
| 5.00x | 25.5% loss |
In highly volatile markets, one token may skyrocket or crash relative to the other. The AMM algorithm automatically rebalances the pool, causing the LP to bleed the appreciating asset while accumulating the depreciating one, significantly compounding the financial loss.
Do trading fees effectively offset the loss?
Trading fees can offset impermanent loss, but profitability is never guaranteed. When you provide liquidity, the DeFi protocol rewards you with a percentage of the trading fees generated by users swapping in that pool.
Whether these fees effectively cover your impermanent loss depends on two crucial metrics:
- Trading Volume: High daily volume generates massive fee accruals.
- Price Divergence: Low volatility keeps the impermanent loss minimal.
If a pool experiences massive trading volume but token prices remain relatively stable, the accrued fees will easily surpass the minor impermanent loss, yielding a net profit. Conversely, if a token crashes suddenly with low trading volume, the impermanent loss will vastly outpace the collected fees.
Are stablecoin pools completely immune to this risk?
Stablecoin pools (such as USDC/USDT) are highly resistant to impermanent loss, but they are not completely immune. Because both assets are pegged to the same underlying value (the US Dollar), their price ratio typically remains strictly at 1:1.
Since price divergence is the root cause of impermanent loss, the lack of volatility between two stablecoins means the risk is effectively zero under normal market conditions. However, total immunity is a myth due to de-pegging risks. If one stablecoin loses its peg (as witnessed during the UST collapse or the USDC de-peg in 2023), massive price divergence happens. In such black swan events, LPs suffer devastating impermanent loss as the pool hoards the worthless, de-pegged token.
How is impermanent loss actually calculated?
Impermanent loss is calculated based on the constant product formula utilized by most AMMs: x * y = k, where x and y are the token quantities and k is a fixed constant.
The loss is purely a function of the price ratio change between the two assets. The standard formula to calculate the percentage of impermanent loss is:
Impermanent Loss = 2 * √(price_ratio) / (1 + price_ratio) - 1
To calculate it practically in dollar terms:
- Calculate the current fiat value of your assets if you had just held them in your wallet.
- Calculate the current fiat value of your actual LP tokens inside the pool.
- Subtract the pool value from the holding value to find your exact impermanent loss.
Can impermanent loss happen if token prices go up?
Yes, absolutely. Impermanent loss is completely agnostic to the direction of the price movement. It is exclusively caused by a change in the relative price ratio between the two paired assets.
If you deposit Token A and Token B, and Token A's price skyrockets by 100% while Token B's price remains flat, the ratio has severely diverged. The AMM will automatically sell off your appreciating Token A to buy more of Token B to maintain pool balance. When you withdraw, you will have fewer of the high-performing Token A than you started with. Even though your overall portfolio value has increased in dollar terms, you still suffer impermanent loss because you would have made more profit simply holding.
How can liquidity providers minimize this risk?
Liquidity providers can employ several strategic approaches to minimize their exposure to impermanent loss:
- Provide liquidity for stablecoins: Pairs like USDC/DAI rarely fluctuate in price ratio, keeping risk near absolute zero.
- Pair highly correlated assets: Tokens that naturally move together (like WBTC/renBTC or ETH/stETH) experience minimal price divergence.
- Choose low-volatility pairs: Avoid pairing a highly volatile meme coin with a stablecoin, as wild swings are guaranteed to cause heavy divergence.
- Participate in uneven pools: Protocols like Balancer offer pools with 80/20 token ratios instead of 50/50, significantly reducing exposure to the more volatile asset.
- Use single-sided staking: Staking a single token in a yield farm eliminates impermanent loss entirely, as no trading pair exists to rebalance.
What happens if prices return to their original ratio?
If the external market prices of the two tokens in the liquidity pool return to the exact same ratio they were at when you initially deposited them, the impermanent loss is completely erased.
Because Automated Market Makers run on deterministic mathematical formulas, the pool token balances rely strictly on current price ratios. When the ratio reverts to your entry point, the algorithm automatically rebalances the token amounts back to your original deposit quantities. At this stage, your holdings inside the pool will perfectly match what you would possess if you had simply held them in a wallet.
If you withdraw your liquidity at this precise moment, you incur zero impermanent loss and walk away with 100% of your original tokens, plus all accumulated trading fees.
Sources:
Bitcoin DCA (Dollar Cost Averaging) Historical ROI Calculator