Understanding Impermanent Loss in Automated Market Makers (AMMs)
Impermanent loss is one of the most critical risk factors in decentralized finance (DeFi). It represents the difference in total dollar value between depositing tokens into an Automated Market Maker (AMM) liquidity pool versus simply holding (HODLing) those same tokens in a personal wallet. Whenever the market price ratio between two pooled assets diverges from their initial ratio at deposit, liquidity providers experience impermanent loss.
While traders use tools like the crypto profit calculator to estimate directional gains on spot holdings, liquidity providers on decentralized exchanges like Uniswap, Balancer, and SushiSwap act as passive counterparties. As token prices drift on external centralized exchanges, automated arbitrageurs trade against the liquidity pool to rebalance it, leaving liquidity providers with more of the depreciating asset and less of the appreciating asset.
How Constant Product Market Makers Work
Most classic 50/50 liquidity pools run on the constant product formula established by Uniswap v2:
Here, and represent the reserve balances of the two deposited tokens, and is a fixed invariant that must remain constant throughout individual trades (excluding trading fees). Because the pool enforces an exact 50/50 value balance between Token A and Token B, changes in the relative price force the pool to change its internal asset composition.
When external traders take advantage of price discrepancies across decentralized and centralized platforms (a strategy modeled in our crypto arbitrage calculator), they drain the surging token from the pool while depositing more of the lagging token. This automatic rebalancing mechanic is the mathematical engine that generates impermanent loss.
The Mathematical Formula for Impermanent Loss
The percentage impermanent loss depends exclusively on the relative price ratio change between the two tokens, designated as , where is the initial price ratio and is the future price ratio:
Because the geometric mean of two numbers is mathematically always less than or equal to their arithmetic mean (the classic AM-GM inequality), the term is always less than or equal to 1. Consequently, impermanent loss is always non-positive:
- If (the relative prices are unchanged), impermanent loss is exactly 0%.
- If Token A doubles relative to Token B (), impermanent loss is 5.72%.
- If Token A triples relative to Token B (), impermanent loss is 13.40%.
- If Token A quadruples relative to Token B (), impermanent loss is 20.00%.
- If Token A falls by 50% relative to Token B (), impermanent loss is also exactly 5.72%, demonstrating symmetry around reciprocal price swings.
Worked Example: ETH / USDC Liquidity Pool
Consider a real-world scenario where a liquidity provider enters a 50/50 ETH/USDC pool:
- Initial Deposit: You deposit $2,000 total. At an initial ETH price of $2,000, you deposit 0.5 ETH ($1,000) and 1,000 USDC ($1,000). The pool invariant is .
- Market Rally: ETH doubles on external exchanges to $4,000 per token, while USDC remains pegged at $1.00.
- Arbitrage Rebalancing: Arbitrageurs buy ETH from the pool at the old price until the pool price matches $4,000. The new pool reserves become:
- HODL Strategy Comparison: If you had simply held your original 0.5 ETH and 1,000 USDC in a private wallet, your holdings would be worth:
- LP Value (Before Fees): Your assets in the pool are worth:
- Divergence Cost: Your impermanent loss in dollar terms is . As a percentage of the HODL value, this is .
Although your total dollar portfolio grew from $2,000 to $2,828.43 (a 41.42% net gain), you made $171.57 less than if you had simply held the underlying tokens without providing liquidity.
When Does Providing Liquidity Beat HODLing?
Impermanent loss is only half of the equation. In exchange for supplying liquidity, AMMs distribute swap fees (typically 0.05% to 1.00% per trade) directly to liquidity providers. If accumulated swap fees exceed the impermanent loss over your holding period, supplying liquidity is more profitable than holding.
In our example above, if the pool generated an annualized fee APR of 25% and you provided liquidity for 180 days, you would earn approximately $348 in accumulated trading fees. Adding those fees to the pool value yields , outperforming the HODL strategy by $176.43.
Investors who utilize debt or margin in their strategies, such as those evaluated on our crypto leverage calculator, must be especially cautious when pairing borrowed assets with liquidity pools, as sudden divergence can trigger both liquidation and unexpected divergence drag.
Strategies to Minimize Impermanent Loss
- Pair Correlated Assets: Providing liquidity to pegged pairs like USDC/USDT, DAI/USDC, or stETH/ETH virtually eliminates impermanent loss because their price ratio remains close to 1:1.
- Focus on High-Volume Pools: High transaction volume translates to massive fee generation that can quickly eclipse moderate impermanent loss.
- Time Your Exit: Because the loss is termed impermanent, if token prices return to their initial ratio before you withdraw your liquidity, the impermanent loss disappears entirely.
- Use Concentrated Liquidity Wisely: In Uniswap v3 and v4, providing liquidity within narrow price bands boosts fee yield significantly, but intensifies the rate of impermanent loss when the price crosses the boundaries of your active tick range.
Frequently asked questions
Why is it called "impermanent" loss?
Does impermanent loss happen when token prices fall?
Can you lose money overall if impermanent loss is high?
What is the difference between APR and APY in liquidity pools?
How does Uniswap v3 concentrated liquidity affect impermanent loss?
Resources and references
The formulas and methods in this calculator were checked against these independent sources.