Skip to content

Dead Code / Unreachable or Unused Critical Variable

SAFE-0077 Best Practice Checked automatically by the scanner
1

What goes wrong

Unused variables, unreachable branches, or commented-out guards indicate incomplete logic; a 'critical' variable that is set but never enforced can mean a missing security check.

2

How to fix it

the pattern that is safe
modifier whenNotPaused(){ require(!paused, "paused"); _; }
// apply to the functions that must respect pause
Enforce or remove unused critical state.
3

Where this has happened

Largest recorded losses in the same failure class — related, not the same bug:

Check your own contract for this

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