# ERC-20 Token Approval / Allowance Risk Scanner

> ERC-20 Token Approval / Allowance Risk Scanner is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Scans a wallet's recent ERC-20 token approvals on a given chain, identifying unlimited or risky allowances that could drain funds and should be revoked.

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/safety/approvals
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-approval-allowance-risk-scanner-e41ecdc3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xIsj8Jqwbl46_4W0nL6-s

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 erc-20-token-approval-allowance-risk-scanner-e41ecdc3 -d '<json body>'
```

Example prompt: Can you scan my wallet 0xAbc123...def for risky or unlimited ERC-20 token approvals on Base — check the last 3 block windows and tell me which allowances I should revoke?

## When to prefer this

Use this endpoint when a user wants to audit their wallet's ERC-20 token approval history to find risky or unlimited allowances granted to external contracts or addresses. Prefer this over generic wallet activity endpoints when the specific concern is token approval security and revocation decisions, not general transaction history.

## Known failure modes

- Invalid or malformed wallet address returns a 400 error
- Unsupported chain identifier returns an error or default to Base
- windows value outside 1-6 range may be rejected or clamped
- No approvals found returns an empty list (not an error)
- Payment failure (insufficient USDC) results in 402 response
- RPC or indexing latency may cause timeouts on deep scans

## How this service works

Token-approval / allowance risk scanner: recent ERC-20 approvals a wallet granted, which are unlimited, and to whom. Send { chain, owner, windows? }. Find risky allowances that could drain your tokens and should be revoked.

## Output

Returns a list of recent ERC-20 approvals the wallet has granted, flagging which are unlimited (max uint256), identifying the spender addresses, and highlighting allowances that pose a risk of draining tokens if exploited.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "owner"
 ],
 "properties": {
  "chain": {
   "type": "string",
   "description": "Chain, default base"
  },
  "owner": {
   "type": "string",
   "description": "0x wallet to scan"
  },
  "windows": {
   "type": "number",
   "description": "How many ~9.5k-block windows to scan back, 1-6 (default 3)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-approval-allowance-risk-scanner-e41ecdc3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
