# Avasis ERC-20 Allowance Checker (Ethereum)

> Avasis ERC-20 Allowance Checker (Ethereum) 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 tokens on Ethereum, with optional approval sufficiency check and ready-to-sign calldata.

## Facts

- Endpoint: GET https://agents.avasis.ai/v1/eth/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-ethereum-c574f4ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_q0Tl5B-97gZ_CGwR-UUmg

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-ethereum-c574f4ad
```

Example prompt: Check how much USDC allowance my wallet 0x8fae03e3e0cb922297495bc22ee2a7c997f89b8d has granted to Uniswap Permit2 (0x000000000022d473030f116ddee9f6b43ac78ba3) on Ethereum, and tell me if it's enough to cover a 250 USDC transfer — also give me the calldata to revoke if it's unlimited.

## When to prefer this

Use this endpoint when you need a single, structured, pay-per-call lookup of ERC-20 allowances on Ethereum without requiring an API key or account — especially useful for agents performing pre-trade safety checks, approval audits, or generating revoke/approve calldata before signing a transaction. Prefer it over raw RPC calls when you also want enriched metadata (known spender names, USD exposure, Permit2 flags, and ready-to-sign calldata) in one response.

## Known failure modes

- Invalid or malformed owner/token/spender address returns a 400 error
- Token contract does not exist or is not ERC-20 compliant causes RPC call failure
- Network congestion or RPC timeout may delay response
- Unsupported chain identifier returns an error (only ethereum/1 on this route)
- Amount field with non-numeric value causes parsing error

## How this service works

ERC-20 allowance check on Ethereum (chain 1, $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), whether it is unlimited, the owner's token balance and USD exposure, the spendable_now amount, a verdict on whether the allowance is sufficient for the requested amount, any shortfall, ready-to-sign approve and revoke calldata, recognized names for the token and spender (e.g. USDC Circle, Uniswap Permit2), and a plain-English headline summarizing the situation.

## 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 ethereum / 1 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 Ethereum (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": "ethereum",
  "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": 1,
  "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(allowa
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/avasis-erc-20-allowance-checker-ethereum-c574f4ad/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)
