# Avasis ERC-20 Allowance Checker (Base)

> Avasis ERC-20 Allowance Checker (Base) is a paid API for AI agents from agents.avasis.ai, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Returns the current ERC-20 token allowance a spender has over an owner's balance on Base, including optional approval sufficiency checks and ready-to-sign calldata.

## Facts

- Endpoint: GET https://agents.avasis.ai/v1/base/erc20-allowance?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/avasis-erc-20-allowance-checker-base-c465c436
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_opU0l4GW9kq7UkTXpPKGx

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 avasis-erc-20-allowance-checker-base-c465c436
```

Example prompt: Check the USDC allowance my wallet 0x8fae03e3e0cb922297495bc22ee2a7c997f89b8d has granted to Uniswap Permit2 (0x000000000022d473030f116ddee9f6b43ac78ba3) on Base, and tell me if that allowance covers a transfer of 250 USDC — include the calldata to revoke if needed.

## When to prefer this

Use this endpoint when you need a complete allowance picture for an ERC-20 token on Base in a single call — especially when you also need approval sufficiency validation against a specific amount and ready-to-sign approve/revoke calldata. Prefer this over raw RPC calls when you want enriched metadata (known protocol names, USD exposure, Permit2 detection) without setting up an account or API key. Best suited for DeFi automation agents that need to gate-check approvals before executing swaps, bridges, or other transferFrom-based operations.

## Known failure modes

- Missing required query params (owner, token, or spender) returns a 400-level error
- Invalid or non-checksummed Ethereum address format causes a parse error
- Token contract address does not exist on Base returns zero allowance or RPC error
- Network/RPC timeout results in a 5xx error
- Payment not included or insufficient causes an x402 payment-required response
- Non-Base chain ID supplied may be rejected or routed incorrectly

## How this service works

ERC-20 allowance check on Base (chain 8453, $0.02): owner + token + spender -> allowance (raw + units, unlimited flag), balance, spendable now = min(allowance, balance), USD exposure, spender code check (EOA = drainer pattern), Permit2 note. Add amount for a needs-approval check (shortfall) + approve calldata; revoke calldata always. Phrases: erc20 allowance, token approval check, needs approval, approve calldata, revoke approval. GET or POST JSON. Not an ERC-20 -> 404, never charged.

## Output

A JSON object containing: the current allowance (raw and human-readable, with unlimited flag), the owner's token balance, the USD exposure value, a spendable_now figure, a headline summary string, spender and token metadata (known protocol name, contract flag, Permit2 flag), optional approval sufficiency verdict (READY/shortfall), exact approve and revoke calldata ready to sign, and the block number at which data was read.

## 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",
      "token",
      "spender"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "optional; must be base / 8453 on this route"
      },
      "owner": {
       "type": "string",
       "description": "the token holder whose approval you are checking (0x + 40 hex)"
      },
      "token": {
       "type": "string",
       "description": "ERC-20 token contract on Base (0x + 40 hex)"
      },
      "amount": {
       "type": "string",
       "description": "optional amount in token units (e.g. 100.5): adds the needs-approval check (sufficient allowance / balance, shortfall) and exact approve calldata"
      },
      "spender": {
       "type": "string",
       "description": "the contract or account that would call transferFrom (router, Permit2, bridge, ...) (0x + 40 hex)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "chain",
      "token",
      "owner",
      "spender",
      "allowance",
      "spendable_now",
      "calldata",
      "headline"
     ],
     "properties": {
      "usd": {
       "type": "object"
      },
      "kind": {
       "type": "string"
      },
      "rail": {
       "type": "string"
      },
      "chain": {
       "type": "string"
      },
      "check": {
       "type": [
        "object",
        "null"
       ]
      },
      "owner": {
       "type": "string"
      },
      "token": {
       "type": "object"
      },
      "spender": {
       "type": "object"
      },
      "calldata": {
       "type": "object"
      },
      "chain_id": {
       "type": "integer"
      },
      "headline": {
       "type": "string"
      },
      "allowance": {
       "type": "object"
      },
      "block_number": {
       "type": "integer"
      },
      "owner_balance": {
       "type": "object"
      },
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "usd": {
   "note": "exposure = spendable_now at the current price",
   "price": 1,
   "exposure": 11285.04,
   "allowance": null,
   "price_source": "stablecoin peg (known issuer)",
   "owner_balance": 11285.04
  },
  "kind": "erc20-allowance",
  "rail": "evm-rails-1",
  "chain": "base",
  "check": {
   "amount": "250",
   "verdict": "READY: the spender can move this amount now",
   "amount_raw": "250000000",
   "needs_approval": false,
   "shortfall_balance": "0",
   "sufficient_balance": true,
   "shortfall_allowance": "0",
   "sufficient_allowance": true,
   "approve_exact_calldata": null
  },
  "owner": "0x8fae03e3e0cb922297495bc22ee2a7c997f89b8d",
  "reads": {
   "rpc": "fixture",
   "calls": 8,
   "elapsed_ms": 0
  },
  "token": {
   "known": "USDC (Circle)",
   "symbol": "USDC",
   "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
   "decimals": 6,
   "decimals_source": "decimals()"
  },
  "spender": {
   "note": "Permit2 keeps its own per-spender allowances on top of this ERC-20 approval",
   "known": "Uniswap Permit2",
   "address": "0x000000000022d473030f116ddee9f6b43ac78ba3",
   "permit2": true,
   "is_contract": true
  },
  "calldata": {
   "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
   "from": "the owner",
   "note": "approve(spender, amount) as 0x calldata, ready to sign from the owner; prefer an exact amount over unlimited; revoke = approve(spender, 0). Simulate first: /v1/<chain>/tx-precheck",
   "revoke": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba30000000000000000000000000000000000000000000000000000000000000000",
   "approve_exact": null,
   "approve_unlimited": "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
  },
  "chain_id": 8453,
  "headline": "USDC on Base: 0x8fae…9b8d allows Uniswap Permit2 UNLIMITED; balance 11,285.039971 (exposure $11,285.04); READY for 250",
  "allowance": {
   "raw": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
   "zero": false,
   "amount": "115792089237316195423570985008687907853269984665640564039457584007913129.639935",
   "unlimited": true,
   "pct_of_balance": 100
  },
  "block_number": 53354727,
  "owner_balance": {
   "raw": "11285039971",
   "error": null,
   "amount": "11285.039971"
  },
  "spendable_now": {
   "raw": "11285039971",
   "note": "what the spender could move right now = min(allowan
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/avasis-erc-20-allowance-checker-base-c465c436/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.avasis.ai](https://www.zero.xyz/host/agents.avasis.ai/llms.txt)
