Impermanent loss calculation: fixing common math mistakes
A pool showing a 42% fee APR can still underperform a simple wallet hold by a painful margin. The gap is usually not a protocol failure.

It is a modeling failure: the investor calculated “impermanent loss” from a token’s percentage move, used a v2 calculator on a concentrated-liquidity position, or treated fees as though they were embedded in the divergence formula.
That is how a liquidity provider gets a clean-looking dashboard, a large nominal yield figure, and an unreliable answer to the only question that matters: did the liquidity position outperform holding the assets it started with?
Impermanent loss calculation is straightforward only inside a narrow box: two assets, 50/50 value weights, full-range liquidity, and a constant-product AMM such as Uniswap v2. Outside that box, the shorthand becomes dangerous. The formula remains useful, but only when the structure of the pool actually matches its assumptions.
Impermanent loss is not the dollar loss on an LP position. It is the shortfall of that position versus holding the original token quantities at current market prices.
The mechanics of the constant-product formula
For a standard two-token, full-range, 50/50 constant-product pool, the liquidity pool profit loss formula begins with the invariant:
x × y = k
As traders buy one asset from the pool, they add the other. The pool mechanically rebalances: it sells the asset rising in relative price and accumulates the asset falling in relative price. That is the source of divergence loss.
The standard formula is:
IL = 2 × √r / (1 + r) − 1
Where:
- r is the current-to-entry relative price ratio.
- Both prices must be quoted in the same direction at entry and at measurement. For example, ETH priced in USDC at both points.
- The result is normally negative because it expresses LP underperformance relative to holding.
If ETH moves from $2,000 to $4,000 while USDC remains stable, then the relative price ratio is:
r = 4,000 / 2,000 = 2
Insert that ratio into the formula:
IL = 2 × √2 / (1 + 2) − 1
The result is approximately −5.7%.
That does not mean the LP lost 5.7% of its starting capital. It means that, at the new ETH price, the LP position is worth about 5.7% less than the original ETH-and-USDC inventory would be worth if it had remained untouched.
The distinction is operational, not semantic. Suppose the position started with 1 ETH and 2,000 USDC when ETH traded at $2,000. The initial portfolio was worth $4,000. If ETH doubles, simply holding the original assets is worth $6,000. The LP’s dollar value may still have risen substantially from $4,000. It just did not keep pace with the hold benchmark because the AMM sold ETH into the rally.
A practical reference table for full-range 50/50 pools
| Relative price ratio (r) | Market interpretation | Impermanent loss versus holding |
|---|---|---|
| 1.00× | No relative price change | 0% |
| 1.25× | One asset rises 25% versus the other | ~0.6% |
| 1.50× | One asset rises 50% versus the other | ~2.0% |
| 1.75× | One asset rises 75% versus the other | ~3.8% |
| 2.00× | One asset doubles relative to the other | ~5.7% |
| 3.00× | One asset triples relative to the other | ~13.4% |
| 4.00× | One asset quadruples relative to the other | ~20.0% |
| 5.00× | One asset rises fivefold relative to the other | ~25.5% |
The table is not a generic risk score for DeFi. It is a narrow constant-product result. Use it for a full-range ETH/USDC-style pool. Do not carry it into a concentrated range, an 80/20 weighted pool, or a stable-swap curve and call the output precise.
Why price ratios outperform simple percentage changes
The first recurring error is using a signed price change rather than a price ratio. “Token A is down 50%” sounds like a usable input. It is not sufficient unless the quote convention is explicit.
The formula needs the current price divided by the entry price:
r = Pcurrent / Pentry
If the asset doubles, r = 2. If it halves, r = 0.5. In a standard 50/50 constant-product pool, both moves create the same divergence loss: roughly 5.7% versus holding.
That symmetry catches many weak calculations. A trader may say, “The token gained 100%, so impermanent loss is 5.7%,” then say, “The token fell 50%, so the loss should be smaller.” It is not. A doubling and a halving are reciprocal moves. The AMM’s rebalancing exposure is symmetric around the entry ratio.
The error often enters through inconsistent quoting. Consider an ETH/USDC pool:
1. At entry, record ETH in USDC: 2,000 USDC per ETH.
2. At review, record ETH in USDC again: perhaps 3,000 USDC per ETH.
3. Calculate r as 3,000 / 2,000 = 1.5.
4. Apply the formula. The divergence loss is approximately 2.0%.
Do not use ETH/USDC at entry and then USDC/ETH at the current point. That reverses the ratio and produces a meaningless comparison unless the entire calculation is consistently inverted.
The same discipline applies to so-called stablecoin pair impermanent loss. If USDC and DAI trade close to parity, relative-price movement is usually limited, so the standard 50/50 divergence component should be modest. But “stable” is a market behavior, not an invariant. A depeg changes the ratio rapidly, and the pool’s inventory can migrate toward the asset the market is discounting. Peg stability is therefore a risk input, not a decorative label beside a pool.
There is another issue: price movement alone says nothing about realized LP economics. A stablecoin pair with low divergence may deliver weak returns if fee generation is thin, utilization rate is poor, or one side carries redemption and depeg risk that the displayed APR does not price properly.
The correct input is not “how much did my token move?” It is “how far did the pool’s relative price move from my entry ratio?”
The trap of applying v2 math to concentrated liquidity
The v2 formula assumes full-range liquidity and a portfolio that continuously behaves as a 50/50 constant-product position. Uniswap v3 and v4 do not give an LP that profile unless the chosen range happens to replicate it over the relevant price path.
A concentrated-liquidity position has four variables that a basic impermanent loss calculator does not see:
- the lower tick;
- the upper tick;
- the current tick;
- the liquidity amount attached to that range.
In-range, the token mix changes as price moves through the selected band. At the upper or lower boundary, the position becomes fully denominated in one token. Once price is outside the range, the LP stops earning swap fees until price returns inside it.
That is not a minor adjustment to v2 math. It is a different payoff shape.
For v3, the active condition is:
tickLower ≤ current tick < tickUpper
The current price is represented on-chain through the square-root price variable:
sqrtPrice = sqrtPriceX96 / 2^96
And tick-based pricing follows the protocol’s 1.0001 increment convention. The point is not that every LP needs to manually decode sqrtPriceX96 before depositing. The point is that a range position cannot be valued correctly by pretending it remains a balanced 50/50 basket.
Consider a narrow ETH/USDC range entered with ETH at $2,000:
- If ETH trades inside the range, the position earns fees and its token weights shift continuously.
- If ETH rallies through the upper boundary, the position converts into the quote asset under the relevant pool convention and becomes inactive.
- If ETH drops through the lower boundary, the position converts into the other asset and also becomes inactive.
- The current outcome depends on the actual range, not just on ETH’s percentage change since entry.
A v2 calculator may report a manageable 2% or 5.7% divergence number. Meanwhile, the v3 position may be entirely in one token, no longer collecting fees, and carrying a directional exposure very different from the investor’s intended allocation.
This matters most when the strategy is marketed as “high capital efficiency.” Capital efficiency is real, but it is not free yield. Tight ranges increase fee density only while liquidity is active and while the pool’s trading flow supports it. They also raise rebalance frequency, gas sensitivity, and the probability of ending up parked on one side of the pair.
The correct calculation sequence for a v3 or v4 position
A credible yield farming net return analysis should proceed in this order:
1. Snapshot the entry state. Record the position’s token amounts, the entry price, lower and upper ticks, liquidity, and the value of both deposited assets in a chosen base currency.
2. Read the current state from the position, not from a generic calculator. Determine whether price is in range and calculate current token holdings using the position’s range and current square-root price.
3. Value the hold benchmark. Price the original deposited token quantities at current market prices. This is the benchmark the LP must beat.
4. Calculate divergence separately. Compare current principal inventory with the hold benchmark before adding fees, incentives, gas, or management costs.
5. Add actual cash flows. Include collected and uncollected fees, reward tokens valued under a stated method, rebalancing costs, swap costs, and any incentive dilution.
6. Stress the range. Model what happens if price reaches either boundary, remains outside for a period, or crosses the range repeatedly. A position with attractive historical fees can have weak forward expected value once inactive time is included.
The v4 liquidity math follows the same core concentrated-liquidity model as v3. A new hook architecture does not turn a range position into a v2 pool. If a dashboard presents one APY number without showing range status, inventory composition, and realized fee flow, it is reporting marketing geometry rather than portfolio risk.
Divergence loss is not net profitability
The most consequential accounting mistake is treating impermanent loss as the final return figure. It is not. It is one leg of the P&L.
A complete LP return has at least four components:
Net LP return = inventory value change versus hold + trading fees + incentives − gas − execution costs − management costs
The first term is where divergence loss belongs. It is negative when the LP underperforms holding the original assets. Fees and incentives may offset it. They may also fail to offset it, especially once reward-token volatility and exit liquidity are treated honestly.
A pool can display a 60% annualized fee rate after a week of unusual volume. That tells you little about whether a 20% relative price move over the same period has already created an adverse inventory shift. The relevant measure is not headline APY. It is whether realized fee capture compensates for divergence, after costs, over the holding period actually available to the strategy.
A disciplined scenario analysis looks like this:
| Scenario | Relative-price move | Divergence effect | Fee environment | Strategic reading |
|---|---|---|---|---|
| Low-volatility, deep liquidity | Near 1.0× | Minimal | Moderate but persistent | Often viable if fee revenue is real and token risk is controlled |
| Trending market | 1.5× to 2.0× | ~2.0% to ~5.7% in v2 terms | Can be high, but inventory is rebalanced against the trend | Fees must be measured, not annualized from a short burst |
| Violent directional move | 3.0× or more | ~13.4%+ in v2 terms | Frequently unstable | LP has effectively sold the winner and accumulated the laggard |
| Concentrated range breach | Depends on range | Cannot be summarized by v2 formula | Falls to zero while out of range | Inventory and inactivity risk dominate the APY display |
The fee side also needs clean valuation. If fees accrue in volatile tokens, their current mark may flatter or understate the result. If incentives are paid in a thin governance token, the displayed reward rate may assume liquidity depth that does not exist at your intended exit size. A high nominal emission rate with shallow exit liquidity is not yield in the portfolio-manager sense. It is a mark-to-model claim.
For a delta-neutral LP mandate, the risk question is even tighter. A two-sided liquidity position is not automatically delta-neutral merely because it contains two assets. The AMM changes inventory as relative prices move. A hedge may reduce directional exposure, but it introduces funding costs, basis risk, liquidation risk, and operational complexity. The hedge must be evaluated against the actual position delta, which changes with price and, in concentrated liquidity, with range location.
Non-standard invariants: weights matter more than familiar labels
The 50/50 formula is not a universal AMM formula. It is specific to a two-asset constant-product structure.
Balancer weighted pools use an invariant based on token balances raised to normalized weights, with weights summing to one. An 80/20 pool does not have the same rebalancing profile as a 50/50 pool. Its smaller allocation to the volatile asset can reduce divergence exposure relative to an equal-weight structure, but it does not eliminate the underlying mechanism.
This is where investors often apply the right equation to the wrong machine.
A practical classification helps:
- Uniswap v2-style, two-token, full-range pools: the standard 50/50 formula is an appropriate starting point.
- Uniswap v3 and v4 concentrated positions: use position-level valuation based on range, ticks, liquidity, and current price. The v2 equation is not a complete answer.
- Balancer weighted pools: use the weighted invariant and the pool’s actual token weights. Do not force an 80/20 structure into a 50/50 model.
- Multi-token pools: evaluate the full basket and its invariant. Pairwise shortcuts can omit meaningful cross-asset exposure.
- Stable-swap designs: analyze the curve behavior around the peg, the composition drift under stress, and the depeg scenario. A stable label does not make the constant-product formula valid.
At deposit, there is a second, quieter source of loss: entering at the wrong ratio. In a constant-product pool, liquidity must be supplied in the proportion implied by the pool’s current reserves. If the pool is priced at a 5:1 asset ratio and an investor attempts to supply a mismatched ratio, only the correctly proportioned amount can become productive liquidity; the rest may remain unused or be exposed to arbitrage depending on the route used.
That is not impermanent loss. It is entry inefficiency. But in performance reporting, the two are frequently mixed together and then blamed on “AMM price impact.” Keep the ledger clean:
- Entry slippage or arbitrage exposure happens at execution.
- Divergence loss arises from inventory rebalancing after relative prices move.
- Fee income is compensation from swap flow.
- Incentive income is a separate token distribution with its own market and liquidity risk.
- Gas and rebalance costs are operational drag.
If those items are combined into one opaque ROI figure, the strategy cannot be audited.
A stricter ROI test before committing capital
The useful question is not whether impermanent loss is “temporary.” The useful question is whether the compensation for providing liquidity exceeds the inventory risk and operational drag under plausible price paths.
Use a strict return calculation:
LP ROI versus holding = (current LP value + realized fees + uncollected fees + net incentive value − all costs) / current value of original token quantities − 1
The denominator is deliberately the current value of the original assets, not the initial deposit value. That keeps the benchmark honest. If ETH rallied 100%, an LP should be judged against what the original ETH allocation would be worth now, not against a stale entry valuation that makes any positive dollar result look successful.
For a full-range 50/50 pool where the relative price doubled, the position begins with roughly a 5.7% performance deficit versus holding. Fees, incentives, and any active management must clear that deficit before the LP can claim outperformance. For a concentrated position, calculate current inventory first; there is no responsible shortcut.
The final discipline is simple: match the model to the AMM, match the benchmark to the original assets, and separate divergence from cash flow. Anything else can produce a polished APY number, but not an investable yield decision.