Skip to content
low Token Standards No SWC entry CWE-459

Approval / Allowance Not Reset After Use

SAFE-0090 Token Standards Checked automatically by the scanner
1

What goes wrong

The contract grants an allowance to an external spender and never resets it, leaving a standing approval that a later-compromised spender can drain.

2

How to fix it

the pattern that is safe
token.safeIncreaseAllowance(router, amt);
// ... after use:
token.safeDecreaseAllowance(router, token.allowance(address(this), router));
Scope and reset external allowances.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0090 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs