{"uid":"cap_Ll_QkWMKIbt72lLh5WogL","slug":"allowanceguard-erc-20-nft-permit2-allowance-risk-check-e14b4264","name":"AllowanceGuard – ERC-20/NFT/Permit2 Allowance Risk Check","description":"Decide whether to grant an ERC-20, NFT or Permit2 allowance before signing it. Send owner, token, spender and amount, or the unsigned approve, setApprovalForAll or Permit2 calldata. Returns allow, warn, block or unknown with the allowance already on chain, the requested scope and the rule behind it, whether this raises or lowers exposure, and whether the spender is a contract, upgradeable or denylisted. Returns unknown rather than guessing. Not a guarantee a spender is honest.","url":"https://allowance.schemasure.com/v1/guard/allowance?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"approval":{"type":"object","required":["owner","token","spender","amount"],"properties":{"kind":{"enum":["erc20","increase","decrease","approval_for_all","permit2","eip2612"],"type":"string","default":"erc20","description":"increase and decrease are relative to the allowance already on chain, so their direction is known even when that allowance cannot be read."},"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The account whose balance the spender would be able to move."},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The token or NFT collection. For a Permit2 grant this is still the token."},"amount":{"type":"string","pattern":"^(?:[0-9]+|0x[0-9a-fA-F]+|all)$","examples":["1000000","all","0"],"description":"Base units, not a human amount: 1 USDC is \"1000000\". Use \"all\" only with kind approval_for_all, and \"0\" to revoke."},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"expiration":{"type":"string","description":"Unix seconds. Permit2 only: a plain ERC-20 allowance never expires, so declaring one on any other kind is rejected."}},"description":"The grant you are about to make, described directly.","additionalProperties":false},"calldata":{"type":"object","required":["from","to","data"],"properties":{"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The token, or Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3) for a Permit2 grant."},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]{8,}$","description":"approve, increaseAllowance, decreaseAllowance, setApprovalForAll, an EIP-2612 permit, or either Permit2 form. Anything else is rejected as UNSUPPORTED and not charged."},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"description":"The unsigned call you are about to sign. Decodes 7 approval functions.","additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8pnipCf4X-zbYu4v8cvFb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Evaluates an ERC-20, NFT, or Permit2 allowance request before signing, returning allow/warn/block/unknown with on-chain context, scope, and spender contract details.","exampleAgentPrompt":"Before I sign this approve transaction, check whether it's safe — the owner is 0xAbCd...1234, the token is USDC at 0xA0b8...EB48, the spender is 0xDef0...5678, and the amount is 1000000 (1 USDC). Tell me if the spender is denylisted, upgradeable, and whether this raises my exposure.","exampleUseCases":[{"title":"Pre-sign DeFi protocol approval check","prompt":"I'm about to approve a DEX to spend my USDC — owner is 0xAbCd...1234, token is 0xA0b8...EB48, spender is 0xDef0...5678, amount is 1000000000. Tell me if it's safe, whether this spender is a known contract, and whether my exposure goes up."},{"title":"NFT collection setApprovalForAll safety review","prompt":"I need to setApprovalForAll on my NFT collection at 0xBC4C...cA00 for spender 0x1E0A...7f9B from my wallet 0xAbCd...1234. Is this spender safe to grant full collection access to — is it denylisted or upgradeable?"},{"title":"Unsigned approve calldata validation before wallet signing","prompt":"My wallet is about to sign this raw calldata: 0x095ea7b3...deadbeef, sent from 0xAbCd...1234 to the USDC contract 0xA0b8...EB48. Can you decode it and tell me whether I should allow, warn, or block this approval?"}],"resultDescription":"Returns a decision field (allow, warn, block, or unknown), the allowance already on chain, the requested scope, the rule that triggered the decision, a flag indicating whether this raises or lowers exposure, and spender metadata including whether it is a contract, upgradeable, or present on a denylist. Returns 'unknown' instead of guessing when data is insufficient.","failureModes":["Missing required fields (owner, token, spender, amount) returns a validation error","Calldata that is not one of the 7 supported approval functions returns UNSUPPORTED and is not charged","Declaring an expiration on a non-Permit2 approval kind returns a rejection","Malformed Ethereum addresses (not matching 0x hex pattern) return a parse error","Using 'all' for amount on a non-approval_for_all kind is rejected","On-chain allowance unreadable due to RPC issues may result in an 'unknown' decision"],"whenToPreferThis":"Choose AllowanceGuard when an AI agent or wallet UI needs a structured, rule-backed risk verdict on a token or NFT allowance before a user signs it — especially when you need on-chain state (current allowance), contract metadata (upgradeable, denylisted), and exposure direction in a single call. Prefer this over generic contract scanners when you have structured approval parameters or raw unsigned calldata and need a binary/graded decision rather than a narrative audit.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T18:35:21.389Z","isFirstParty":false,"canonicalSlug":"allowanceguard-erc-20-nft-permit2-allowance-risk-check-e14b4264"}