Xspoonai official impermanent loss

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official impermanent loss is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Calculate Impermanent Loss (IL) for Liquidity Provider positions.

How to use this skill

Skill file

Impermanent Loss Calculator

A financial utility that helps agents quantify the risk of providing liquidity. It calculates the divergence loss experienced when the price ratio of pooled tokens changes.

Quick Start

# Calculate IL if one token doubles in price (200% or 2.0x ratio change)
il_data = await agent.run_tool(
    "il_calc",
    price_change_ratio=2.0
)
print(il_data)

Scripts

| Script | Purpose |

|--------|---------|

| il_calc.py | Mathematical calculator for IL scenarios |

Best Practices

  1. Use to audit active LP positions.
  2. Combine with 'Yield Calculator' to see if trading fees cover the IL.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.