# Crypto Calldata Decoder & Risk Analyzer (x402)

> Crypto Calldata Decoder & Risk Analyzer (x402) is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Decodes raw EVM calldata or a Base transaction hash into human-readable function calls with risk assessment, flags, and guidance.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/crypto/decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-calldata-decoder-risk-analyzer-x402-647896a9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8fTvxbA70hcB40aG1EOS1

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 crypto-calldata-decoder-risk-analyzer-x402-647896a9
```

Example prompt: Decode this calldata for me and tell me if it's safe to sign: 0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff — the target contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base.

## When to prefer this

Choose this endpoint when an AI agent or user needs to understand what a raw EVM transaction or calldata blob actually does before signing — especially for risk assessment of token approvals, DeFi interactions, or any unknown contract call on Base. Prefer over generic ABI decoders when you also need risk verdicts, spender labels, and plain-English guidance bundled in one pay-per-call response with no API key setup.

## Known failure modes

- Missing or malformed calldata hex returns validation error
- Unknown function selector yields partial decode with signature_source: unknown
- Invalid Base tx hash returns not-found or RPC error
- Calldata too short (under 4 bytes) cannot be decoded
- Payment failure via x402 if USDC balance insufficient

## 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 decoded function name, selector, ABI-typed arguments with values, risk verdict (e.g. CAUTION/OK), risk level (low/medium/high), flags like 'unlimited_approval', a plain-English summary of what the transaction does, spender label if known, and guidance on next steps.

## 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}$",
       "description": "Optional target contract (token) for symbol/decimals + label"
      },
      "data": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{8,}$",
       "examples": [
        "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
       ],
       "description": "Calldata hex (selector + ABI args). Required unless hash given"
      },
      "hash": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{64}$",
       "description": "Optional Base tx hash: decode its input instead of data"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "args": [
   {
    "type": "address",
    "value": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
   },
   {
    "type": "uint256",
    "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
   }
  ],
  "risk": "medium",
  "chain": "base",
  "flags": [
   "unlimited_approval"
  ],
  "amount": "unlimited",
  "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
  "summary": "lets Uniswap Permit2 move ALL USDC from the signer",
  "verdict": "CAUTION",
  "function": "approve(address,uint256)",
  "guidance": "Review the decoded args; simulate with /crypto/base-rpc?method=eth_call before signing.",
  "selector": "0x095ea7b3",
  "unlimited": true,
  "spender_label": "Uniswap Permit2",
  "signature_source": "builtin"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-calldata-decoder-risk-analyzer-x402-647896a9/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)
