Lesson 4: How To Secure Your Smart Contracts
Ethereum Development 101: Lesson 4: Securing your smart contracts against Reentrancy and Owner Theft attacks
Prerequisite: This article is part of Ethereum Development 101, a course designed to teach the basic concepts of developing, testing and deploying smart contracts on the Ethereum network.
Learning aims: By the end of this lesson, you should be able to understand Reentrancy and Owner theft vulnerabilities in Solidity smart contracts. You should be able to write code that guards against these vulnerabilities.
Overview
Tunnel vision, a pitfall that every developer has experienced. When developing new code for a specific purpose, it’s easy to become so focussed on solving a particular problem that we miss something important.
This is especially true when transitioning from one technology to another. For example: If you come from a background in javascript, it’s unlikely you’d have much concern for overflow exploitation, yet in Solidity, it needs to be addressed.
We’re going to go through some weaknesses that are inherent in Solidity: Reentrancy Hacks and Owner Logic Theft.