Skip to content
high Logic / State No SWC entry CWE-682

Incorrect Accounting / Internal Balance Drift

SAFE-0071 Logic / State Checked automatically by the scanner
1

What goes wrong

Internal balance tracking diverges from real token holdings due to missed updates on edge paths (fees, donations, partial fills), letting some users over-withdraw at others' expense.

2

How to fix it

the pattern that is safe
// Credit exactly what is received/owed; centralize accounting in one internal fn
Centralize and test accounting invariants.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0071 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