As with all new things in the tech industry, there are going to be bugs. Hence, there’s a reason for a Beta phase. Remember when the world demanded the hoverboards that the Back to the Future franchise promised? Suddenly companies that were quietly tinkering away in their factories on these hoverboards finally released them… and perhaps a little too soon. The hoverboards ran into complications and they were exploding or catching on fire.
Complications are simply happenstance, so we should all have a seat and take a deep breath. Here’s a recap of the recent exploitation of the DAO and what’s going on with it now.
First thing’s first. What is The DAO? To clarify, The DAO is actually the first Ethereum blockchain decentralized autonomous organization ever created. Its creation, a 28 day period, ended on May 28th 2016 and as of June 2016, is the highest ever crowdfunded project in the world.
DAOs are mainly a crowdfunding vehicle that works through the Ethereum decentralized system and are governed by participants who vote to seek out and fund different proposals within each sector (example: the housing market for one). Since the DAO is made up of computer code, it has to interact with our physical world in the form of the contractors. Contractors are basically creators/curators of these proposals, and the DAO is the client.
DAOs can be established with the goal of raising or investing and managing those funds raised. For example, if a group wants to develop a specific idea or range of ideas within the world of the housing market, they may join together to create a DAO. Participants and investors “invest” their funds from their own Ether holdings (or purchase Ether with fiat), then in exchange for Ether, tokens are created which represent membership as well as the ownership of a portion of the DAO. These tokens are assigned to the account that sent the Ether. Tokens can be moved to other accounts by the owner and the DAO purely manages funds that exist only in Ether. The DAO also does not build products, write code, or develop hardware itself- it relies on the contractors to accomplish these goals. Contractors are hired when proposals to the DAO are approved. The exchange between a token and Ether is exact and equal: one Ether for a token.
Problem is (and in reference to the opening paragraph) new tech can incur bugs. The DAO had a flaw to its “send” code. Smart contract programmers have been warned about the hazards that can occur when contracts send messages to each other- especially when it’s in the form of funds. To have a contract send Ether to an address, the most straight-forward way is to use the “send” keyword. And on Friday, June 17th, an attacker exploited this function (to summarize) by being able to use the same DAO tokens repeatedly to pull Ether into a split DAO account. This action drained 3,641,694 ETH. Remember in the Nintendo basketball game Double Dribble, you were able to stand in a corner and flawlessly sink the ball in the hoop every time? In less technical terms, this was the case with the attacker.
The attacker didn’t stop this drain until Vitalik Buterin published a blog post on the attack and brought up the possibility of a soft and hard fork to address the issue.
Then Tuesday morning around 10 am (PST), a new attack was slowly draining a few Ether per round but was already slowly amassing thousands of dollars. Lead designer of the Ethereum Foundation, Alex Van de Sande and a group of developers that so aptly refer to themselves as the “Robin Hood” group, joined together to counter this new attack. This is commonly referred to as the “White Hat Attack”. The Robin Hood group found the curator of a proposal (that would adequately execute their counter “attack”) and began using the very similar method, as the attacker’s, to drain the Ether funds into this split proposal (otherwise known as a child DAO) so the original perpetrator would not be able to continue draining funds. It was almost like a race between two bank robbers- except one of those bank robbers was stealing money to protect it from the real thief. Hence, the “White Hat Hacker” terminology.
Nomenclatures aside, 7.2 million ETH was recovered and put into a child DAO where the Robin Hood group holds the private keys of the curator (ex. they hold the key to the safety deposit box). These child DAOs get their name from the fact that it takes a DAO 27 days to “mature” or rather, 27 days till you can access the funds and transfer them into fiat currency. Therefore, the attacker doesn’t necessarily have all the funds in fiat currency… not yet. And yes, the attacker could continue to use this same coding “loophole” to attack the DAO again. This is where the proposals for the soft and hard fork come in.
The soft fork is a new contract implementation that stops all transactions that will reduce the balance of any contract that runs the code of the DAO. This also means that it will affect the DAO itself and all the split proposals (which includes the malicious DAO or, aka the Dark DAO). Yet, the two exceptions to this rule will be the curator of the contract and the contract that’s created to execute the counterattack.
With a soft fork within the Ethereum blockchain, it means that a block that used to be valid in the blockchain is no longer valid. With a hard fork, it makes a block valid that wasn’t valid before. While this seems simple- with the case of a soft fork, only the miners have to update their software and not the wallet users. With the case of the hard fork- everyone utilizing Ethereum and Ether will have to update their software because someone may accept Ether from the old chain thinking they have been paid, but with this new hard fork chain, they really have not. Software updates can be lengthy and there’s again, the chance of bugs. As of now, users are voting on the soft fork and the voting is done via gas limit. If at block 1,800,000 the gas limit is below 4,000,000 then the soft fork will be automatically activated- and the gas limit will return to its usual 4,700,000 limit.
If the soft fork is activated, two actions can occur: Miners will take to split proposals and recursive attacks to get the stolen Ether back, or the hard fork could be activated which directly restores all stolen Ether. But again, the hard fork changes the blockchain completely.
If no action is taken, white and black hat hackers will enact their own attacks and counter attacks upon each other, resulting in frozen funds and no one ever getting their funds back. Mainstream news will take to the headlines and present it as possibly the biggest blunder in internet technology… That just might be stretching it, but it simply would not be good for the Ethereum community as a whole.