51% Attack in Blockchain Systems

Rusiru Abhisheak
4 min readFeb 25, 2021

Hello friends, I’m Rusiru Abhisheak, and in this post, I write what is the 51% attack, how it actually works and what are things that attacker can do if they execute the 51% attack in the blockchain system.

The 51% 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, computing power or hashing power.

What does it really mean if a person in a blockchain system has 51% hashing power?

It means that the person who has 51% hashing power can mine faster than the rest of the miners in the network.

Think there is a competition between a person namely Andrew and the rest of the miners in the network. The ultimate goal of all the miners is creating and merging many blocks to the blockchain network in the shortest amount of time. But in this case, Andrew has 51% of hashing power in the blockchain network. Who will win in this competition? Andrew will win because he has a majority of the hashing power in the network.

Imagine if Andrew can win in this competition, what are the things that Andrew can do in the blockchain network. He can do lots of things if he gets majority hashing power. Andrew can take the control of the blockchain network if he wants and also he can do double spending in the blockchain network.

How a person who has 51% hashing power can do double spending?

Usually, what happened is, bitcoin miners, create new blocks and introduce that to the blockchain network and then they can get their bitcoin reward. But, if a person has 51% hashing power, they can mine their own blocks without introducing them into the public blockchain network. This is also known as private mining. In this case, the person who has 51% hashing power starts mining and create his blockchain privately. Meanwhile, he spends his bitcoins on the public blockchain network. For instance, he can spend his bitcoins to buy a new car or buy a house or purchase both of them together. However because he mining his version of blockchain privately and he is mining faster than the rest of the miners, he can build a blockchain that is longer than the public blockchain network. But in that private blockchain, he not includes the transactions which he spends on the public blockchain network. Even though he did not include those transactions in the private blockchain, they are still on the public blockchain.

The person who has 51% hashing power can mine faster then the rest of the miners in the blockchain network, which means after a couple of blocks his private blockchain will become longer than the public blockchain. Then he introduces his private blockchain to the public blockchain network.

What will happen if there are more than one blockchains in the network?

If there are two different truth or two different blockchains in the network, the blockchain system chooses the longest blockchain/ complex blockchain out of those two blockchains.

In this case, the private blockchain is longer than the public blockchain because the person who has 51% hashing power will mine faster than the others. What happens is, the blockchain system accept the private blockchain instead of the public blockchain because the private blockchain is the longest one. And keep in mind that, newly created private blockchain does not contain the transactions which the person have done in the public blockchain.

Then what happens is, the person who has introduced his private blockchain to the network can spend the same amount of bitcoins that he spent in the previous blockchain in this newly created blockchain, because those transactions are not in this newly created private blockchain. The new blockchain network cannot get the previous blockchain’s transaction. Therefore, that person can double-spend his bitcoins again in this new blockchain network. Things that the person bought using the previous blockchain was confirmed and accepted in that blockchain, therefore it will not affect the new blockchain network.

This is how an attacker can double-spend his bitcoins in the blockchain network.

Double spending is one thing that an attacker can do and the other thing that an attacker could do is block certain transactions in the network from other miners. The attacker can do it because they have enough power to take the control of the blockchain network. Then the attacker will block the future transactions from the other miners and eventually this will cause to set other miners out from the bitcoin mining process. Then other miners will lose the mining reward and they exit from that particular blockchain network. The process is also known as devastating the blockchain network and this will help the person who has 51% hashing power to increase their hashing power of the blockchain system from 51% up to 100%. The person who has 100% hashing power of the blockchain network is also known as “Bitcoin Monopoly”. This is also can be done by the attacker who has 51% hashing power.

But you may think what would happen if a person double-spending or become a bitcoin monopoly in a blockchain network?

If a person who has 51% hashing power starts double-spending, the whole blockchain network becomes worthless because it will crush the price of the bitcoin. And the same thing will happen when a person becomes a “Bitcoin Monopoly”. We have to keep in mind, if we try to execute an attack on a bitcoin network, it will reduce the price of the bitcoin and eventually the whole blockchain network become worthless and no-one uses that blockchain system to mine the bitcoins.

These are the things that an attacker who has 51% of hashing power can do.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response