ERC-20 Approval Risks: The Infinite-Approval Footgun Explained

Most DeFi exploits start with an ERC-20 approval the user did not realise they signed. Here is exactly how approvals work and how to manage them safely.

ERC-20 approvals are the single most exploited surface in DeFi. A wallet approves a contract to spend its tokens — often for an unlimited amount — and that approval persists indefinitely. Six months later, the contract is exploited or compromised, and the attacker uses the standing approval to drain every wallet that ever interacted with it. Understanding approvals is the highest-leverage skill a self-custody user can develop.

How Approval Works

Why Infinite Approvals Are Default

Wallet UIs default to infinite approvals (uint256.max) because re-approving on every swap costs gas and adds friction. The trade-off is that a single infinite approval is a permanent 'this contract can drain my entire balance of this token' authorisation. If the contract is exploited later, the attacker walks away with everything you authorised — even if you have not interacted with that contract for years.

What Goes Wrong

The Three Defensive Practices

How Steyble Handles This

Steyble's swap router uses Permit2 with bounded amounts and time windows by default — the user authorises only the specific swap, with an expiry, and no standing approval persists after the trade. The wallet UI shows live standing approvals across every supported chain in one screen, with one-tap revoke. The result is that the typical Steyble user does not accumulate the long-tail approval debt that powers the modern drainer industry.