impermanent-loss
AMM(自動マーケットメイカー)における流動性提供で発生する、一時的な損失の計算やモデル化、損益分岐点分析を行い、様々なプールタイプに対応した投資判断を支援するSkill。
📜 元の英語説明(参考)
Impermanent loss calculation, modeling, and breakeven analysis for AMM liquidity provision across pool types
🇯🇵 日本人クリエイター向け解説
AMM(自動マーケットメイカー)における流動性提供で発生する、一時的な損失の計算やモデル化、損益分岐点分析を行い、様々なプールタイプに対応した投資判断を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o impermanent-loss.zip https://jpskill.com/download/10413.zip && unzip -o impermanent-loss.zip && rm impermanent-loss.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10413.zip -OutFile "$d\impermanent-loss.zip"; Expand-Archive "$d\impermanent-loss.zip" -DestinationPath $d -Force; ri "$d\impermanent-loss.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
impermanent-loss.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
impermanent-lossフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
インパーマネントロス — 計算、モデリング、損益分岐点分析
インパーマネントロス (IL) とは、単にトークンを保有する場合と比較して、自動マーケットメーカー (AMM) に流動性を提供することによるコストです。トークンを流動性プールに入金すると、AMM は価格変動に応じてポジションを継続的にリバランスします。このリバランスは常に不利に働き、勝者を売り、敗者を買うため、元のトークンを保有していた場合よりも価値が低くなります。
なぜ「インパーマネント」なのか?
IL が「インパーマネント(一時的)」と呼ばれるのは、引き出し時にのみ確定するからです。価格が元の比率に戻れば、IL はゼロに戻ります。しかし、実際には価格が正確に戻ることは稀であるため、IL は通常かなり現実的なものです。
重要な洞察
IL は、絶対価格ではなく、価格比率の変化の関数です。トークンが 1 ドルから 2 ドルに動くのと、100 ドルから 200 ドルに動くのとでは、同じ IL が発生します。どちらも 2 倍の比率変化です。方向も関係ありません。2 倍の増加と 0.5 倍の減少は、同じ IL の大きさになります。
定数積 IL の公式
標準的な x * y = k AMM (Raydium standard、Orca legacy) の場合:
IL = 2 * sqrt(r) / (1 + r) - 1
ここで、r = P_new / P_initial (価格比率) です。
主要な価格比率における IL
| 価格変動 | 比率 (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% |
| +50% | 1.50 | -2.02% |
| +100% (2x) | 2.00 | -5.72% |
| +200% (3x) | 3.00 | -13.40% |
| +400% (5x) | 5.00 | -25.46% |
| +900% (10x) | 10.00 | -42.54% |
対称性に注目してください。2 倍の増加 (r=2.0) と 2 倍の減少 (r=0.5) は、どちらも -5.72% の IL を生み出します。
集中流動性 (CLMM) による IL の増幅
集中流動性マーケットメーカー (Orca Whirlpools、Raydium CLMM、Meteora DLMM) を使用すると、LP は価格範囲 [P_lower, P_upper] 内に流動性を集中させることができます。これにより、手数料収入と IL の両方が増幅されます。
集中率
concentration_factor = 1 / (1 - sqrt(P_lower / P_upper))
現在の価格を中心とした ±10% の範囲の場合:concentration_factor ≈ 10x。
CLMM の IL の振る舞い
- 価格が範囲内にある場合: IL は、定数積 IL に比べて集中率によって増幅されます。
- 価格が範囲外に出た場合: ポジションは、損失資産の 100% になります。これは、その方向における最大可能な IL です。つまり、価値が下がるトークンのみを保有することになります。
IL_clmm ≈ IL_constant_product * concentration_factor
この近似は、小さな変動に対して有効です。大きな変動や範囲境界付近の価格の場合は、完全な CLMM の公式を使用してください ( references/il_formulas.md を参照)。
例:CLMM vs 定数積
SOL が 150 ドルで、±20% の範囲 ($120–$180) で LP を行う場合:
| シナリオ | 定数積 IL | CLMM IL (±20%) |
|---|---|---|
| SOL → $180 | -0.62% | ~-3.1% |
| SOL → $200 | -1.03% | 100% SOL (exit) |
| SOL → $120 | -1.80% | ~-9.0% |
| SOL → $100 | -3.42% | 100% USDC (exit) |
IL vs 手数料:損益分岐点分析
すべての LP にとっての核心的な疑問は、得られた手数料が、発生した IL を上回るかどうか? です。
Net Position = LP_value + accrued_fees - hold_value
accrued_fees > IL の場合に利益が出ます。
損益分岐点手数料率
定数積プールの場合、期間ごとの予想 IL はほぼ次のようになります。
expected_IL ≈ σ² / 8
ここで、σ はその期間の対数リターンの標準偏差です。これは次のことを意味します。
| 1日のボラティリティ (σ) | 予想される1日の IL | 損益分岐点となる最低1日の手数料率 |
|---|---|---|
| 1% | 0.001% | 0.001% |
| 3% | 0.011% | 0.011% |
| 5% | 0.031% | 0.031% |
| 10% | 0.125% | 0.125% |
| 20% | 0.500% | 0.500% |
LP の 1 日の手数料収入:
daily_fee_income = (deposit / TVL) * daily_volume * fee_rate
完全な損益分岐点フレームワークについては、references/breakeven_analysis.md を参照してください。
時間経過に伴う IL のモデリング
モンテカルロシミュレーション
幾何ブラウン運動 (GBM) を使用して、多数のランダムな価格パスをシミュレートします。
import numpy as np
def simulate_price_path(
initial_price: float,
daily_vol: float,
days: int,
drift: float = 0.0,
) -> np.ndarray:
"""Simulate a price path using geometric Brownian motion."""
dt = 1.0 # daily steps
log_returns = np.random.normal(
(drift - 0.5 * daily_vol**2) * dt,
daily_vol * np.sqrt(dt),
days,
)
prices = initial_price * np.exp(np.cumsum(log_returns))
return np.insert(prices, 0, initial_price)
各パスについて、各タイムステップでの IL と累積手数料収入を計算します。N 回のシミュレーション後、結果の分布を分析します。
完全なモンテカルロシミュレーションについては、scripts/il_scenario_modeler.py を参照してください。
過去の分析
実際の OHLCV 価格データを使用して、過去の期間における IL がどうであったかを計算します。これにより、より現実的な (ただし後向きの) 見積もりを得ることができます。
IL 軽減戦略
1. ステーブルコインペア
USDC/USDT のようなペアは、価格比率がほとんど動かないため、IL がほぼゼロです。手数料収入はほぼ純粋な利益です。
2. 相関性の高いペア
SOL/mSOL や ETH/stETH のようなペアは一緒に動くため、価格比率は 1.0 に近いままです。IL は最小限です。
3. より広い CLMM 範囲
範囲を広げると集中率が低下し、資本単位あたりの手数料収入が減る代わりに IL が減少します。
4. アクティブな範囲管理
価格を監視し、価格が境界に近づいたら CLMM 範囲をリバランスします。これにより、価格が範囲外に完全に出るリスクが軽減されます。
5. 手数料階層の選択
ボラティリティの高いペアでは、より高い手数料階層 (例:1% 対 0.3%) がより高い IL を補います。手数料階層を一致させます。
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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% |
| +50% | 1.50 | -2.02% |
| +100% (2x) | 2.00 | -5.72% |
| +200% (3x) | 3.00 | -13.40% |
| +400% (5x) | 5.00 | -25.46% |
| +900% (10x) | 10.00 | -42.54% |
Note the symmetry: a 2x increase (r=2.0) and a 2x decrease (r=0.5) both produce -5.72% IL.
Concentrated Liquidity (CLMM) Amplified IL
Concentrated liquidity market makers (Orca Whirlpools, Raydium CLMM, Meteora DLMM) allow LPs to concentrate liquidity within a price range [P_lower, P_upper]. This amplifies both fee income and IL.
Concentration Factor
concentration_factor = 1 / (1 - sqrt(P_lower / P_upper))
For a ±10% range around current price: concentration_factor ≈ 10x.
CLMM IL Behavior
- Price within range: IL is amplified by the concentration factor relative to constant-product IL.
- Price exits range: The position becomes 100% of the losing asset. This is the maximum possible IL for that direction — you hold only the depreciating token.
IL_clmm ≈ IL_constant_product * concentration_factor
This approximation holds for small moves. For large moves or prices near range boundaries, use the full CLMM formula (see references/il_formulas.md).
Example: CLMM vs Constant-Product
SOL at $150, LP with ±20% range ($120–$180):
| Scenario | Constant-Product IL | CLMM IL (±20%) |
|---|---|---|
| SOL → $180 | -0.62% | ~-3.1% |
| SOL → $200 | -1.03% | 100% SOL (exit) |
| SOL → $120 | -1.80% | ~-9.0% |
| SOL → $100 | -3.42% | 100% USDC (exit) |
IL vs Fees: Breakeven Analysis
The core question for any LP is: Do fees earned exceed IL incurred?
Net Position = LP_value + accrued_fees - hold_value
Profitable when accrued_fees > IL.
Breakeven Fee Rate
For constant-product pools, the expected IL per period is approximately:
expected_IL ≈ σ² / 8
Where σ is the standard deviation of log returns for that period. This means:
| Daily Volatility (σ) | Expected Daily IL | Min Daily Fee Rate to Break Even |
|---|---|---|
| 1% | 0.001% | 0.001% |
| 3% | 0.011% | 0.011% |
| 5% | 0.031% | 0.031% |
| 10% | 0.125% | 0.125% |
| 20% | 0.500% | 0.500% |
Daily fee income for an LP:
daily_fee_income = (deposit / TVL) * daily_volume * fee_rate
For a full breakeven framework, see references/breakeven_analysis.md.
Modeling IL Over Time
Monte Carlo Simulation
Simulate many random price paths using geometric Brownian motion (GBM):
import numpy as np
def simulate_price_path(
initial_price: float,
daily_vol: float,
days: int,
drift: float = 0.0,
) -> np.ndarray:
"""Simulate a price path using geometric Brownian motion."""
dt = 1.0 # daily steps
log_returns = np.random.normal(
(drift - 0.5 * daily_vol**2) * dt,
daily_vol * np.sqrt(dt),
days,
)
prices = initial_price * np.exp(np.cumsum(log_returns))
return np.insert(prices, 0, initial_price)
For each path, compute the IL at each timestep and the cumulative fees earned. After N simulations, analyze the distribution of outcomes.
See scripts/il_scenario_modeler.py for a complete Monte Carlo simulation.
Historical Analysis
Use actual OHLCV price data to compute what IL would have been for a historical period. This gives a more realistic (but backward-looking) estimate.
IL Mitigation Strategies
1. Stablecoin Pairs
Pairs like USDC/USDT have near-zero IL because the price ratio barely moves. Fee income is almost pure profit.
2. Correlated Pairs
Pairs like SOL/mSOL or ETH/stETH move together, so the price ratio stays close to 1.0. IL is minimal.
3. Wider CLMM Ranges
A wider range reduces concentration factor, reducing IL at the cost of less fee income per unit of capital.
4. Active Range Management
Monitor price and rebalance your CLMM range when price approaches boundaries. This reduces the risk of price exiting your range entirely.
5. Fee Tier Selection
Higher fee tiers (e.g., 1% vs 0.3%) compensate for higher IL in volatile pairs. Match fee tier to expected volatility.
When IL Is Acceptable
- High volume pools: Fee income significantly exceeds expected IL.
- Stable or correlated pairs: IL is structurally minimal.
- Token accumulation strategy: You want to accumulate the cheaper token anyway.
- Short time horizons with active management: Fees compound, and you rebalance before large moves.
When to Avoid LPing
- Low volume, high volatility: IL dominates, fees are insufficient.
- Trending markets: Strong directional moves create large, sustained IL.
- Illiquid new tokens: Price can move 10x+ in hours, causing catastrophic IL.
- Wide-spread pools: Low volume means fees don't compensate for any IL at all.
Related Skills
- lp-math: AMM mechanics and reserve calculations that underpin IL formulas.
- yield-analysis: Compare LP yields net of IL against other DeFi opportunities.
- liquidity-analysis: Assess pool depth and volume to estimate fee income.
- volatility-modeling: Forecast volatility inputs for IL modeling.
Files
References
references/il_formulas.md— Full IL derivations for constant-product, CLMM, and multi-asset poolsreferences/breakeven_analysis.md— Fee vs IL breakeven framework with practical tools
Scripts
scripts/il_calculator.py— Calculate IL for any price change across pool types, with tables and comparisonsscripts/il_scenario_modeler.py— Monte Carlo simulation of LP positions over time with fee and IL modeling