Impermanent Loss
Impermanent loss calculation, modeling, and breakeven analysis for AMM liquidity provision across pool types
Install
/plugin marketplace add agiprolabs/claude-trading-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add agiprolabs/claude-trading-skills --skill impermanent-lossgit clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git /tmp/claude-trading-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-trading-skills/skills/impermanent-loss ~/.claude/skills/impermanent-lossPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the 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 ``` Where `r = P_new / P_initial` (the price ratio). ### IL at Key Price Ratios | Price Change | Ratio (r) | IL | |-------------|-----------|----------| | -75% | 0.25 | -5.72% | | -50% | 0.50 | -5.72% | | -25% | 0.75 | -0.60% | | 0% | 1.00 | 0.00% | | +25% | 1.25 | -0.60% |
Details
- Skill name
impermanent-loss- Repository
- agiprolabs/claude-trading-skills
- Path
skills/impermanent-loss/SKILL.md- License
- MIT
- Repo updated
- 3 September 2026
FAQ
What does the Impermanent Loss skill do?
Impermanent loss calculation, modeling, and breakeven analysis for AMM liquidity provision across pool types
How do I install the Impermanent Loss skill?
Claude Code plugin: /plugin marketplace add agiprolabs/claude-trading-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Impermanent Loss popular?
It lives in agiprolabs/claude-trading-skills, which has 564 GitHub stars and 113 forks.
Related skills
Backtrader
564agiprolabs/claude-trading-skills
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
Birdeye API
564agiprolabs/claude-trading-skills
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
Coingecko API
564agiprolabs/claude-trading-skills
Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.
Slippage Modeling
564agiprolabs/claude-trading-skills
Execution cost estimation, slippage curve modeling, and optimal trade sizing based on AMM liquidity depth
Feature Engineering
564agiprolabs/claude-trading-skills
Feature construction from market data for ML trading models including price, volume, on-chain, and microstructure features
Volatility Modeling
564agiprolabs/claude-trading-skills
Volatility estimation, forecasting, and regime classification using GARCH, EWMA, realized volatility, and volatility cones
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.