# Saylor Innovations DeFi Price Impact Calculator

> Saylor Innovations DeFi Price Impact Calculator is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Computes constant-product AMM swap output, execution price, price impact, minimum received, and the trade size that moves the pool price by 1% or 5%, given pool reserves.

## Facts

- Endpoint: GET https://saylorinnovations.com/api/defi/price-impact?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-defi-price-impact-calculator-acab91ce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kFT4Ve_2KyZqytJdYDcyj

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 saylor-innovations-defi-price-impact-calculator-acab91ce
```

Example prompt: I'm about to swap 10,000 USDC in a pool that has 500,000 USDC as reserve_in and 300 ETH as reserve_out — what's the price impact, execution price, amount I'll receive, and how big a trade would move the price by 1%? Use the default 0.3% fee.

## When to prefer this

Use this endpoint when you need constant-product AMM (Uniswap x*y=k formula) swap math computed server-side without connecting to a blockchain node — ideal for pre-trade analysis, UI slippage previews, or agent workflows that need price impact data quickly from raw pool reserve numbers without on-chain calls.

## Known failure modes

- Missing required parameters (reserve_in, reserve_out, amount_in) returns an error
- Non-numeric or zero reserve values may cause division-by-zero or invalid computation
- Extremely large amount_in relative to reserves may produce degenerate or near-100% price impact results
- Invalid fee_percent values outside expected range may produce unexpected results

## How this service works

Constant product swap output, execution price, price impact, minimum received and the trade size that moves the price 1% or 5%, from pool reserves.

## Output

Returns a JSON object with: amount received after fee and price impact, spot price before trade, execution price, price after trade, fee paid in input tokens, price impact percent, total cost percent (impact + fee), size vs reserve percent, minimum received after slippage tolerance, and trade sizes that would move the pool price by 1% and 5%, plus a plain-language note and data source attribution.

## 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",
     "required": [
      "reserve_in",
      "reserve_out",
      "amount_in"
     ],
     "properties": {
      "amount_in": {
       "type": "string",
       "description": "amount you sell"
      },
      "reserve_in": {
       "type": "string",
       "description": "pool reserve of the token you sell"
      },
      "fee_percent": {
       "type": "string",
       "description": "optional pool fee, default 0.3"
      },
      "reserve_out": {
       "type": "string",
       "description": "pool reserve of the token you buy"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "amount_out",
      "price_impact_percent"
     ],
     "properties": {
      "note": {
       "type": "string",
       "description": "Plain-language caveat about how to read and use the result"
      },
      "source": {
       "type": "string",
       "description": "Where the data or formula comes from"
      },
      "amount_in": {
       "type": "number",
       "description": "Amount sold"
      },
      "amount_out": {
       "type": "number",
       "description": "Amount received after fee and price impact"
      },
      "spot_price": {
       "type": "number",
       "description": "Pool price before the trade (output per input)"
      },
      "execution_price": {
       "type": "number",
       "description": "Average price actually received"
      },
      "minimum_received": {
       "type": "number",
       "description": "Output after applying the slippage tolerance"
      },
      "fee_paid_in_input": {
       "type": "number",
       "description": "Pool fee taken from the input"
      },
      "price_after_trade": {
       "type": "number",
       "description": "Pool price after the trade"
      },
      "total_cost_percent": {
       "type": "number",
       "description": "Shortfall versus spot including price impact and 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-defi-price-impact-calculator-acab91ce/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
