In Chapter 1, Introduction to Blockchain, we discussed how, on the Ethereum blockchain, once a Solidity smart contract is deployed, it cannot be changed. Because smart contracts are immutable, only the states of the variables can be changed by an authorized person. We also discussed how, because of the immutability of contract code, it is very important to not have any bugs left in contract code, since this could cause issues later, once the code is deployed to production.
Because of the immutability of contracts, there have been many attacks happened in the past on smart contracts. Once an attacker identifies bugs in contracts with funds, they exploit the bugs and vulnerabilities present in the contract and steal the funds. One famous hack was the Parity MultiSig hack, in which an attacker was able to become the owner of the contract and steal...