approval_risk
Assess an ERC-20 approval's risk on Base: checks live allowance, flags unlimited approvals, and verifies if spender is a contract to prevent allowance-drain scams.
Instructions
Assess the risk of an existing ERC-20 approval on Base BEFORE it can be abused: reads the live allowance an owner has granted a spender, flags UNLIMITED approvals (the allowance-drain vector — a compromised or malicious spender can pull up to the allowance), and reports whether the spender is a contract. Unlimited allowance to an EOA is a classic scam setup. Use before signing an approval, or to audit standing approvals.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | The wallet that granted the approval | |
| token | Yes | The ERC-20 token address | |
| spender | Yes | The address allowed to spend (router, contract, or EOA) |