~/talk

Solidity Best Practices - 10 Tips

Talkat ETHOnline 2022 DevTools Summit · on Saturday, 2022-09-03· [web3, security]
slides:none on file

Ten concrete Solidity rules: lock compiler to 0.8.13 so verification and known-bug checks work; do math as multiply before you divide (use 1e18-style multipliers to avoid rounding to zero); avoid local vars named the same as state; keep contracts minimal and split view/logic; favor security over clever gas tricks; ban unbounded loops or paginate them; never trust user-supplied contract addresses (malicious transferFrom); follow checks→effects→interactions and add a reentrancy guard; prefer pull payments over push.

AI-written summary · about

  1. 0:00Introduction
  2. 0:37Compiler version locking
  3. 2:01Safe arithmetic operations
  4. 5:08Variable naming conventions
  5. 7:47Simplifying contract design
  6. 11:35Prioritizing security
  7. 12:55Managing unbounded loops
  8. 17:19Securing user inputs
  9. 19:02Checks-effects-interaction
  10. 20:50Reentrancy guards
  11. 23:24Pull over push payments
  12. 26:26Q&A and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.