{"uid":"cap_kWUqBqYKoe2clfFa5Rdp8","slug":"agentstoolshub-impermanent-loss-calculator-c682b878","name":"AgentsToolsHub Impermanent Loss Calculator","description":"Compute impermanent loss for a 50/50 constant-product AMM position at any relative price move, with a reference table of common moves. Deterministic closed-form — the exact divergence number an LP should compare against farming rewards. Use this when an agent needs to aMM divergence loss for any price move.","url":"https://agentstoolshub.com/api/v1/crypto/impermanent-loss?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["priceChangePct"],"properties":{"priceChangePct":{"type":"number","description":"How much asset A moved vs B: 100 = 2×, -50 = half"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_I3E9R0Ozpdghb9mEX16Lx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes impermanent loss percentage for a 50/50 constant-product AMM position given a relative price change between two assets","exampleAgentPrompt":"What's the impermanent loss I'd face in a 50/50 AMM pool if one of my assets goes up 100% against the other — can you give me the exact IL percentage so I can compare it against the farming yield?","exampleUseCases":[{"title":"Evaluate yield farming opportunity","prompt":"I'm thinking of providing liquidity to an ETH/USDC pool that offers 40% APY, but ETH could easily double in price. What's the impermanent loss if the price moves up 100%? I need the exact IL figure to see if the farming rewards cover it."},{"title":"Assess LP risk before token launch","prompt":"A new token is launching and I want to LP against it, but the price could 5x from the current level — that's a 400% price change. Can you calculate the impermanent loss for a 50/50 constant-product AMM at that price move so I know what I'm risking?"},{"title":"Compare multiple price scenarios","prompt":"Can you show me the impermanent loss for a -50% price move in a 50/50 AMM pool? I'm trying to figure out how bad the downside is if the asset I'm pairing loses half its value."}],"resultDescription":"Returns the exact impermanent loss percentage for the specified price change, computed using the closed-form constant-product AMM divergence formula, along with a reference table of IL values at common price move increments for quick comparison against farming rewards","failureModes":["Missing required priceChangePct parameter returns a 400 error","Extremely large price change values may return boundary-condition results","Network or payment failure returns a 402 or 5xx error","Invalid non-numeric priceChangePct value returns a validation error"],"whenToPreferThis":"Use this endpoint when you need a precise, deterministic impermanent loss figure for a 50/50 constant-product AMM pool at any specific price change percentage, especially when comparing IL against farming APY to make LP entry/exit decisions; prefer this over manual formula calculations or approximations when accuracy matters for financial decisions","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T18:49:27.666Z","isFirstParty":false,"canonicalSlug":"agentstoolshub-impermanent-loss-calculator-c682b878"}