# 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).

Fetches the current ERC-20 token allowance granted by an owner to a spender on Base, including balance, exposure risk, and revoke recommendation.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/chain/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-d4200f69
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_G5_9Lo3ZBZC8UUJwCa3_L

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-d4200f69
```

Example prompt: Check the USDC allowance that wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has granted to Uniswap Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3) on Base — tell me the current allowance, whether it's unlimited, and if a revoke is recommended.

## When to prefer this

Use this endpoint when an AI agent needs to verify on-chain ERC-20 token approvals on Base before executing a DeFi transaction, auditing wallet security, or checking whether a spender (e.g. a DEX router) already has sufficient allowance. Prefer it over general blockchain explorers when you need structured, machine-readable allowance data with risk classification and revoke recommendations in a single low-cost call. Requires no API key — pay $0.002 USDC per call via x402.

## Known failure modes

- Invalid Ethereum address format for owner or spender returns a validation error
- Token contract address not found on Base returns an error or empty result
- Network or RPC timeout may return a 503 or empty response
- Wallet with zero balance or no prior approval returns allowance of 0 and revoke_recommended false
- Missing required owner or spender query params returns 400 bad request

## 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 the allowance is unlimited, the owner's token balance, the spender's known label (e.g. 'Uniswap Permit2'), a risk classification, the exposure amount, and a boolean revoke_recommended flag plus a revoke_tx if applicable. Also includes chain context (block number, chain name, token symbol, decimals).

## 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-d4200f69/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)
