# MoneyTools Impermanent Loss Calculator

> MoneyTools Impermanent Loss Calculator is a paid API for AI agents from tools.moneytools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-05).

Calculates impermanent loss for liquidity providers comparing LP position value vs holding after a price move, supporting both Uniswap v2 full-range and v3 concentrated range positions.

## Facts

- Endpoint: GET https://tools.moneytools.dev/v1/impermanent-loss?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-05
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moneytools-impermanent-loss-calculator-5a88bb74
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L2NTgcn0uFB9kqB7iaQCe

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 moneytools-impermanent-loss-calculator-5a88bb74
```

Example prompt: What's my impermanent loss on a Uniswap v2 full-range ETH/USDC LP position I entered at $3000 ETH if the current price is $4500?

## When to prefer this

Use this endpoint when you need a quick, accurate impermanent loss calculation for DeFi liquidity positions — particularly when supporting both Uniswap v2 full-range and v3 concentrated range positions is needed. Prefer this over manual calculation or generic DeFi tools when you need programmatic IL data for agents managing LP positions, risk dashboards, or DeFi portfolio analysis.

## Known failure modes

- Missing required entryPrice or newPrice parameters returns an error
- Invalid or illogical price range (lower >= upper for v3) may cause computation error
- Free tier exhausted (10/day) without payment method results in HTTP 402 requiring x402 micropayment
- Payment failure on x402 results in no charge and no result
- Non-numeric price values cause validation errors

## How this service works

Impermanent loss calculator: LP value vs holding after a price move: full-range (Uniswap v2) and concentrated range (v3, lower/upper) impermanent loss. Free tier 10/day; then $0.001 via x402 (HTTP 402 + PAYMENT-REQUIRED) or X-API-Key credits. Not charged on failure. $0.001 USDC per call via x402 on Base. Run by MoneyTools.

## Output

Returns impermanent loss metrics including the percentage loss versus a hold strategy, LP position value change, and optionally concentrated range IL for v3 positions with custom lower/upper bounds. Also includes payment metadata (whether a charge was made, network, USD amount, transaction hash) and free tier usage info.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "lower": {
       "type": "string",
       "description": "v3 range lower"
      },
      "upper": {
       "type": "string",
       "description": "v3 range upper"
      },
      "newPrice": {
       "type": "number",
       "examples": [
        "4500"
       ],
       "description": "current price"
      },
      "entryPrice": {
       "type": "number",
       "examples": [
        "3000"
       ],
       "description": "price at deposit"
      },
      "priceRatio": {
       "type": "string",
       "description": "or new/entry ratio"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "properties": {
      "payment": {
       "type": "object",
       "properties": {
        "charged": {
         "type": "boolean"
        },
        "network": {
         "type": "string"
        },
        "amountUsd": {
         "type": "string"
        },
        "transaction": {
         "type": [
          "string",
          "null"
         ]
        }
       }
      },
      "freeTier": {
       "type": "object"
      },
      "_moneytools": {
       "type": "object",
       "description": "optional plan / partner hints"
      }
     },
     "description": "Tool-specific JSON result (see llms.txt / openapi.json). Always includes payment info.",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moneytools-impermanent-loss-calculator-5a88bb74/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.moneytools.dev](https://www.zero.xyz/host/tools.moneytools.dev/llms.txt)
