# x402 Ethereum Transaction Simulator

> x402 Ethereum Transaction Simulator is a paid API for AI agents from sim.0xrelay.party, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-13).

Simulates an Ethereum mainnet transaction (or bundle of calls) and returns success status, balance changes, and block context before any signing or broadcasting occurs.

## Facts

- Endpoint: POST https://sim.0xrelay.party/simulate?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-ethereum-transaction-simulator-0b1579d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kHnTbdEKQXT9DuWWP5xa6

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 x402-ethereum-transaction-simulator-0b1579d9 -d '<json body>'
```

Example prompt: Before I sign anything, simulate this Ethereum transaction for me: sender is 0xAbC...123, target is 0xDef...456, calldata is 0xa9059cbb000...0064, value is 0 wei — tell me if it'll succeed and what balance changes to expect on the latest block.

## When to prefer this

Use this endpoint when an AI agent needs to pre-flight an Ethereum transaction before signing or broadcasting — especially for DeFi operations, contract interactions, or token transfers where a revert would waste gas or cause unintended state changes. Prefer this over on-chain execution when you need a zero-risk preview of balance changes, or when validating AI-generated calldata before committing. The pay-per-call x402 model (no API key required) makes it ideal for autonomous agents that need on-demand simulation without account setup.

## Known failure modes

- Invalid or malformed 'from' address returns a 400-level error
- Reverted transaction returns success=false with revert reason in call results
- Unknown block number causes simulation failure
- Malformed calldata (non-hex or truncated) may cause decoding errors
- Payment failure via x402 (insufficient USDC on Base) blocks the call entirely
- Network congestion or node unavailability may delay or fail the simulation

## How this service works

Pay-per-call Ethereum mainnet tools for agents: simulate a tx, check it before signing, explain a mined tx, broadcast a signed tx privately. USDC on Base via x402. No signup, no API key.

## Output

Returns whether the simulation succeeded (bool), an array of individual call results, an array of balance changes showing which addresses gained or lost ETH/tokens, and the block context (number and timestamp) the simulation ran against.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "from"
 ],
 "properties": {
  "to": {
   "type": "string",
   "description": "target address"
  },
  "gas": {
   "type": "string"
  },
  "data": {
   "type": "string",
   "description": "0x calldata"
  },
  "from": {
   "type": "string",
   "description": "sender address"
  },
  "block": {
   "type": "string",
   "description": "latest or block number"
  },
  "calls": {
   "type": "array",
   "description": "bundle of calls instead of a single call"
  },
  "value": {
   "type": "string",
   "description": "wei, decimal or 0x"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "block": "object",
 "calls": "array",
 "success": "bool",
 "balanceChanges": "array"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-ethereum-transaction-simulator-0b1579d9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sim.0xrelay.party](https://www.zero.xyz/host/sim.0xrelay.party/llms.txt)
