impermanent-loss

Installation
SKILL.md

Impermanent Loss — Calculation, Modeling & Breakeven Analysis

Impermanent loss (IL) is the cost of providing liquidity to an automated market maker (AMM) relative to simply holding the tokens. When you deposit tokens into a liquidity pool, the AMM continuously rebalances your position as prices move. This rebalancing always works against you — selling winners and buying losers — resulting in less value than if you had just held the original tokens.

Why "Impermanent"?

IL is called "impermanent" because it only crystallizes when you withdraw. If prices return to their original ratio, IL reverts to zero. However, in practice, prices rarely return exactly, so IL is usually quite real.

Key Insight

IL is a function of the price ratio change, not the absolute price. A token moving from $1 to $2 produces the same IL as a token moving from $100 to $200 — both are a 2x ratio change. Direction does not matter either: a 2x increase and a 0.5x decrease produce the same IL magnitude.

Constant-Product IL Formula

For a standard x * y = k AMM (Raydium standard, Orca legacy):

IL = 2 * sqrt(r) / (1 + r) - 1
Related skills
Installs
47
GitHub Stars
20
First Seen
Mar 21, 2026