# LP Impermanent Loss Estimator (httpay.xyz)

> LP Impermanent Loss Estimator (httpay.xyz) is a paid API for AI agents from httpay.xyz, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Calculates impermanent loss for a Uniswap V2-style liquidity pool position given token pair, entry price, current price, and position size.

## Facts

- Endpoint: POST https://httpay.xyz/api/lp-il-estimator
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lp-impermanent-loss-estimator-httpay-xyz-714dcae8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4zwj8p-etlHPyhhNlMIdq

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 lp-impermanent-loss-estimator-httpay-xyz-714dcae8 -d '<json body>'
```

Example prompt: Calculate the impermanent loss on my ETH/USDC liquidity position — I entered when ETH was $3000, it's now at $3500, and my position was worth $10,000 USD when I deposited.

## When to prefer this

Use this endpoint when you need a quick, pay-per-call calculation of impermanent loss for a Uniswap V2-style AMM LP position without managing API keys or subscriptions. Ideal for DeFi agents assessing LP profitability, rebalancing decisions, or risk reporting at $0.005 per call via USDC on Base.

## Known failure modes

- Missing required parameters (tokenA, tokenB, entryPriceA, currentPriceA, liquidityUsd) returns an error or demo response
- Invalid or non-numeric price/liquidity values cause computation errors
- Payment not included or insufficient USDC results in HTTP 402 response requiring x402 payment
- Demo mode (?demo=true) returns example data rather than a real calculation

## How this service works

LP Impermanent Loss Estimator — calculates IL for any Uniswap V2-style liquidity position. Params: ?tokenA=ETH&tokenB=USDC&entryPriceA=3000&currentPriceA=3500&liquidityUsd=10000. Demo: ?demo=true.

## Output

Returns a JSON object describing the estimated impermanent loss for the specified LP position, including the IL percentage and dollar value lost relative to simply holding the tokens, based on the price ratio change between entry and current price.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "description": "LP Impermanent Loss Estimator — calculates IL for any Uniswap V2-style liquidity position. Params: ?tokenA=ETH&tokenB=USDC&entryPriceA=3000&currentPriceA=3500&liquidityUsd=10000. Demo: ?demo=true."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lp-impermanent-loss-estimator-httpay-xyz-714dcae8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from httpay.xyz](https://www.zero.xyz/host/httpay.xyz/llms.txt)
