Security for Smart Contract Developers
Smart contract security is the study of how contracts get exploited and how to prevent it. Common issues include reentrancy, broken access control, oracle and price manipulation, front-running and unchecked external calls. Because contracts hold value and are immutable once deployed, defence combines careful design, tests, static analysis tools and independent audits.
Stage: Testing and Security · Part of the Smart Contract Developer roadmap · Last reviewed 19 November 2026
What to learn in Security
- Describe how a reentrancy attack drains funds and how to block it
- Spot missing access control on privileged functions
- Explain front-running and the role of slippage limits and commit-reveal
- Run a static analyser such as Slither and triage its findings
- Reason about oracle manipulation and why spot prices are unsafe inputs
Security interview questions
How does a reentrancy attack work?
A contract sends ether or calls an external contract before updating its own state. The attacker's code re-enters the vulnerable function while the balance is still unchanged and withdraws repeatedly. Fixes include updating state first and using a reentrancy guard.
Why is tx.origin unsafe for authorisation?
tx.origin is the original external account that started the transaction, so a malicious contract that a user is tricked into calling can pass the check as that user. Using msg.sender checks the immediate caller and avoids this phishing route.
Where Security fits in the Smart Contract Developer roadmap
Security belongs to the Testing and Security stage (advanced level). Ship safely.
Other units in this stage
Back to the full Smart Contract Developer roadmap