# x402node LP Math — Uniswap V2 & Aerodrome Position Calculator

> x402node LP Math — Uniswap V2 & Aerodrome Position Calculator is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.08/call, status unknown (last checked 2026-09-13).

Computes underlying token amounts, pool share, current USD value, and impermanent loss for a Uniswap V2 or Aerodrome LP position on Base, given a pool address and LP token amount or wallet address.

## Facts

- Endpoint: GET https://api.x402node.dev/chain/lp-math
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-d2e13a11
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aqrmnN6yFHNK7ZrjCxNJL

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 api-x402node-dev-d2e13a11
```

Example prompt: For the Aerodrome pool at 0xAbCd...1234 on Base, I have 50 LP tokens — can you work out how much of each token I'm holding, what share of the pool that is, the current USD value, and how much impermanent loss I've taken versus if I'd just held the two tokens?

## When to prefer this

Use this endpoint when you need precise on-chain AMM math for Uniswap V2 or Aerodrome pools specifically on the Base network, including impermanent loss computation — especially when you want a single call to return token amounts, pool share, USD value, and IL in one response rather than piecing together multiple on-chain reads yourself.

## Known failure modes

- Invalid or non-existent pool address returns an error or empty result
- Pool address is for an unsupported AMM protocol (not Uniswap V2 or Aerodrome)
- LP amount of zero or negative value triggers validation error
- On-chain RPC failure or Base network congestion causes timeout
- Wallet address provided has no LP tokens in the specified pool, returning zero position

## How this service works

Uniswap V2 and Aerodrome LP position math on Base: underlying token amounts, pool share, current value, and impermanent loss versus holding. Give a pool address plus your LP amount or wallet. Search terms: LP position value, impermanent loss calculator, liquidity pool share, Aerodrome, Uniswap V2, AMM math.

## Output

Returns the breakdown of underlying token amounts (token0 and token1), the wallet's fractional share of the pool, the current total USD value of the position, and the impermanent loss expressed as a percentage or dollar amount relative to a simple hold strategy.

## 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": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "lp": {
       "type": "string",
       "description": "Lp (optional)"
      },
      "pair": {
       "type": "string",
       "description": "Price pair e.g. ETH-USD (optional)"
      },
      "pool": {
       "type": "string",
       "description": "Pool (optional)"
      },
      "entry": {
       "type": "string",
       "description": "Entry (optional)"
      },
      "wallet": {
       "type": "string",
       "description": "Wallet (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-d2e13a11/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
