Impermanent Loss

Impermanent loss calculation, modeling, and breakeven analysis for AMM liquidity provision across pool types

564 stars 113 forksAI, LLMs & Agents Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add agiprolabs/claude-trading-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add agiprolabs/claude-trading-skills --skill impermanent-loss
Manual install
git 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-loss

Personal 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%   |
Read the full skill on GitHub

Details

Skill name
impermanent-loss
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

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.