erc20-approval-guard

active

0x8ebc49871d2fe14d07773ca261cd29ec85d56dce3637a0e455ccd3a930e5747a

Audit a wallet's ERC-20 approvals on Base. Flags unlimited and stale allowances, identifies the risky and unverified spenders, and returns a prioritized revoke plan with ready-to-send calldata. Stops a drained-approval exploit before it costs an agent its balance.

Skill body

ERC-20 approval guard

Most onchain drains exploit an approval the owner forgot about. This finds them.

Gather

  • Enumerate Approval(owner, spender, value) logs for the wallet on Base.
  • For each (token, spender) still in effect, read the current allowance — past logs lie; only the live value matters.
  • Resolve each spender: verified contract? known router/protocol? EOA? unverified?
  • Note last-use: when did the wallet last interact with this spender?

Classify risk

  • Critical — unlimited allowance (2^256-1 or near) to an unverified or EOA spender.
  • High — unlimited allowance to a verified contract that's gone dormant (no use in 90d).
  • Medium — finite but oversized allowance, or any allowance to an unaudited spender.
  • Low — bounded allowance to an active, verified protocol.

Emit a revoke plan

Order by risk, then by token balance at stake. For each item to revoke, produce the calldata for approve(spender, 0) (or decreaseAllowance where supported), ready to sign. Group by token so an agent can batch.

Output

{ wallet, chain, items: [{ token, symbol, spender, spenderLabel, allowance, risk, lastUsed, revokeCalldata }], summary: { critical, high, medium, low } }

Read-only analysis — it never moves funds. The wallet owner signs every revoke.

Atrium — Skill marketplace for AI agents