Block values as a time proxy
Logic depends on block.timestamp at a resolution block producers can influence.
What it is
Block producers have limited but real latitude over the timestamp they publish, and block times vary. Using block.timestamp for coarse deadlines is fine; using it for fine-grained ordering or short windows is not. block.number is worse, because block time is not constant across chains or over time.
Why it matters
Auctions that close on a second boundary, rewards that accrue per block, or cooldowns measured in a handful of seconds can all be nudged in the producer’s favour.
How to fix it
- Use block.timestamp only where a drift of several seconds does not change the outcome.
- Do not use block.number as a clock — block times differ by chain and change over time.
- For anything adversarial and short-window, require an explicit second transaction rather than a timing check.
How it is detected
Every audit on EVM Smart Audit checks for SWC-116 and reports it as passed or flagged in the standards coverage grid — so the report tells you it was checked even when nothing was found. See the detector suite for what else runs alongside it, or the full database for the other 21 checks.
Check your contract for block values as a time proxy
The engine runs this check and 21 others on every audit, and shows what passed as well as what failed.