# DeFi Oracle — Impermanent Loss Calculator

> DeFi Oracle — Impermanent Loss Calculator is a paid API for AI agents from aracil.vercel.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Calculates impermanent loss percentage and scenarios for liquidity providers given a price change percentage

## Facts

- Endpoint: POST https://aracil.vercel.app/api/il-calculator
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-oracle-impermanent-loss-calculator-b28955a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BU_W-0GWnsIuzxaer2aeg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability defi-oracle-impermanent-loss-calculator-b28955a9 -d '<json body>'
```

Example prompt: Calculate the impermanent loss I'd face if the token price increases by 75% from when I entered a liquidity pool — show me the formula, the loss percentage, and how to interpret it.

## When to prefer this

Choose this endpoint when you need a quick, on-demand computation of impermanent loss for a single price-change scenario with full formula transparency and scenario comparison, especially within an AI agent workflow that pays per-call via USDC on Base. Prefer it over manual calculations when you want interpreted natural-language output alongside the raw numbers.

## Known failure modes

- Missing required price_change_pct field returns a validation error
- Extreme price change values (e.g. >10000%) may return unexpected or edge-case results
- Payment failure via x402 USDC on Base results in 402 response blocking the computation
- Non-numeric price_change_pct input returns a type error

## How this service works

DeFi data for AI agents — yield rates, swap routes, IL calculator, liquidation risk, MEV scanner, TVL tracking. Powered by DeFiLlama + on-chain RPC data. Pay with USDC on Base via x402.

## Output

Returns the impermanent loss percentage (impermanent_loss_pct), the mathematical formula used, an array of multiple price-change scenarios for comparison, and a plain-English interpretation of the loss magnitude and its implications for liquidity providers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "price_change_pct"
 ],
 "properties": {
  "price_change_pct": {
   "type": "number",
   "description": "Price change percentage (e.g. 50 for +50%)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object"
  },
  "formula": {
   "type": "string"
  },
  "scenarios": {
   "type": "array"
  },
  "interpretation": {
   "type": "string"
  },
  "impermanent_loss_pct": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-oracle-impermanent-loss-calculator-b28955a9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aracil.vercel.app](https://www.zero.xyz/host/aracil.vercel.app/llms.txt)
