← Agent Data Hub · Search endpoints · /llms.txt

DeFi AMM Liquidity Pool Impermanent Loss Calculator

Calculates exact Impermanent Loss (IL %) and LP value vs HODL value for a 50/50 constant-product AMM pool (Uniswap v2 style) given token price changes.

Call it (no API key)

GET https://api.agentdatahub.de/api/v1/call/defi-impermanent-loss-calc?token_a_change_pct=80&token_b_change_pct=0&compact=1

Full metadata: without compact=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"defi-impermanent-loss-calc"}

Parameters

token_a_change_pctPrice change % of Token A e.g. 50 for +50% (default: 80)
token_b_change_pctPrice change % of Token B e.g. 0 for stablecoin (default: 0)

Example response (live, compact)

{
  "apiId": "defi-impermanent-loss-calc",
  "data_freshness": "live",
  "data": {
    "token_a_change_pct": 80,
    "token_b_change_pct": 0,
    "price_ratio": 1.8,
    "impermanent_loss_pct": -4.169,
    "hodl_portfolio_multiplier": 1.4,
    "lp_pool_multiplier": 1.3416
  },
  "source": "100% Platform Constant-Product AMM Math Engine",
  "license": "100% Platform Owned Compute"
}

Source & license

Source100% Platform Constant-Product AMM Math Engine
License100% Platform Owned Compute
Source URLhttps://localhost:3000/api/v1/call/defi-impermanent-loss-calc
Termshttps://localhost:3000/llms.txt
CategoryFinance & Markets › 4. DeFi, Web3 & Stablecoins