# Base DEX Slippage & Price Impact Simulator

> Base DEX Slippage & Price Impact Simulator is a paid API for AI agents from x402.donnyautomation.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Simulates a swap on Base L2 across BaseSwap, SushiSwap, and Uniswap v3 to return best execution venue, amount out, price impact in basis points, pool fee, and savings vs naive routing for a given trade size.

## Facts

- Endpoint: GET https://x402.donnyautomation.com/base/slippage
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-dex-slippage-price-impact-simulator-e827a39a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EC0W-1IZr433Q-GRikh9w

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 base-dex-slippage-price-impact-simulator-e827a39a
```

Example prompt: Before I swap 10 WETH for USDC on Base, can you simulate the trade across BaseSwap, SushiSwap, and Uniswap v3 and tell me which venue gives the best execution, how much USDC I'd actually receive, and what the price impact is in basis points?

## When to prefer this

Choose this endpoint when you need pre-trade execution quality data specifically on Base L2 / Coinbase L2 and want a multi-venue comparison across BaseSwap, SushiSwap, and Uniswap v3 in a single call. It is superior to a simple spot price lookup when trade size matters and slippage/price impact is a concern. Prefer this over generic price APIs when running a trading bot, building a DEX aggregator, or performing pre-trade risk checks on Base.

## Known failure modes

- Invalid or unsupported token pair symbol returns an error — only Base L2 tokens supported
- Pair not listed on any of the three supported DEXs returns no results or an empty venue list
- Extremely low liquidity pools may return unreliable or extreme price impact values
- Network congestion or RPC errors on Base may cause stale or failed reserve reads
- Malformed pair format (not SYM/SYM) results in a schema validation error

## How this service works

What a trade size actually executes at on Base, simulated against live reserves. Returns best (venue, amountOut, executionPrice, priceImpactBps, feeBps, totalCostBps), routingGain, venues[]. Requires ?pair=SYM/SYM AND ?amountUsd=25000 (or ?amountIn=). pair alone = 400 missing_amount. Errors: 400 bad_pair|missing_amount|bad_amount, 404 no_pools|no_quote|cannot_size_in_usd, 502 upstream_read_failed. Spot price without a size is /price. Chain-pinned; bare /slippage = BSC.

## Output

Returns the best execution venue (BaseSwap, SushiSwap, or Uniswap v3), the expected amount out for the trade, price impact in basis points, the pool fee tier, and the savings in value achieved by optimal routing versus the naive best-quoted-price approach — all computed against live on-chain AMM reserves on Base L2.

## 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": [
      "pair",
      "amountUsd"
     ],
     "properties": {
      "pair": {
       "type": "string",
       "description": "Token pair as SYM/SYM on Base (e.g. WETH/USDC)."
      },
      "amountIn": {
       "type": "string",
       "description": "Trade size denominated in the FIRST pair symbol instead of USD. An alternative to amountUsd; supplying either one is enough."
      },
      "amountUsd": {
       "type": "string",
       "description": "Trade size in USD, e.g. 10000. Required unless amountIn is given instead."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ts": "2026-07-31T00:00:00.000Z",
  "chainId": 8453,
  "network": "base"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-dex-slippage-price-impact-simulator-e827a39a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.donnyautomation.com](https://www.zero.xyz/host/x402.donnyautomation.com/llms.txt)
