Skip to content
medium Input Validation No SWC entry CWE-20

Missing Input Validation / Parameter Bounds

SAFE-0073 Input Validation Checked automatically by the scanner
1

What goes wrong

User-supplied parameters (fees, ratios, durations, amounts) are used without sanity bounds, enabling extreme/abusive values (e.g. 100% fee, zero duration) that break invariants.

2

How to fix it

the pattern that is safe
function setFeeBps(uint b) external onlyOwner { require(b <= 1000, "max 10%"); feeBps=b; }
Bound all configurable parameters.
Check your own contract for this

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