What is a 51% attack and how it affects the hashrate of a blockchain?
What is a 51% attack and how it affects the hashrate of a blockchain?

What is a 51% attack and how it affects the hashrate of a blockchain?

By Emanuele Pagliari - 14 Sep 2019

Chevron down

Often when we talk about cryptocurrencies and blockchains, we often refer to a particular cyber attack attempt called a 51% attack. Several times in the past, attacks of this type have been recorded on some altcoins, due to the fact that the hashrate of these secondary coins is often much lower than that of cryptocurrencies such as bitcoin, ethereum and many others, due to the low spread and interest on the part of the miners.

When such an attack occurs, the perpetrators obtain control over most of the network hashrate, and can thus carry out fraudulent operations.

How does a 51% attack on a cryptocurrency take place?

A 51% attack occurs when the attacking party, usually a large number of miners, has control over a large part of the network’s hashing power. As a result, the concept of a decentralised network fails.

The reason for this is that at least 51% of the network is under the control of the same group of miners, for instance, the same pool. As a result, the miners will be able to propagate on the blockchain forged blocks containing fraudulent operations. These blocks, being verified by the majority of the network due to the control of the hashing power, are therefore validated, causing unimaginable loss of funds and damages.

All the cryptocurrencies use the concept of distributed ledgers to make the system trustless and avoid that a single central body can control the transactions and the network. The ledger, or blockchain, is distributed over a number of nodes, including the masternodes.

However, the blockchain is created by the miners, who collect transactions from the network, validate them and seal them in the blocks of the chain. They obviously receive remuneration for this operation, which is derived from the block reward and network commission fees.

In a network that uses the PoW (Proof-of-Work) consensus algorithm, in order to add a new block, miners must solve a series of cryptographic problems to prove that they have carried out the task.

The first miner to find the right solution has the chance to create a new block and receive the reward: the greater the computational power available to the miner, the greater the chances of finding the right solution more quickly than the others, and therefore of obtaining a reward.

When the miner finds the correct solution, it is propagated to the network participants, who after a verification, add the new validated block to the blockchain.

The consequences of controlling the network

After this overview of mining, it emerges that the key requirement to carry out a 51% attack is to possess the majority of the network’s mining power, so as to gain control of it.

If the miner or mining pool controls more than half of the total hashrate, that means they have the ability to completely control the network. They can then add new blocks, manipulate bi-directional operations and refuse to confirm new transactions.

In addition, the 51% attack can allow malicious people to double-spend the same currency several times. An operation that absolutely should not occur with a cryptocurrency, as it would make it practically unusable. However, the attacking party cannot modify the information in the blocks already created or generate new coins.

It is worth noting that cryptocurrencies whose consensus algorithm is based on PoS (Proof-of-Stake) are unlikely to be subject to 51% attacks

In fact, using the PoS algorithm, validators contribute to maintaining the network’s operational capabilities based on the amount of cryptocurrency they hold (stake)

The computing power is not taken into account. Consequently, any attempt to attack this system becomes unprofitable.

In most cases, these types of attacks are performed on the newest cryptocurrencies, since there is no need to possess extremely high mining capabilities. To date, in fact, to perform a 51% attack on the Bitcoin and Ethereum blockchains, it would require too many resources, making it inconvenient and therefore virtually impossible.

Some cases of 51% attacks

In July 2014, the mining pool Ghash.io had gained control of 55% of the bitcoin hashrate. However, the pool, having realised the threat, voluntarily reduced its mining power to bring the control threshold below 40%.

In August 2016, the Krypton and Shift blockchains suffered a 51% attack. A group of hackers, known as 51 crew, claimed responsibility for the attacks. Following the attacks, the fraudsters managed to double-spend the cryptocurrency and steal 22,000 coins from both networks.

In April 2018, the Verge cryptocurrency suffered several 51% attacks, due to a bug in the Verge blockchain and not to the control of the hashing power itself. This bug allowed hackers to create new blocks every second, instead of the 30 seconds dictated by the specifications.

This was made possible by the fact that the Verge blockchain supports several algorithms, but all of them must be changed with each new block. The attackers have thus created blocks with the Scrypt algorithm with a fake timestamp. The network then accepted these blocks, assuming that they had been generated an hour earlier.

The scammers managed to seize hundreds of thousands of XVG tokens. Fortunately, the team reacted to the hackers by carrying out an emergency fork and burning the stolen tokens.

Emanuele Pagliari

Telecommunications engineer with a strong passion for technology. His adventure in the world of blogging started on GizChina.it in 2014 and then continued on LFFL.org and GizBlog.it. Emanuele is in the world of cryptocurrency as a miner since 2013 and today he follows the technical aspects related to blockchain, cryptography and dApp, also for applications in the Internet of Things.

We use cookies to make sure you can have the best experience on our site. If you continue to use this site we will assume that you are happy with it.