{"uid":"cap_JE1BE8smePO8ASbMojMM8","slug":"agent402-uk-impermanent-loss-calculator-4fa137fb","name":"Agent402 UK Impermanent Loss Calculator","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/math/impermanent-loss","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"price_ratio":{"type":"number","description":"New/old price ratio"}}},"responseSchema":{"type":"json","example":{"price_ratio":1.5,"impermanent_loss_pct":-2.020305089104421}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_b1m0eMGFmgY8SfjNn3AIK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates Uniswap-style constant-product AMM impermanent loss given a price ratio between old and new token prices.","exampleAgentPrompt":"What's the impermanent loss for a Uniswap-style liquidity position if the price ratio has changed to 2.0 (new price is double the old price)?","exampleUseCases":[{"title":"LP position impermanent loss check","prompt":"I provided liquidity to a Uniswap pool and ETH has since doubled in price relative to USDC — can you calculate my impermanent loss? The price ratio is 2.0."},{"title":"Risk assessment before adding liquidity","prompt":"I'm thinking about adding liquidity to a constant-product AMM pool. If the token price drops to 60% of what it is now, what would my impermanent loss be? Use a price ratio of 0.6."},{"title":"Post-trade LP loss attribution","prompt":"ETH went from $1000 to $3500 since I added it to a Uniswap v2 pool — what percentage impermanent loss did I suffer? The price ratio is 3.5."}],"resultDescription":"Returns the impermanent loss as a percentage (or decimal multiplier) representing the value loss a constant-product AMM liquidity provider incurs compared to simply holding the underlying tokens, given the input price ratio using the standard sqrt-based IL formula.","failureModes":["Missing price_ratio field returns a 400 validation error","price_ratio of 0 or negative is mathematically invalid and likely returns an error","Extremely large or small price ratios may cause floating point precision issues","Non-numeric price_ratio value returns a type validation error","Payment not included or insufficient USDC results in 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a quick, reliable computation of Uniswap-style constant-product AMM impermanent loss from a single price ratio input, without needing to set up any DeFi library or write the sqrt-based IL formula yourself. Ideal for DeFi dashboards, LP position trackers, and pre-investment risk tools where you want a lightweight serverless math call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:26:33.059Z","isFirstParty":false}