In this chapter, we covered best practices such as avoiding floating pragma, the commit-reveal scheme, using external function calls, and integer rounding errors. Additionally, we discussed attack patterns such as front-running, reentrancy, signature replay attacks, and integer overflow and underflow attacks. These are the most important things to know, as writing contracts in Solidity can be easy, but writing a bulletproof contract is hard.
There have been many hacks, and we have covered some of the most well-known ones, but it's the developer's responsibility to keep checking for newly identified attack patterns, so that they do not make the same mistakes again while writing contracts. Apart from that, always use the latest versions of the libraries. The Solidity compiler does fix the issues in the new versions; keep yourself up to date with the latest...