# ERC-20 Token Allowance Checker (Base Chain)

> ERC-20 Token Allowance Checker (Base Chain) 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).

Returns the current ERC-20 token allowance granted by an owner to a spender on Base, including risk assessment, balance, and revocation recommendation.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/v1/allowance?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/erc-20-token-allowance-checker-base-chain-970650f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fQEwERikg0AFVzosZHuwq

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-allowance-checker-base-chain-970650f4
```

Example prompt: Check what USDC allowance wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has granted to Uniswap Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3) on Base, and tell me if I should revoke it.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically audit ERC-20 token approvals on Base without managing API keys — particularly for pre-trade safety checks, wallet security audits, or automated revocation workflows. Prefer this over block explorers when you need structured JSON with risk labels and revocation hints ready for agent consumption. The pay-per-call x402 model (0.002 USDC) makes it suitable for on-demand queries without subscription overhead.

## Known failure modes

- Invalid owner or spender address format (must be 0x-prefixed 40-char hex) returns 400
- Unsupported token contract returns error or empty result
- Payment not included or insufficient USDC triggers x402 payment-required response
- RPC/network timeout on Base returns 503 or delayed response
- Non-Base token addresses silently default to USDC contract

## 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: the current allowance (human-readable and raw), whether it is unlimited, the owner's token balance, the spender's human-readable label (e.g. 'Uniswap Permit2'), a risk rating ('none', 'low', 'high'), an exposure value, a boolean revoke_recommended flag, an optional revoke_tx hex for on-chain revocation, token symbol and decimals, and the Base block number at query time.

## 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": [
      "owner",
      "spender"
     ],
     "properties": {
      "owner": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0xe4be4d0bd82d8e68203deff81f79ede0529f2617"
       ],
       "description": "Token holder (alias wallet)"
      },
      "token": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
       ],
       "description": "Base ERC-20 (default USDC)"
      },
      "amount": {
       "type": "number",
       "examples": [
        1
       ],
       "description": "Optional amount to test can_spend"
      },
      "spender": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0x000000000022D473030F116dDEE9F6B43aC78BA3"
       ],
       "description": "Approved spender / router"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "risk": "none",
  "block": 53250000,
  "chain": "base",
  "owner": "0xe4be4d0bd82d8e68203deff81f79ede0529f2617",
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "symbol": "USDC",
  "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
  "decimals": 6,
  "exposure": 0,
  "allowance": 0,
  "revoke_tx": null,
  "unlimited": false,
  "allowance_raw": "0",
  "owner_balance": 0.079,
  "spender_label": "Uniswap Permit2",
  "revoke_recommended": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-allowance-checker-base-chain-970650f4/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)
