Blockchain: smart contract security
Vulnerability categories
Insecure access control
Logic that fails to restrict who can call privileged functions (e.g. a missing onlyOwner check)
Reentrancy
A contract calls an external contract before updating its own state, letting the callee re-enter and drain funds (the classic DAO hack)
Oracle manipulation
Contracts trust external data feeds; manipulating the feed (e.g. a faked price) breaks the contract’s assumptions
Frontrunning
Pending transactions sit in the mempool, so bots and miners can observe and reorder them (e.g. buying before a known large trade)
Timestamp dependence
Logic relying on block.timestamp, which miners can influence within a window
Insecure arithmetic
Integer overflows and underflows (unchecked arithmetic) producing unexpected balances
Denial of service
Unexpected reverts or exhausting the block gas limit make a contract unusable
Force feeding
Forcing Ether into a contract (e.g. via selfdestruct or coinbase) to break balance-dependent logic
Tools
Resources
- Smart contract security
- Blocksec CTFs
- Crash course on smart contract auditing
- But how does Bitcoin actually work? (3Blue1Brown)
- The bZx attacks explained
- Consensys Diligence: Smart contract attacks
- Consensys Diligence: Security tools
- Solidity docs
- samczsun’s writeups
- rekt.news
- Trail of Bits: Publications