# IL Fee Break-Even Calculator

> IL Fee Break-Even Calculator is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the fee fraction needed to exactly offset impermanent loss at a given price ratio, returning a deterministic break-even value as JSON.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/il-fee-breakeven
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/il-fee-break-even-calculator-fe053676
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V66ZmnB2r6F4c9sNQBgzs

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 il-fee-break-even-calculator-fe053676 -d '<json body>'
```

Example prompt: What fee fraction do I need to break even on impermanent loss if the price ratio has moved to 1.4 compared to my entry?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, closed-form calculation of the fee fraction required to offset IL at a specific price ratio — no RPC node, no live price feed, and no API key required. Ideal for agent workflows that need to make LP risk decisions programmatically without calling an oracle or blockchain node. Prefer this over general DeFi analytics APIs when you only need the break-even fee math and want a lightweight $0.001 microtransaction cost.

## Known failure modes

- Missing or non-numeric price_ratio input returns a validation error
- price_ratio of exactly 1.0 may return 0 (no IL, no fee needed)
- Negative or zero price_ratio values are mathematically undefined and will likely error
- Payment failure via x402 (insufficient USDC balance or misconfigured payment header) blocks the call
- Extreme price ratios (very large or very small) may produce floating-point edge cases

## How this service works

Fees needed to offset IL at a price ratio. Call when checking if fee APR can cover expected IL. Returns fee_fraction_needed as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a JSON object containing fee_fraction_needed — the exact fractional fee (as a decimal, e.g. 0.003 for 0.3%) that a liquidity provider would need to earn in order to fully offset impermanent loss at the specified price_ratio. The result is computed deterministically from closed-form IL math with no live data or external calls.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "price_ratio": {
   "type": "number",
   "description": "New/old price ratio for IL math"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-il-fee-breakeven/v1",
  "fee_fraction_needed": 0.0202041028867288
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/il-fee-break-even-calculator-fe053676/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
