Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.raydium.io/llms.txt

Use this file to discover all available pages before exploring further.

Impermanent loss (IL) is the gap between (a) the value of your LP position and (b) the value you would have had if you had simply held the two tokens from deposit to now. It is “impermanent” in name only — if you withdraw while prices have diverged, the loss is realised. This page gives the formulas, the intuition, and the break-even APRs for CPMM and CLMM.

The simple case: xy=k (CPMM, AMM v4)

Suppose at deposit you put in x₀ tokens of A and y₀ tokens of B with price P₀ = y₀ / x₀. A constant-product pool maintains x · y = k = x₀ · y₀. When the external price of A in B moves to P₁, arbitrageurs rebalance the pool until marginal price matches, giving:
x₁ = √(k / P₁)
y₁ = √(k · P₁)
Your LP share is worth x₁ · P₁ + y₁ tokens of B. Compare to simply holding: x₀ · P₁ + y₀. The ratio is:
V_LP / V_HOLD = 2 · √r / (1 + r)     where r = P₁ / P₀
IL is 1 − V_LP / V_HOLD. A few sample values:
Price change rV_LP / V_HOLDIL
1.00× (no change)1.00000.00%
1.25× (+25%)0.99380.62%
1.50× (+50%)0.97982.02%
2.00× (+100%)0.94285.72%
3.00× (+200%)0.866013.40%
5.00× (+400%)0.745425.46%
0.50× (−50%)0.94285.72%
0.25× (−75%)0.800020.00%
IL is symmetric in P₁ / P₀ vs P₀ / P₁: doubling and halving produce the same IL.

Intuition

The pool is constantly selling whichever side goes up and buying whichever side goes down, at average prices worse than the new equilibrium. IL is the rebate you pay to arbitrageurs for keeping the pool honest. In exchange, you earn trading fees — the hope is that fees more than offset IL over the holding period.

Break-even fee APR (CPMM)

Given realised volatility σ (annualised stdev of log-returns) and no correlation, a rough first-order IL rate is:
dIL/dt ≈ σ² / 8    per year
So the break-even fee APR for a CPMM LP is approximately σ² / 8.
Realised vol (annualised)IL-per-yearBreak-even fee APR
20%0.50%0.50%
40%2.00%2.00%
80%8.00%8.00%
120%18.00%18.00%
200%50.00%50.00%
A SOL/USDC pair running ~80% annualised vol needs roughly 8% fee APR to break even on IL. If the pool quotes 30% fee APR, the LP is netting ~22% after IL (before SOL-denominated PnL).

Caveats

  • This ignores fees compounding into the position.
  • It assumes continuous rebalancing by perfectly-efficient arbitrage, which overstates IL slightly on Solana where arb has latency.
  • It assumes the path is log-normal; fat-tailed meme tokens underestimate IL at this formula.

CLMM-specific IL

In a concentrated-liquidity pool you pick a range [P_lo, P_hi]. Three things change versus CPMM:
  1. Inside the range, IL is amplified because you have effectively leveraged your capital. The multiplier is roughly 1 / (1 − √(P_lo/P_hi)), so a range that goes from −50% to +100% (P_hi / P_lo = 4) has a leverage of ~2× and an IL ~2× a CPMM position over the same move.
  2. Outside the range, you hold only one token. Once price crosses P_hi, you hold 100% of the lower-numbered token (typically the “base”); below P_lo, you hold 100% quote. No further swaps happen against your position, so IL is bounded but so are fees (zero).
  3. Rebalancing = realising IL + opening a new range at the new price. Every rebalance locks in the loss to that point and starts fresh.

IL vs HODL for a CLMM position

For a position with range [P_lo, P_hi] and current price P, with P₀ the entry price (somewhere in the range), let:
√P₀̄ = √P₀ · (bounded by √P_lo, √P_hi)
√P̄   = √P  · (bounded by √P_lo, √P_hi)
The IL relative to holding the entry composition is the standard V_LP / V_HOLD formula applied to the clamped prices. That is: if price stays inside the range, IL behaves like a CPMM IL on a position leveraged by the range-width factor. If price exits the range, IL is fixed at the single-token composition: all base or all quote, priced at P but valued against a portfolio you would have held 50/50 at P₀.

Worked CLMM example

Assume you deposit SOL/USDC into a CLMM at SOL = $160, range [$120, $200], $10,000 equally split.
  • Range width: P_hi / P_lo = 200 / 120 ≈ 1.67. Leverage factor ≈ 1 / (1 − √(120/200)) ≈ 4.6×.
  • If SOL moves to $180 (+12.5%), HODL value = $10,625; CLMM position ≈ $10,597; IL ≈ 0.26%.
  • If SOL moves to $200 (+25%), HODL value = $11,250; CLMM position is now 100% USDC worth ~$11,180; IL ≈ 0.62%.
  • If SOL moves to $240 (+50%, outside range), HODL value = $12,500; CLMM position is still 100% USDC worth ~$11,180; IL ≈ 10.6%.
The same position in a CPMM (no range) would have IL of ~2.02% at $240 and continue earning fees. The CLMM position has higher fee capture while in range but much worse IL once out of range for an extended period.

Single-sided deposits

Raydium CLMM supports opening a position by depositing only one token if the current price is at or outside the corresponding range boundary. This is equivalent to placing a limit order — the pool will swap your single-side deposit into the other token as price moves through the range. IL on single-sided deposits is calculated the same way but with a different entry composition.

Mitigations

  • Stick to correlated pairs. Stable/stable and LST/SOL have near-zero IL at realistic horizons.
  • Use LaunchLab tokens cautiously. Newly-launched tokens typically run 200–400% annualised vol, meaning IL eats 20–50% per year.
  • Widen CLMM ranges if you won’t rebalance. A 2× wider range has ~half the fee density and ~half the IL amplification — roughly the same IL-per-fee-earned ratio over long horizons.
  • Auto-compound fees. CPMM does this implicitly; CLMM requires manual collectFee + re-deposit. Farm-auto-compound vaults (several 3rd-party) automate this.

Verification tools

  • sdk-api/typescript-sdkgetLpTokenAmount and getPositionInfo return current exposure; diff against your entry basis.
  • sdk-api/rest-api/pools/info/ids returns historical price series for IL backtests.
  • External: dune.com and defillama.com both host IL simulators that can import a Raydium pool id and replay history.

Pointers

Sources:
  • Uniswap V2 whitepaper (CPMM IL derivation).
  • Uniswap V3 whitepaper (concentrated-liquidity IL amplification).
  • Panoptic and GFX Labs CLMM IL research, 2024–2025.