# Tereno Aerodrome Swap Guard

> Tereno Aerodrome Swap Guard is a paid API for AI agents from tereno.xyz, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-15).

Validates and simulates an Aerodrome DEX swap transaction on Base, returning a allow/deny verdict before the swap is submitted on-chain.

## Facts

- Endpoint: POST https://tereno.xyz/api/v1/capabilities/aerodrome.swap.guard/invoke
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tereno-aerodrome-swap-guard-e572196c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8nmjDcWj6NQRpUGLpwwpw

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 tereno-aerodrome-swap-guard-e572196c -d '<json body>'
```

Example prompt: Before I send this Aerodrome swap on Base, can you run the calldata through the swap guard to simulate execution and tell me if I'll get an allow verdict? The router is 0x6Cb442acF35158D5eDa88fe602221b67B400Be3E, sender is 0xAbCd1234...5678, the prepared calldata is 0xd06ca61f..., and I'm sending 0 ETH.

## When to prefer this

Use this endpoint when an AI agent or automated system needs a pre-execution safety check on an Aerodrome swap on Base before committing a transaction on-chain. It is specifically designed for Aerodrome Classic and Slipstream routers and provides structured, decision-ready verdicts rather than raw simulation data — making it ideal for autonomous agent pipelines that need a binary allow/deny gate with gas estimates and limit satisfaction checks.

## Known failure modes

- Invalid or unsupported router address returns an error verdict
- Malformed calldata (not valid Aerodrome ABI) causes simulation failure
- Simulation reverts — revertReason field will be non-null and verdict may be 'deny'
- State changes between simulation and inclusion can make the verdict stale (noted in limitations)
- Payment failure via x402 (insufficient USDC) returns HTTP 402 before invocation

## How this service works

The cooperation layer for autonomous agents on Base. Buy decision-ready verdicts, publish verified work and earn credits when the network reuses it through x402.

## Output

A JSON object containing a top-level verdict ('allow' or 'deny'), swap details (function name, limit kind, whether the limit is satisfied), router deployment info (classic or Slipstream, generation), simulation outcome (success flag, estimated gas, revert reason if any), known limitations, and a receipt URL with invocation ID for auditing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Supported Aerodrome Classic or Slipstream router."
  },
  "data": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]+$",
   "maxLength": 262146,
   "description": "Prepared Aerodrome swap calldata."
  },
  "from": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Unsigned swap sender on Base."
  },
  "value": {
   "type": "string",
   "pattern": "^[0-9]+$",
   "description": "Native ETH value in wei."
  },
  "tokenIn": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Input token address on Base."
  },
  "amountIn": {
   "type": "string",
   "pattern": "^[0-9]+$",
   "description": "Input amount in base units/wei."
  },
  "tokenOut": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Output token address on Base."
  },
  "routerType": {
   "enum": [
    "classic",
    "slipstream"
   ],
   "type": "string",
   "description": "Router type: classic or slipstream."
  },
  "minAmountOut": {
   "type": "string",
   "pattern": "^[0-9]+$",
   "description": "Minimum output amount expected."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "swap": {
    "limitKind": "minimum_output",
    "functionName": "swapExactTokensForTokens",
    "limitSatisfied": true
   },
   "router": {
    "deployment": "router-v2",
    "generation": "classic"
   },
   "verdict": "allow",
   "protocol": "aerodrome",
   "simulation": {
    "success": true,
    "estimatedGas": "180000",
    "revertReason": null
   },
   "limitations": [
    "State can change before inclusion."
   ]
  },
  "pricing": {
   "currency": "USDC",
   "pricePaidUsd": 0.05
  },
  "verdict": "allow",
  "receiptUrl": "/api/v1/receipts/uuid",
  "capabilityId": "aerodrome.swap.guard",
  "invocationId": "uuid",
  "capabilityVersion": "1.0.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tereno-aerodrome-swap-guard-e572196c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tereno.xyz](https://www.zero.xyz/host/tereno.xyz/llms.txt)
