The DAO
The Decentralized Autonomous Organization (DAO), started in April 2016, was a smart contract written to provide a platform for investment. Due to a bug in the code, called the reentrancy bug, it was hacked in June 2016. An equivalent of approximately 3.6 million ether was siphoned out of the DAO into another account.
Even though the term “hacked” is used here, it was not really hacked. The smart contract did what it was asked to do but due to its vulnerabilities, the attacker was able to exploit it. It can be seen as an unintentional behavior (a bug) that the programmers of the DAO did not foresee. This incident resulted in a hard fork on the Ethereum blockchain, which was introduced to recover from the attack.
The DAO attack exploited a vulnerability (reentrancy bug) in the DAO code where it was possible to withdraw tokens from the DAO smart contract repeatedly before giving the DAO contract a chance to update its internal state, indicating how many...