# SignalHarness DeFi Impermanent Loss Calculator

> SignalHarness DeFi Impermanent Loss Calculator is a paid API for AI agents from signalharness.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-16).

Calculates impermanent loss for DeFi liquidity pool positions based on caller-supplied token price and allocation data

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/defi_impermanent_loss/invoke
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/signalharness-defi-impermanent-loss-calculator-2e0d221d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2G2NGa_k9q5lfJnD3UL03

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 signalharness-defi-impermanent-loss-calculator-2e0d221d -d '<json body>'
```

Example prompt: Calculate the impermanent loss for my liquidity pool position where I entered the ETH/USDC pool when ETH was $1,800 and now ETH is $2,700, with an initial 50/50 split.

## When to prefer this

Choose this endpoint when you need a quick, agent-native on-chain-payment-compatible impermanent loss computation without standing up your own DeFi math infrastructure. Ideal for AI agents operating in DeFi contexts that need per-call micro-payment pricing ($0.005 USDC) via x402 rather than API key subscriptions. Prefer this over generic calculators when you need a verifiable receipt with SHA-256 result hash for auditability.

## Known failure modes

- Malformed or empty impermanent_loss_request string returns a validation error
- Request string too short (< 2 chars) or too long (> 65536 chars) triggers schema rejection
- Insufficient price data in request body may cause warnings or incomplete IL calculation
- Payment failure via x402 protocol results in 402 response before execution
- Ambiguous or uninterpretable pool data may yield warnings alongside a best-effort result

## How this service works

Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.

## Output

Returns a JSON object containing the computed impermanent loss value, any warnings about the input data, evidence scope indicator (caller_supplied_data), a service status field, and a detailed receipt with payment ID, execution ID, network (Base/eip155:8453), USDC asset address, latency, and a SHA-256 result hash for verification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "impermanent_loss_request": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 2
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "replay": false,
  "result": {
   "warnings": [
    "Model excludes fees, incentives, and concentrated liquidity."
   ],
   "service_id": "defi_impermanent_loss",
   "evidence_scope": "caller_supplied_data",
   "impermanent_loss": "{\"impermanent_loss_percent\":\"-5.719095841794\",\"model\":\"two_asset_50_50_constant_product\",\"price_ratio\":\"2\",\"value_ratio_vs_hold\":\"0.942809041582\"}"
  },
  "status": "succeeded",
  "receipt": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "usage": [],
   "status": "succeeded",
   "network": "eip155:8453",
   "artifacts": [],
   "endedAtMs": 0,
   "latencyMs": 0,
   "paymentId": "example-payment",
   "receiptId": "example-receipt",
   "requestId": "example-request",
   "serviceId": "defi_impermanent_loss",
   "executionId": "example-execution",
   "startedAtMs": 0,
   "amountAtomic": "5000",
   "resultSha256": "ec41cabce341ce755aa863514580c8484e0c274279ac2607e667aed0af81b2f7",
   "serviceVersion": "1.0.0",
   "settlementReference": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  "artifacts": [],
  "requestId": "example-request",
  "executionId": "example-execution"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/signalharness-defi-impermanent-loss-calculator-2e0d221d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from signalharness.ai](https://www.zero.xyz/host/signalharness.ai/llms.txt)
