# SperaxOS IL Scenario Simulator

> SperaxOS IL Scenario Simulator is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-03).

Runs Monte Carlo simulations to estimate impermanent loss scenarios for a DeFi liquidity position across token pairs, fee tiers, and custom price ranges

## Facts

- Endpoint: POST https://chat.sperax.io/api/x402/tools/il-calculator/simulateILScenarios?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-il-scenario-simulator-fd8ad82e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_f9W1BlyM23NWgx7Fhk2U-

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 speraxos-il-scenario-simulator-fd8ad82e -d '<json body>'
```

Example prompt: Simulate impermanent loss scenarios for a $5,000 ETH/USDC position on the 0.05% fee tier, with a price range of 1800 to 2500, over 60 days using 1000 Monte Carlo paths.

## When to prefer this

Choose this endpoint when you need probabilistic, simulation-based impermanent loss analysis for a DeFi liquidity position — especially for Uniswap v3 style concentrated liquidity with custom price ranges. It is ideal when you want Monte Carlo path distributions rather than a single deterministic IL formula, and when you want fee-earning estimates alongside IL risk. Prefer this over simple IL calculators when the user needs statistical risk profiling (worst-case, median, distribution) rather than a point estimate.

## Known failure modes

- Missing required token symbols returns validation error
- Invalid or unsupported fee tier value causes rejection
- Price range where priceLower >= priceUpper returns error
- Payment not received or underpaid via x402 returns 402 Payment Required
- Live price fetch fails if currentPriceRatio omitted and oracle is unavailable
- Very high numSimulations may time out or be rate-limited
- Unsupported token pair with no price feed returns data-not-found error

## How this service works

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.

## Output

Returns a distribution of impermanent loss outcomes across Monte Carlo simulation paths, including estimated fee earnings, net P&L scenarios, and statistical summaries (e.g. median, worst-case, best-case IL) for the specified token pair, price range, fee tier, investment amount, and time horizon.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "token0": {
   "type": "string",
   "description": "First token symbol."
  },
  "token1": {
   "type": "string",
   "description": "Second token symbol."
  },
  "feeTier": {
   "type": "number",
   "description": "Fee tier for fee earning simulation."
  },
  "priceLower": {
   "type": "number",
   "description": "For concentrated liquidity: lower price bound."
  },
  "priceUpper": {
   "type": "number",
   "description": "For concentrated liquidity: upper price bound."
  },
  "investmentUsd": {
   "type": "number",
   "description": "Investment amount in USD."
  },
  "numSimulations": {
   "type": "number",
   "description": "Number of Monte Carlo paths. Default: 1000."
  },
  "timeHorizonDays": {
   "type": "number",
   "description": "Simulation time horizon in days."
  },
  "currentPriceRatio": {
   "type": "number",
   "description": "Current price ratio. If omitted, fetched live."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speraxos-il-scenario-simulator-fd8ad82e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.sperax.io](https://www.zero.xyz/host/chat.sperax.io/llms.txt)
