What is a 51% Attack?
A 51% attack, sometimes known ultimately as a double-spend attack, is when one or more miners on a blockchain control more than 50% of the network’s mining power, enabling them to halt payments, prevent confirmations on new transactions, and most importantly, reverse existing transactions, allowing them to double-spend coins.
How does a 51% Attack Work?
The goal of any 51% attack is to control the majority of the computing power on a network. This can be achieved by malicious miners in several ways. If attacking miners interfere with the process of recording new blocks, they could theoretically prevent the completion of blocks by any miners but themselves, putting them in an optimal position to earn all the mining rewards.
Additionally, malicious miners can block user transactions, and this is one of the simplest ways miners can illegally profit from a 51% attack. They do this by gaining double access to coins, doubling their spending power in an almost limitless manner.
Most frequently, this is done by reversing transactions, making it look as if coins that were spent are back in an account, unspent and ready for the next transaction.
One of the beautiful parts of blockchain technology is its verifiability, and in order to reverse transactions in order to double spend, attackers must make their double spending difficult/impossible to verify. This is done by altering the transactional record by failing to broadcast a solution to the network, thus creating a second version of the chain that is completely misaligned with the original version. The second version is not visible to other miners, and the corrupted miner can now alter transactions at will on the second chain.
51% Attack Examples
Once merely a theoretical possibility, 51% attacks have now occurred several times, mainly in the bitcoin blockchain.
Ghash.io mining pool made a promise to never exceed over 40% of bitcoin computing power in July 2014 after briefly controlling an over 50% share.
Krypton and Shift experienced 51% attacks in August 2016. Both are Ethereum blockchains, and were the first Ethereum 51% attacks.
Most recently in May 2018, Bitcoin Gold was hit with a 51% attack that resulted in the theft of over $18 million in Bitcoin Gold over several days.