{"uid":"cap_cczE62XQyYfOVqjUP6ZL4","slug":"base-erc-20-allowance-approval-risk-audit-239cd2d1","name":"Base ERC-20 Allowance & Approval Risk Audit","description":"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.","url":"https://x402-data-api.bodhinindustries.workers.dev/allowance","method":"GET","headers":{},"bodySchema":{"type":"object","required":["owner","token","spender"],"properties":{"via":{"type":"string","description":"Optional downstream spender for the Permit2 sub-allowance (only when spender is Permit2)."},"owner":{"type":"string","description":"Address that granted the approval."},"token":{"type":"string","description":"ERC-20 whose allowance to check."},"amount":{"type":"string","description":"Optional human amount to test sufficiency against."},"spender":{"type":"string","description":"Approved spender to check (router, Permit2, vault)."}}},"responseSchema":{"type":"object","properties":{"block":{"type":"integer","description":"Base block height"},"owner":{"type":"string","description":"owner"},"token":{"type":"string","description":"token"},"symbol":{"type":"string","description":"symbol"},"spender":{"type":"string","description":"spender"},"riskFlags":{"type":"array","items":{"type":"string"}},"computedAt":{"type":"string","description":"ISO-8601 timestamp"},"isUnlimited":{"type":"boolean","description":"near-max allowance"},"sufficientFor":{"type":"boolean","description":"covers ?amount (or null)"},"recommendation":{"type":"string","description":"no_allowance | needs_increase | over_approved | ok"},"spenderIsPermit2":{"type":"boolean","description":"spender is canonical Permit2"},"allowanceFormatted":{"type":"string","description":"'unlimited' or human amount"},"thirdPartyDataUsed":{"type":"boolean","description":"always false"},"ownerBalanceFormatted":{"type":"string","description":"owner balance"},"drainableExposureFormatted":{"type":"string","description":"min(allowance,balance)"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_W_GtuDCVo06jPOlOJQ5YB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks an ERC-20 token allowance on Base chain for a given owner/spender pair, returning drainable exposure, risk flags, Permit2 sub-allowance details, and an actionable recommendation — all computed live from raw chain data.","exampleAgentPrompt":"Can you audit the USDC allowance that my wallet 0xABC...123 has granted to the Uniswap Universal Router (0xEF1c6E67703c7BD7107eed8303Fbe6EC2554BF6B) on Base — I want to know if it's unlimited, what my drainable exposure is, and whether I'm over-approved?","exampleUseCases":null,"resultDescription":"Returns the current ERC-20 allowance (formatted as 'unlimited' or a human amount), the owner's token balance, the drainable exposure (min of allowance and balance), whether the allowance is unlimited, whether the spender is Permit2, any risk flags, and a recommendation string ('no_allowance' | 'needs_increase' | 'over_approved' | 'ok'). All data is computed live from the Base chain with no third-party data sources.","failureModes":["Invalid or malformed Ethereum address returns an error response","Token contract does not exist on Base — returns error or zero allowance","Network/RPC failure causes a 5xx or timeout","Permit2 via address provided when spender is not Permit2 — ignored or may error","Amount parameter in incorrect format (non-numeric string) may cause parsing failure"],"whenToPreferThis":"Choose this endpoint when you need a live, chain-computed audit of an ERC-20 token approval on Base — especially when you want risk flags, drainable exposure, and an actionable recommendation rather than a raw allowance number. Prefer this over generic block explorers when you need structured, agent-consumable output with Permit2 awareness and no reliance on third-party data providers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:47:08.823Z","isFirstParty":false}