amm_slippage_il
Calculates Uniswap V2 swap output, price impact, fee drag, V3 concentrated liquidity multipliers, and impermanent loss so users can assess AMM trade costs and LP risk.
Instructions
[x402 $0.03 USDC on Base/Solana] Exact constant-product Uniswap V2 swap output, price impact, fee drag, Uniswap V3 concentrated liquidity multiplier, and impermanent loss table.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"reserveIn": "<reserveIn>",
"reserveOut": "<reserveOut>",
"amountIn": "<amountIn>"
},
"name": "amm_slippage_il"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feeBps | No | Pool fee in basis points (default 30) | |
| amountIn | Yes | Swap input amount | |
| reserveIn | Yes | Pool reserve of input token | |
| priceLower | No | Optional V3 lower tick price | |
| priceUpper | No | Optional V3 upper tick price | |
| reserveOut | Yes | Pool reserve of output token | |
| priceRatios | No | Price ratios for IL curve | |
| _paymentSignature | No | Optional base64-encoded x402 v2 payment-signature header (overrides X402_PAYMENT_SIGNATURE env var). |