{"uid":"cap_eALCP4ZT1QX3t0NnL6TKi","slug":"speraxos-il-calculator-f8ddbcee","name":"SperaxOS IL Calculator","description":"AI-powered DeFi intelligence APIs payable via the x402 HTTP payment protocol. No API key required — pay per request with USDC on Base. Identity-only (SIWX) endpoints are free for wallets with an agentcash identity.","url":"https://chat.sperax.io/api/x402/tools/il-calculator/calculateIL?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"token0":{"type":"string","description":"First token symbol (e.g. \"ETH\")."},"token1":{"type":"string","description":"Second token symbol (e.g. \"USDC\")."},"feeTier":{"type":"number","description":"Fee tier as decimal (e.g. 0.003 for 0.3%). Used for fee earnings estimation."},"daysActive":{"type":"number","description":"Days the position has been active (for fee earnings estimation)."},"priceLower":{"type":"number","description":"For concentrated liquidity: lower price bound of the range."},"priceUpper":{"type":"number","description":"For concentrated liquidity: upper price bound of the range."},"investmentUsd":{"type":"number","description":"Total investment in USD."},"entryPriceRatio":{"type":"number","description":"Entry price ratio (token0/token1) when the position was opened."},"currentPriceRatio":{"type":"number","description":"Current price ratio (token0/token1). If omitted, fetched from live data."}}},"responseSchema":null,"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_i2seHOSKq_asFpVpREJ22","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0xD74f5255D557944cf7Dd0E45FF521520002D5748","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates impermanent loss (IL) for a DeFi liquidity position given token pair, price range, investment size, and entry/current prices","exampleAgentPrompt":"Calculate the impermanent loss on my ETH/USDC position: I put in $10,000 at an entry ratio of 2000 (ETH/USDC), the current ratio is 2500, fee tier is 0.3%, I've been in the position 45 days, and my price range is 1800 to 3000.","exampleUseCases":[{"title":"Evaluate active Uniswap LP position","prompt":"I have a $5,000 ETH/USDC concentrated liquidity position on Uniswap v3 with a price range of 1500 to 2500. I entered when ETH was at 2000 USDC, it's now at 2800, fee tier is 0.3%, and I've been in for 60 days. How much impermanent loss am I sitting on, and have my fees made up for it?"},{"title":"Compare IL across price range scenarios","prompt":"I'm considering a WBTC/USDC liquidity position with $20,000 invested, entry price ratio 30000, current price ratio 35000, and a 0.05% fee tier after 90 days. What is my impermanent loss for a price range of 25000 to 40000?"},{"title":"Quick IL check for new LP position","prompt":"Can you quickly calculate the impermanent loss for an ARB/USDC pool position? I invested $2,000 at an entry ratio of 1.2, the current price is 0.9, fee tier is 1%, and the position has been active for 10 days with a full-range setup."}],"resultDescription":"Returns computed impermanent loss figures for the specified liquidity position, including IL amount in USD and percentage, estimated fee earnings based on fee tier and days active, and likely a net P&L comparison showing whether fees have offset the IL.","failureModes":["Missing required fields (token0, token1, investmentUsd, entryPriceRatio) returns validation error","Invalid or unrecognized token symbols may fail live price fetch","Payment failure via x402 if USDC balance insufficient or x402 protocol not properly implemented","Fee tier provided in wrong format (e.g. 3 instead of 0.003) may produce incorrect results","Price range bounds illogical (priceLower >= priceUpper) may return error","Network timeout if live price fetch for currentPriceRatio is slow"],"whenToPreferThis":"Use this endpoint when you need programmatic, on-demand impermanent loss calculations for DeFi liquidity positions, especially concentrated liquidity ranges. It is ideal for AI agents managing or monitoring LP positions that need quantified IL data without requiring an API key — paying $0.001 USDC per call via x402. Prefer this over manual calculation tools when integrating IL awareness into automated DeFi workflows or portfolio monitoring agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:47:25.931Z","isFirstParty":false,"canonicalSlug":"speraxos-il-calculator-f8ddbcee"}