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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"owner": "<owner>",
"token": "<token>",
"spender": "<spender>"
},
"name": "approval_risk"
}
}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) |