Cryptopedia
A 51 percent Attack
A 51% attack on a blockchain refers to a miner or a group of miners trying to control more than 50% of a network’s mining power, aiming to modify the ordering of transactions.
How to Launch a 51% Attack:
Blockchain applications, such as Bitcoin, are decentralized based on a distributed ledger. In this way, these applications are secure and trustless. In a blockchain network, data will be recorded after being validated by most nodes. Mining nodes will also take an active part in confirming whether data from other nodes complies with the blockchain protocol so that the transaction data are genuine and reliable.
With the proof-of-work algorithm, great computational power is required in order to gain the power to validate blocks. Nodes with stronger computational power are easier to gain the power. The whole blockchain network will be dominated by a node with more than 51% of the computing power on the network. As a result, the node can control the recording and validation of all data in the network.
After successfully launching a 51% attack, the attacker can modify his transaction record, which will lead to double-spending. Normally, after a miner mines a block, the block will be broadcasted to other miners and they will validate if all the transaction data in the block is valid. The validated block will be added to the blockchain. However, the attacker can choose to create an offspring of the blockchain by not broadcasting the mined block to the rest of the network. Therefore, the offspring is unknown to other honest miners. The digital assets spent by the attacker in the truthful blockchain will not be recorded in the offspring, which means attackers could spend those assets again.
With the strongest hash power, the attacker is able to create the longest chain. As the blockchain is designed to follow the longest chain, miners will add new blocks to the longest chain. Other versions of the chain will be abandoned. This is how the transaction data of the attacker are modified. Moreover, the attacker is also able to interrupt the recording of new blocks by preventing other miners from completing blocks and confirming transactions. As a result, the operation of the blockchain network is under huge threat. The price of the coin in the blockchain will plunge since the blockchain can no longer win trust from nodes.
How to Prevent a 51% Attack:
Every node has a private key to protect its digital assets, such as Bitcoin. The private key is needed to create a digital signature for transactions. This means that the hacker can not transit other’s Bitcoins to his account without their private keys. Other’s transaction data are irreversible for him. Therefore, with more than 51% computing power, the hacker can only be benefited from double-spending by modifying his transaction record. According to the Bitcoin white paper, published by Satoshi Nakamoto, it costs huge electricity power and a huge amount of money to purchase devices for launching a 51% attack. So being a hacker is costlier than being an honest mining node.
For the sake of personal interests, a 51% attack hardly occurs as every node wants to maintain the value of its digital assets, safeguarding the blockchain network. For instance, in 2014, the Bitcoin community was abuzz with news that GHash, a Bitcoin mining pool, controlled more than 51% of Bitcoin’s computing power. Therefore, to protect the Bitcoin’s blockchain, GHash committed to 39.99% hashrate cap.
Conclusion:
In conclusion, a 51% attack barely occurs although it can take a heavy toll on the blockchain network. Moreover, it is highly impossible to launch a 51% attack on a developed blockchain with a more complete consensus mechanism and greater protection from nodes.
How to Launch a 51% Attack:
Blockchain applications, such as Bitcoin, are decentralized based on a distributed ledger. In this way, these applications are secure and trustless. In a blockchain network, data will be recorded after being validated by most nodes. Mining nodes will also take an active part in confirming whether data from other nodes complies with the blockchain protocol so that the transaction data are genuine and reliable.
With the proof-of-work algorithm, great computational power is required in order to gain the power to validate blocks. Nodes with stronger computational power are easier to gain the power. The whole blockchain network will be dominated by a node with more than 51% of the computing power on the network. As a result, the node can control the recording and validation of all data in the network.
After successfully launching a 51% attack, the attacker can modify his transaction record, which will lead to double-spending. Normally, after a miner mines a block, the block will be broadcasted to other miners and they will validate if all the transaction data in the block is valid. The validated block will be added to the blockchain. However, the attacker can choose to create an offspring of the blockchain by not broadcasting the mined block to the rest of the network. Therefore, the offspring is unknown to other honest miners. The digital assets spent by the attacker in the truthful blockchain will not be recorded in the offspring, which means attackers could spend those assets again.
With the strongest hash power, the attacker is able to create the longest chain. As the blockchain is designed to follow the longest chain, miners will add new blocks to the longest chain. Other versions of the chain will be abandoned. This is how the transaction data of the attacker are modified. Moreover, the attacker is also able to interrupt the recording of new blocks by preventing other miners from completing blocks and confirming transactions. As a result, the operation of the blockchain network is under huge threat. The price of the coin in the blockchain will plunge since the blockchain can no longer win trust from nodes.
How to Prevent a 51% Attack:
Every node has a private key to protect its digital assets, such as Bitcoin. The private key is needed to create a digital signature for transactions. This means that the hacker can not transit other’s Bitcoins to his account without their private keys. Other’s transaction data are irreversible for him. Therefore, with more than 51% computing power, the hacker can only be benefited from double-spending by modifying his transaction record. According to the Bitcoin white paper, published by Satoshi Nakamoto, it costs huge electricity power and a huge amount of money to purchase devices for launching a 51% attack. So being a hacker is costlier than being an honest mining node.
For the sake of personal interests, a 51% attack hardly occurs as every node wants to maintain the value of its digital assets, safeguarding the blockchain network. For instance, in 2014, the Bitcoin community was abuzz with news that GHash, a Bitcoin mining pool, controlled more than 51% of Bitcoin’s computing power. Therefore, to protect the Bitcoin’s blockchain, GHash committed to 39.99% hashrate cap.
Conclusion:
In conclusion, a 51% attack barely occurs although it can take a heavy toll on the blockchain network. Moreover, it is highly impossible to launch a 51% attack on a developed blockchain with a more complete consensus mechanism and greater protection from nodes.