# Base Wallet Approval-Risk Audit

> Base Wallet Approval-Risk Audit is a paid API for AI agents from x402-data-api.bodhinindustries.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Audits a Base wallet address for active ERC-20 token approvals, flagging risky, unlimited, or EOA-spender allowances computed live from on-chain data.

## Facts

- Endpoint: GET https://x402-data-api.bodhinindustries.workers.dev/approvals
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-wallet-approval-risk-audit-d2ca0b3f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vxO2_LizoZjb9UPKxJcAu

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 base-wallet-approval-risk-audit-d2ca0b3f
```

Example prompt: Can you audit my Base wallet 0xAbc123...def for risky ERC-20 approvals — I want to know if any contracts or EOA addresses have unlimited or high-risk allowances to drain my tokens?

## When to prefer this

Choose this endpoint when you need a live, trustless, on-chain-only approval audit for a Base wallet with no reliance on third-party databases — especially when you want manipulation-resistant data or need to programmatically assess drainer risk (EOA spenders, unlimited allowances) before executing a DeFi transaction or after a suspected phishing event.

## Known failure modes

- Missing required 'wallet' parameter returns validation error
- Invalid or non-checksummed wallet address may return error or empty result
- Lookback window exceeding 800 blocks is clamped or rejected
- No approvals found in the lookback window returns verdict 'no_recent_approvals'
- RPC or chain connectivity issues may cause timeout or unknown verdict
- Payment of $0.01 USDC via x402 required; unpaid requests return 402

## How this service works

Self-computed Base onchain toolkit for AI agents: ERC-20 safety scan, manipulation-resistant TWAP price oracle, gas/fee oracle, calldata decoder, token/address/contract intel, wallet approval-risk audit, and batch token triage — all computed live from raw Base chain, no third-party data.

## Output

Returns a verdict (clean, medium, high, critical, etc.), a summary count of active/unlimited/EOA-spender approvals, and a detailed list of each risky approval including the token symbol, spender address, whether the spender is a contract or EOA, the allowance and realistic drainable exposure, and one or more risk flags — all computed live from Base chain at the current block height.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "wallet"
 ],
 "properties": {
  "token": {
   "type": "string",
   "description": "Specific ERC-20 to check allowances on (time-independent). If omitted, discovers approvals in the recent block window."
  },
  "wallet": {
   "type": "string",
   "description": "Base wallet address to audit."
  },
  "lookback": {
   "type": "integer",
   "description": "Recent block window for Approval-log discovery when token is omitted (max 800, default 800)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "block": {
   "type": "integer",
   "description": "Base block height"
  },
  "wallet": {
   "type": "string",
   "description": "wallet audited"
  },
  "summary": {
   "type": "object",
   "properties": {
    "highestRisk": {
     "type": "string",
     "description": "worst risk level"
    },
    "activeApprovals": {
     "type": "integer",
     "description": "count"
    },
    "unlimitedApprovals": {
     "type": "integer",
     "description": "count"
    },
    "eoaSpenderApprovals": {
     "type": "integer",
     "description": "count"
    }
   }
  },
  "verdict": {
   "type": "string",
   "description": "clean|no_recent_approvals|medium|high|critical|unknown"
  },
  "approvals": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "risk": {
      "type": "string",
      "description": "low|medium|high|critical"
     },
     "token": {
      "type": "string",
      "description": "token address"
     },
     "spender": {
      "type": "string",
      "description": "spender address"
     },
     "riskFlags": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "isUnlimited": {
      "type": "boolean",
      "description": "near-max allowance"
     },
     "tokenSymbol": {
      "type": "string",
      "description": "symbol"
     },
     "exposureFormatted": {
      "type": "string",
      "description": "realistically drainable now"
     },
     "spenderIsContract": {
      "type": "boolean",
      "description": "false = EOA spender (drainer signal)"
     },
     "allowanceFormatted": {
      "type": "string",
      "description": "'unlimited' or decimal amount"
     }
    }
   },
   "description": "active risky approvals"
  },
  "computedAt": {
   "type": "string",
   "description": "ISO-8601 timestamp"
  },
  "thirdPartyDataUsed": {
   "type": "boolean",
   "description": "always false"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-wallet-approval-risk-audit-d2ca0b3f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.bodhinindustries.workers.dev](https://www.zero.xyz/host/x402-data-api.bodhinindustries.workers.dev/llms.txt)
