# Vextorium Impermanent Loss Calculator

> Vextorium Impermanent Loss Calculator is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-15).

Calculates impermanent loss percentage for Uniswap v2 (full range) and v3/v4 (concentrated range) positions given entry price, exit price, and optional range bounds.

## Facts

- Endpoint: POST https://api.vextorium.com/v1/impermanent-loss?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-impermanent-loss-calculator-5785b46e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1qPwTQoZztQ-xFoBAOqeh

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 vextorium-impermanent-loss-calculator-5785b46e -d '<json body>'
```

Example prompt: I entered a Uniswap v3 ETH/USDC position at an initial price of 2000 with a concentrated range between 1800 and 2200 — the price is now at 2500. How much impermanent loss have I suffered compared to just holding, and am I out of range?

## When to prefer this

Choose this endpoint when you need a precise, formula-based impermanent loss calculation for Uniswap v2, v3, or v4 positions, especially when you want to compare holding vs LP returns, check whether a concentrated range position is out of range, or determine the final token composition on withdrawal. Prefer it over manual calculations or generic DeFi analytics when the user has specific entry price and range parameters.

## Known failure modes

- Missing required fields (initial_price or final_price) returns a validation error
- Providing a min_range greater than max_range may produce undefined results
- Providing a final_price equal to initial_price returns 0% IL trivially
- Non-numeric values for price fields cause a schema validation failure
- Extremely tight ranges combined with large price moves may produce 100% one-sided composition results

## How this service works

Impermanent loss calculator for Uniswap v2 (full range) and v3/v4 concentrated ranges: IL vs holding, out-of-range flag and final token mix.

## Output

Returns impermanent_loss_pct (negative percentage representing loss vs holding), price_change_pct, whether the position is out_of_range (boolean), the final token composition as token0_pct and token1_pct, the position type (full range or concentrated), and an explanatory note clarifying that the loss excludes fees.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "max_range": {
   "type": "number",
   "description": "Optional upper bound of the range"
  },
  "min_range": {
   "type": "number",
   "description": "Optional lower bound of the range"
  },
  "final_price": {
   "type": "number",
   "description": "Current or target price"
  },
  "initial_price": {
   "type": "number",
   "description": "Price at entry"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Loss versus holding the tokens, excluding fees. Out of range the position earns no fees.",
  "type": "concentrated range (Uniswap v3/v4)",
  "range": [
   1800
  ],
  "out_of_range": true,
  "price_change_pct": 30,
  "final_composition": {
   "token0_pct": 0,
   "token1_pct": 100
  },
  "impermanent_loss_pct": -10.8289
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vextorium-impermanent-loss-calculator-5785b46e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
