Automated Market Maker (AMM) Impermanent Loss Calculator
Calculate exact impermanent loss (IL) for liquidity providers on Uniswap, SushiSwap, and PancakeSwap constant-product (x·y=k) pools.
Parameters & Inversions
Deterministic EngineCalculated Output Metrics
Analytical Proof & Invariants
Machine PrecisionIL = 2 · √k / (1 + k) - 1 | where k = Price Ratio (P_new / P_initial)
Step-by-Step Mathematical Derivation
AMM invariant x · y = k requires rebalancing as relative price changes. Price ratio k = P_new / P_initial = 2.0.
IL = [2 · √k / (1 + k)] - 1. For k = 2.0: 2 · √2 / (1 + 2) - 1 = (2 · 1.41421 / 3) - 1 = 0.9428 - 1 = -0.05719 (-5.72%).
If held in a private wallet: Value = $5,000 in Token B + $5,000 × 2.0 in Token A = $15,000 total.
AMM Pool Value = HODL Value × (1 + IL) = $15,000 × (1 - 0.0572) = $14,142.14. Arbitrageurs drained $857.86 from the pool.
Artificial Intelligence & Prompt Integration
Paste this verified mathematical prompt directly into ChatGPT, Claude, or Gemini to eliminate arithmetic hallucination, or invoke the programmatic API endpoint for automated workflows.
Generating verified mathematical prompt...
llms.txt
✓ Exact Radical Form & Closed Formulas
✓ Machine-Readable Edge API