Common Smart Contract Bugs

Smart contracts hold real value and cant be patched casually once deployed, so a small mistake could be expensiive.

A cartoon bug labelled reentrancy ahead

Bugs I look for first

My simple audit routine

  1. Read the docs and work out what the contract is meant to do.
  2. Run a static analyzer and note anything odd.
  3. Read every external and public function by hand.
  4. Write tests that try to break the rules.
  5. Write up findings with a clear fix for each one.

More detail on each class is in the SWC Registry.