In this chapter, we have analyzed some of the most common vulnerabilities affecting smart contracts. We have understood how the bugs present in the source code can have disastrous consequences on smart contracts, such as the ones experienced with the famous DAO and Parity wallet attacks. Preventing the onset of bugs within source code is, therefore, of fundamental importance. To this end, specialized libraries such as OpenZeppelin can be used in the development phase of smart contracts. Equally important is to conduct a vulnerability analysis using specialized tools such as Mythril and Securify, which help the developer in both the implementation and testing phases of smart contracts.
After having widely analyzed the vulnerabilities of DApps and smart contracts, in the next chapter, we will discover how it is possible to exploit the blockchain as an attack vector.
...