# Tenderly Transaction Simulation (Base) via x402

> Tenderly Transaction Simulation (Base) via x402 is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-02).

Simulates one or more Ethereum/Base transactions using Tenderly, returning safety verdict, token transfers, gas cost, and balance changes before broadcasting on-chain.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/tenderly/simulate?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tenderly-transaction-simulation-base-via-x402-dc02e2e3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QvXpQhy4FPmNCGLsEYzuv

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 tenderly-transaction-simulation-base-via-x402-dc02e2e3
```

Example prompt: Before I send 0.001 USDC to 0xa587d73489f8f09d1975f1ddbb1c61c93e8fa9d7 from my wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base, simulate the transaction and tell me if it's safe, what the gas cost will be in USD, and what token balances will change.

## When to prefer this

Choose this endpoint when an AI agent needs to dry-run a Base/Ethereum transaction before broadcasting — especially to check safety (SAFE_TO_SEND verdict), decode token transfers, estimate gas in USD, or diagnose revert reasons. Prefer over raw eth_call when you need a human-readable summary with decoded function names, transfer lists, and balance deltas. Ideal for autonomous trading agents that must validate each step before committing funds on-chain. No API key required; pay per call with USDC via x402.

## Known failure modes

- Invalid Ethereum address format returns schema validation error
- Malformed calldata hex string rejected before simulation
- Simulation itself may succeed even if on-chain state has diverged since block snapshot
- Network errors to Tenderly backend return 5xx
- x402 payment failure if agent wallet has insufficient USDC on Base
- Batch of more than 5 calls rejected by schema constraint

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

Returns a JSON object with: overall success/failure verdict (SAFE_TO_SEND or revert), per-call breakdown (function decoded, gas used, revert reason if any), list of token transfers with amounts and symbols, net balance changes per address, estimated fee in ETH and USD, and block number of simulation. Also includes suggested next endpoints to call.

## 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": {
      "to": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
       ],
       "description": "Target contract or recipient"
      },
      "data": {
       "type": "string",
       "pattern": "^0x([0-9a-fA-F]{2})*$",
       "description": "Calldata (default 0x)"
      },
      "from": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0xe4be4d0bd82d8e68203deff81f79ede0529f2617"
       ],
       "description": "Sender (signer) address"
      },
      "calls": {
       "type": "string",
       "description": "URL-encoded JSON array of up to 5 {to,data,value_eth|value} run in order from the same sender"
      },
      "value_eth": {
       "type": "string",
       "examples": [
        "0.01"
       ],
       "description": "ETH to send, decimal (default 0)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "from": "0xe4be4d0bd82d8e68203deff81f79ede0529f2617",
  "next": [
   "/crypto/base-gas",
   "/crypto/tx-status?hash="
  ],
  "block": 53272234,
  "calls": [
   {
    "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "index": 0,
    "success": true,
    "function": "transfer(address,uint256)",
    "gas_used": 45047,
    "revert_reason": null
   }
  ],
  "chain": "base",
  "flags": [],
  "fee_eth": 5e-7,
  "fee_usd": 0.0019,
  "success": true,
  "summary": "1 call succeeds; sender sends 0.001 USDC",
  "verdict": "SAFE_TO_SEND",
  "approvals": [],
  "transfers": [
   {
    "to": "0xa587d73489f8f09d1975f1ddbb1c61c93e8fa9d7",
    "from": "0xe4be4d0bd82d8e68203deff81f79ede0529f2617",
    "token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "amount": 0.001,
    "symbol": "USDC"
   }
  ],
  "gas_used_total": 45047,
  "sender_changes": {
   "USDC": -0.001
  },
  "balance_changes": {
   "0xa587d73489f8f09d1975f1ddbb1c61c93e8fa9d7": {
    "USDC": 0.001
   },
   "0xe4be4d0bd82d8e68203deff81f79ede0529f2617": {
    "USDC": -0.001
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tenderly-transaction-simulation-base-via-x402-dc02e2e3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
