{"uid":"cap_NNKBKWINX_DNvn_GsGhPC","slug":"impermanent-loss-calculator-defi-uniswap-d1b785c7","name":"Impermanent Loss Calculator (DeFi/Uniswap)","description":"Exact EVM address, calldata, Uniswap V2/V3 and impermanent-loss math. Pay per call in USDC on Base via x402.","url":"https://dominion-data.x402-evm-math.workers.dev/defi/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","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"impermanent_loss_pct":"-5.7191"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WMolwX5kVsYBNTC2-xrSh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the impermanent loss percentage for a liquidity position given price changes, supporting Uniswap V2/V3 math.","exampleAgentPrompt":"What's the impermanent loss percentage for a Uniswap V2 LP position where the price of one token has doubled relative to when I entered the pool?","exampleUseCases":[{"title":"LP position risk check before entry","prompt":"If I provide liquidity to a Uniswap pool and one token triples in price relative to the other, what percentage of my value would I lose to impermanent loss compared to just holding?"},{"title":"Post-trade IL damage assessment","prompt":"I had a Uniswap V2 liquidity position and the price ratio between my two tokens shifted by 80% since I entered — can you calculate my impermanent loss percentage so I can decide whether to exit?"},{"title":"DeFi yield strategy breakeven analysis","prompt":"I'm earning 12% APY as a Uniswap LP but I'm worried about IL — calculate my impermanent loss if prices diverge by 40% so I can see if fees actually cover my losses."}],"resultDescription":"Returns a JSON object containing `impermanent_loss_pct`, a string representing the impermanent loss as a negative percentage (e.g. '-5.7191'), indicating how much value a liquidity provider has lost relative to simply holding the tokens outside the pool.","failureModes":["Missing required query parameters (price ratio inputs) returns an error or undefined result","Invalid numeric input types may cause computation errors","Extreme price ratios may yield edge-case results; no input validation is documented","No documented error schema — failures may return non-standard responses"],"whenToPreferThis":"Choose this endpoint when you need a precise, pay-per-call computation of impermanent loss for Uniswap V2/V3 AMM positions without standing up your own math library. Ideal for DeFi agents that need on-demand IL calculations as part of broader liquidity strategy workflows, especially when paired with the sibling EVM calldata and Uniswap math endpoints on the same platform. At $0.001 USDC per call, it is cost-effective for frequent per-decision computations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:32:56.053Z","isFirstParty":false,"canonicalSlug":"impermanent-loss-calculator-defi-uniswap-d1b785c7"}