{"uid":"cap_Q2z7Ow-NipKo7HmmDDHyf","slug":"erc20-allowance-risk-checker-122756d5","name":"ERC20 Allowance Risk Checker","description":"Check the exact ERC20 allowance an owner granted a spender and flag unlimited approvals that let a contract drain funds - a pre-transaction safety check agents need that LLMs cannot perform. allowance risk, approval risk, unlimited approval, spender risk, revoke check, token approval safety Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/chain/allowance-risk","method":"GET","headers":{},"bodySchema":{"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":["token","owner","spender"],"properties":{"owner":{"type":"string","description":"Token owner (required)"},"token":{"type":"string","description":"ERC20 contract (required)"},"address":{"type":"string","description":"EVM/chain address (optional)"},"spender":{"type":"string","description":"Spender contract (required)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"chain":"ethereum","owner":"0x1234567890123456789012345678901234567890","token":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","spender":"0x0987654321098765432109876543210987654321"},"response":{"note":"Exact on-chain allowance. Agents should check this before trusting a spender contract.","_hint":"x402 paid endpoints for AI agents — x402node.dev (utilities) · cn402.com (Chinese culture)","owner":"0x1234567890123456789012345678901234567890","token":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","source":"alchemy","symbol":"?","revoked":true,"spender":"0x0987654321098765432109876543210987654321","allowance":{"raw":"0","formatted":0},"riskLevel":"none","unlimited":false,"recommendation":"No approval (safe)."}},"exampleRequest":{"chain":"ethereum","owner":"0x1234567890123456789012345678901234567890","token":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","spender":"0x0987654321098765432109876543210987654321"},"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-v_kG4CJCK6M5Onq7KesO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the exact ERC20 token allowance an owner has granted to a spender and flags whether the approval is unlimited, signaling potential fund-drain risk before a transaction.","exampleAgentPrompt":"Before I interact with this Uniswap router contract, check the ERC20 allowance and approval risk for owner 0xAbc...123, spender 0xDef...456, token 0x6B17...A1 on Ethereum — specifically flag if it's an unlimited approval that could drain my funds.","exampleUseCases":null,"resultDescription":"Returns the numeric allowance the owner has granted to the spender for the specified ERC20 token, a boolean or flag indicating whether the approval is unlimited (max uint256), and a risk assessment indicating whether the spender could potentially drain the owner's token balance.","failureModes":["Invalid or non-existent token contract address returns an error","Unsupported chain/network returns a chain-not-supported error","Malformed wallet address (wrong checksum or length) returns a validation error","RPC node unavailability may cause a timeout or upstream error","Zero allowance returned when no approval has been granted (not an error, but may be misinterpreted)"],"whenToPreferThis":"Use this endpoint when an AI agent needs to perform a pre-transaction safety check on ERC20 token approvals — specifically to detect unlimited approvals that expose a wallet to full-balance drain risk. Prefer this over generic blockchain explorers when you need a structured, machine-readable risk flag rather than raw on-chain data, and when the agent needs to decide whether to recommend revoking an approval before proceeding with a DeFi interaction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T12:48:40.808Z","isFirstParty":false}