Impermanent Loss — Full Derivation

Impermanent loss as a function of price ratio — symmetric in log-price, always negative.

Intuition: What Impermanent Loss Actually Is

Imagine you own 1 ETH (worth $1,000) and $1,000 USDC. You have two choices:

  1. Hold both in your wallet. Whatever happens to ETH’s price, you still have 1 ETH and $1,000 USDC.
  2. Deposit both into a liquidity pool so other people can trade ETH↔USDC, and you earn a fee on every trade.

If you choose option 2 and ETH doubles to $2,000, here’s what happens: arbitrageurs (automated bots that exploit price differences) buy the cheap ETH from your pool until the pool’s price matches the market. When the dust settles, the pool has rebalanced — it now holds less ETH and more USDC than you deposited. You effectively sold some of your ETH on the way up.

Your pool position is now worth about $2,828. But if you’d just held in your wallet, you’d have $3,000 (1 ETH × $2,000 + $1,000 USDC). That $172 gap is impermanent loss — you gave up upside by letting the pool auto-sell your winners.

The key insights:

  • IL is always a loss (or zero). The pool never outperforms holding — it can only match holding when the price returns exactly to where you deposited.
  • IL depends on how far the price moves, not which direction. A 2× price increase and a 2× price decrease produce the same loss. What matters is magnitude, not direction.
  • “Impermanent” is misleading. The loss is real. It’s called “impermanent” because if the price returns to the starting point, the loss disappears. But prices are under no obligation to revert.
  • Fees are the compensation. LPs accept this cost because they earn trading fees. The core question is always: do fees exceed IL? (See lp-profitability for that analysis.)

Prerequisites

This note derives IL from the constant-product invariant (). Familiarity with that formula helps but isn’t required — the intuition above covers the essential idea. The later sections connect IL to options theory (short straddle / gamma), which draws on concepts from lp-profitability.


Impermanent loss (IL) is the cost a liquidity provider (LP — someone who deposits tokens into a pool so others can trade) pays for holding assets inside a constant-product pool rather than simply holding them in a wallet. It arises mechanically from the invariant : as the price moves, arbitrageurs rebalance the pool, and the LP ends up with more of the depreciating asset and less of the appreciating one.

“Impermanent” is a misnomer adopted by the community — the loss is perfectly real and permanent if the price does not revert. A better name would be rebalancing loss or adverse selection cost (adverse selection — a term from market microstructure — means the pool is systematically on the wrong side of informed trades: it sells cheap to buyers who know the price is about to rise).

Setup

Notation

  • , — price of token X (in terms of Y) before and after the move.
  • — the price ratio: how much the price moved, as a multiple. means the price doubled; means it halved. We use instead of raw prices because IL depends only on how far the price moved, not on the absolute price level.
  • — pool reserves before the move; — after.

At time 0, the pool holds reserves with invariant . The marginal price (current quoted price) of X in terms of Y is:

At time 1, the pool’s price has moved to . The price can move for two different reasons:

  • Multi-venue tokens (e.g., ETH/USDC, which trades on Uniswap, Binance, Coinbase, and dozens of other venues): the price moves on external markets first, and arbitrageurs (bots that exploit price differences between markets) trade against the pool until its price matches the external price.
  • Single-venue tokens (e.g., a memecoin that just graduated from Pump.fun to PumpSwap and trades nowhere else): there is no external market to arbitrage against. The price moves because of organic trading — people buying the hype or panic-selling — directly in the pool.

The IL formula does not care why the price moved. It only depends on the price ratio . Whether arbitrageurs or organic traders caused the move, the LP’s reserves rebalance the same way and the loss is the same. The question is: what does the pool look like after the price has moved, and how much value did the LP lose?

New Reserves After Price Change

Define the price ratio — the factor by which the price changed. If ETH goes from $1,000 to $2,000, then . If it drops to $500, . We need the new reserves satisfying:

  1. (invariant preserved)

From (1): . Substituting into (2):

More symmetrically, using and :

When price goes up (), and : the pool has sold X (the appreciating asset) and accumulated Y. This is the mechanism of adverse selection — the pool systematically sells winners and buys losers.

LP Portfolio Value

The LP’s portfolio value (in terms of Y) at time 1 is:

Since (by the definition of , rearranged as , so ):

HODL Portfolio Value

HODL (“Hold On for Dear Life”) is crypto slang for simply holding tokens in your wallet without trading or depositing them. If the LP had simply held the initial tokens in a wallet:

The Impermanent Loss Formula

where is the price ratio (e.g., means the price doubled, means it halved).

Why Can’t the Smart Contract Just Avoid IL?

If IL is bad for LPs, why not design a contract that doesn’t have it? The short answer: you can, but every alternative sacrifices something worse. IL is not a bug in the constant-product formula — it is the cost of providing liquidity without knowing the true price.

Here is why:

The invariant forces rebalancing. The rule means the pool must adjust its reserves when someone trades. If a buyer takes X out of the pool, the pool has less X and more Y — and the price changes. That adjustment is the pool’s entire purpose: it provides liquidity by always being willing to trade. IL is the price the LP pays for that willingness.

Could you use a different formula? Yes, but each alternative has a fatal flaw:

DesignIL?The catch
Constant-product ()YesStandard tradeoff: IL exists, fees compensate
Constant-sum (, fixed price)NoPool can be completely drained — a buyer takes all of one token at the fixed price. A single large trade empties the pool.
Oracle-based (pool reads price from an external feed)ReducedRequires trusting an oracle. Who runs it? What if it’s manipulated or goes offline? Introduces centralization and a new attack surface.
Refuse to trade when price movesNoThen you’re not providing liquidity — which is the entire point of the pool

The TradFi parallel. In traditional markets, a market maker who quotes prices earns the bid-ask spread but loses when informed traders trade against stale quotes. The market maker cannot avoid this without either (a) knowing the true price before everyone else (impossible in an efficient market), (b) widening the spread so much that nobody trades (destroying liquidity), or (c) refusing to quote at all (ceasing to be a market maker). An AMM LP faces the same trilemma. IL is the DeFi version of the market maker’s adverse selection cost — a fundamental cost of the business, not an engineering oversight.

For single-venue tokens (like a freshly graduated Pump.fun memecoin), the same logic applies. Even though there is no external market setting the “true” price, the pool still mechanically sells the appreciating token and buys the depreciating one as traders move the price. If the LP had simply held, they would have kept more of the winner. The pool’s willingness to trade in both directions is what creates IL — and that willingness is what makes the pool useful.

“Why not adjust the execution price to offset the loss?” You could modify the formula to charge traders more — give them fewer tokens per unit of input, protecting the LP. But the LP’s loss is the trader’s gain: the pool sold the appreciating token cheaply, and the trader received it cheaply. If you add an offset to eliminate that, you’re just raising the price. Raise it enough to fully cover IL and no one trades with your pool — they’ll go to a competitor or not trade at all.

This offset already exists: it’s called the fee. Uniswap’s 0.3% fee and PumpSwap’s 1% fee are exactly this — a surcharge on every trade that compensates the LP for adverse selection. The question “can we add an offset?” is really “can we set fees high enough to cover IL?” — and the answer depends on how much trading volume the pool attracts versus how much the price moves. That tradeoff is analysed in lp-profitability.

Could the offset be dynamic — adjusting in real time to track IL? The contract can’t know at trade time whether a price move is temporary (the price will revert, IL disappears) or permanent (IL is real). It only knows after the fact. Some protocols experiment with dynamic fees (higher fees during volatile periods) to approximate this, but none can eliminate IL entirely without also eliminating liquidity.

Properties

IL(1) = 0. When price does not change, there is no loss:

IL is always non-positive. By the AM-GM inequality (the Arithmetic Mean of two numbers is always ≥ their Geometric Mean — i.e., for any ):

with equality only at .

IL is symmetric in log-price. Here is a surprising fact: a 2x price increase () and a 2x price decrease () produce the same IL (check the reference table below — both give ). The loss depends on how far the price moved, not which direction.

To see why mathematically, switch from the price ratio to its logarithm: let (the log-price change — positive for increases, negative for decreases, zero for no change). Then:

where is the hyperbolic secant function (), a bell-shaped curve that peaks at 1 when and decays toward 0 as grows.

Since is an even function (symmetric around zero: ), we get — the IL for a price doubling () equals the IL for a price halving (). The loss depends on the magnitude of , not its sign.

Second-order expansion. For small moves :

The loss is quadratic in the log-price change — reminiscent of gamma exposure in options. In options, gamma measures how fast an option’s sensitivity to price (its delta) changes as the underlying moves. Being “short gamma” means your position loses value proportionally to the square of the price move — exactly what IL does.

Reference Table

Price ratio IL
1.000.0000.00%
1.250.223-0.60%
1.500.405-2.02%
2.000.693-5.72%
3.001.099-13.40%
5.001.609-25.46%
10.002.303-42.50%
0.50-0.693-5.72%
0.10-2.303-42.50%

The symmetry between and is visible in the table.

Connection to Options

The quadratic dependence on and the log-price symmetry are not coincidental — an LP position is economically similar to a short straddle (see options-basics). The full mapping (gamma exposure, break-even as implied vol, where the analogy breaks in the tails) is in lp-as-short-vol.

IL as Adverse Selection

IL can also be understood as the LP’s adverse selection cost — the DeFi equivalent of a market maker losing to informed flow. The connection to Kyle’s model applies to both multi-venue tokens (where arbitrageurs trade against stale pool prices) and single-venue tokens (where directional trading flow moves the price). In both cases, IL is proportional to for small moves — quadratic in volatility, just as Kyle’s informed-trading loss is proportional to fundamental volatility. See trading-fundamentals for the TradFi parallel.

The Gamma Connection

An LP’s impermanent loss has the same mathematical structure as the P&L of a short gamma options position. For small log-price changes , the IL approximation:

matches the standard options P&L formula with effective (in log-price units). An LP is short gamma — every price move, in either direction, costs the LP proportionally to the square of the move.

This is why IL is sometimes called a “gamma cost” in options language. The parallel extends further:

ConceptShort straddleLP position
What you collectOption premiumsTrading fees
What you lose to when price movesImpermanent loss when price moves
Quadratic loss (log-price)
Break-evenRealized vol < implied vol of premiumRealized vol < from fees
Tail behaviourLoss grows linearly in tailsLoss bounded (sech-shaped, approaches -100%)

For the full treatment of delta, gamma, and how they measure option sensitivity, see the-greeks. For how break-even vol acts as the LP’s implied volatility, see lp-as-short-vol.


Companion notebook: notebook — interactive explorer for IL as a function of price ratio ; the representation; comparison with short straddle payoff.

Questions to sit with:

  1. IL is quadratic in log-price for small moves and -shaped globally. A short straddle is locally quadratic (gamma) but linear in the tails. Where does the analogy break down?
  2. If you could hedge the IL of an LP position using options on the underlying token, what strike and expiry would you choose?
  3. IL depends on but is path-independent — it does not matter how the price got to . Why? What feature of the constant-product invariant guarantees this?