# Base ERC-20 Approval Risk Checker

> Base ERC-20 Approval Risk Checker is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Assesses the risk level of an ERC-20 token approval on Base by analyzing the owner, spender, and token contract addresses.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/base/approval-risk
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-erc-20-approval-risk-checker-3f037c11
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TjWqVZiCUyks1N2TTR_wA

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-erc-20-approval-risk-checker-3f037c11
```

Example prompt: Before I approve this contract to spend my USDC, can you check the approval risk on Base? The token is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, my wallet is 0xAbCd1234567890abcdef1234567890abcdef1234, and the spender is 0xDEF456789012345678901234567890def4567890.

## When to prefer this

Use this endpoint when an agent needs to pre-screen an ERC-20 token approval transaction on Base before signing, particularly when the spender contract is unfamiliar or the approval amount is large. Prefer this over generic transaction decoders when the specific risk profiling of an allowance relationship (owner→spender→token) is needed rather than just decoding calldata.

## Known failure modes

- Invalid Ethereum address format for token, owner, or spender returns a 400 validation error
- Unknown or unindexed contract addresses may return a low-signal assessment with empty flags
- Service unavailability returns a 5xx error
- Rate limiting or payment failure may return a 402 or 429 response

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

Returns a JSON object with the network identifier (eip155:8453), product name, and an assessment object containing a risk_score (numeric), risk_level (e.g. 'low', 'medium', 'high'), and a flags array listing any specific risk signals detected for the token/owner/spender combination.

## 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": [
      "token",
      "owner",
      "spender"
     ],
     "properties": {
      "owner": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Token owner that granted the allowance."
      },
      "token": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "ERC-20 token contract."
      },
      "spender": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Address authorized to spend the owner's tokens."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "base-approval-risk",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-erc-20-approval-risk-checker-3f037c11/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
