Attack 51% or attack double spending is a miner or group of miners on a blockchain trying to spend their cryptocurrency on that blockchain twice. They try to ‘double spend’ the money they are holding so this attack is also known as the attack double spending.
The goal of this is not always to double the spending volume of cryptocurrencies, but more often the aim is to discredit a certain cryptocurrency or blockchain by influencing affect its integrity.
Here is a brief example to help you visualize: let’s say I spend 10 Bitcoins on a luxury car. The car will be delivered in a few days and my Bitcoins will be transferred from me to the car company. By performing a 51% attack on the Bitcoin blockchain, I can now try reverse this Bitcoin transfer. If I succeed, I will own a luxury car and number My Bitcoins, allowing re-owning and being able to spend those 10 Bitcoins again.
The concept of a 51% attack seems obvious from the point of view of a democratic blockchain, but there is a common misconception about how it works.
This article will try to give a clear explanation of how the 51% attack works in more detail. If you do not really understand how blockchain works. You should read the article:
7 steps to help you understand how Blockchain works
Before going into the details of the 51% attack, it is important to understand that blockchain protocols are essentially a form of administration . A blockchain manages a ledger of data such as transaction data.
Because the blockchain protocol can govern this for us, we no longer need a third party to do this, such as a government or a bank. This is what makes (most) blockchains so decentralized .
The protocol of the Bitcoin blockchain is based on democracy, which means that the majority of participants (miners) on the network decide which version of the blockchain represents it.
When a Bitcoin owner signs a transaction, it is included in a local pool of unconfirmed transactions. Miners select transactions from these pools to form a block of transactions. To add this block of transactions to the blockchain, they need to find a solution to a very difficult problem. They try to find this solution using computing power. This is called hash.
The more computational power a miner has, the better their chances of finding a solution before other miners find it before them. When a miner finds a solution, it will be broadcast (along with their block) to other miners and they will verify onlyH it if all transactions inside the block are Invalid according to the existing record of transactions on the blockchain.
Note that a hacker can also never create a transaction for someone else as they would need it Electronic Signature of the person for execution (each individual has their own key) . Therefore, it is not possible to send Bitcoins from someone else’s account without having access to the respective private key.
Greedy miners create their own blockchain
Now, let’s focus a little. Although it is not possible to enter someone else’s wallet to create a transaction because there is no private key, a greedy miner maybe try reverse existing transactions. The principle is that when a miner finds a solution, it is broadcast to all other miners so they can verify it then the block is added to the blockchain (miners gain consensus ). However, a greedy miner can create child of blockchain by are not broadcast the solutions of its blocks to the rest of the official network. And then there will be two versions of blockchain.
One version is being tracked by an uninterrupted miner and one is being tracked by a greedy miner. The greedy miner is currently working on his own version of the blockchain and not broadcasting it to the rest of the network. The rest of the network didn’t receive the string, so it ended up not being broadcast to everyone. It is isolated from the rest of the network.
The greedy miner can now use all his Bitcoins for the honest version of the blockchain, the version all the other miners are working on. For example, he spends it on a Lamborghini. On the honest blockchain, his Bitcoins are now spent. Meanwhile, he are not include these transactions in its own separate version of the blockchain. On his separate version of the blockchain, he still has those Bitcoins.
The process is that the greedy miner is still picking blocks and verifying them all on his own on his own isolated version of the blockchain. This is where all the problems start to arise…
Blockchain is programmed to follow a democratic governance model, aka majority . Blockchain does this by always follow the longest string. In fact, the majority of miners add blocks to their version of the blockchain faster than the rest of the network (so longest string = majority). This is how the blockchain determines which version in the chain is true.
When a greedy miner spawns a parallel blockchain on his own, a race has begun. Whoever has the strongest hashing power will add blocks to their version of the chain faster.
Hacker reverses existing transactions by broadcasting a new chain
Greedy miners will now try to add blocks to their isolated blockchain faster than other miners adding blocks to their blockchain on the official network. As soon as the greedy miner creates a longer blockchain, he suddenly broadcasts this version of the blockchain to the rest of the network. The rest of the network will now detect and confirm that this (greedy) version of the blockchain is indeed long than the version they’re working with, and the protocol forces them to switch to this thread.
The greedy man’s blockchain is now considered a bona fide blockchain, and all transactions not on this chain will be reversed immediately. The hacker spent his Bitcoins on a Lamborghini before, but this transaction was not included in his stealth chain, the chain is now in control and so he is once again in control of the Bitcoins. there and He can spend them once again .
This is a double spending attack . It is often referred to as a 51% attack because a greedy miner will need more hashing power than the rest of the network combined (hence 51% of hash power is needed) to add a block to his version of the blockchain. he’s faster, eventually allowing him to build a longer chain.
In practice, these attacks are difficult to execute. Like mentioned before, a greedy miner will need more hashing power than the rest of the network total to achieve this. Considering the fact that there are perhaps even hundreds of thousands of miners on the Bitcoin blockchain, a greedy miner would have to spend a huge amount on mining hardware to compete with the rest of the network. Even the most powerful computers on earth cannot compete directly with the total computing power on this network. And there are countless other arguments against implementing 51% attacks.
Examples: risk of arrest and prosecution, cost of electricity, space, storage for all mining hardware, masking and money laundering. An operation like this is too much effort for what it will give an attacker, at least in the case of the Bitcoin blockchain.
In fact, an interesting story is that no matter how difficult it is to execute such an attack, many 51% attacks already actually happened in the past.
In the past, an attack was carried out quite recently (April 2018) on the Verge blockchain (XVG). In this particular case, the attacker found a bug in the code of XVG’s blockchain protocol that allowed him to generate new blocks at an incredibly fast rate and generate a longer version of the Verge blockchain in a fraction of the time. short time.
This example illustrates a 51% attack, although quite rare and often caused by a bug in the protocol code. A team of trusted blockchain developers would probably notice a bug like this and prevent it from being abused.
When testing the algorithm ‘ Proof of Work’ (mining algorithm), it tells us that more aggressive hashing/computing power and lead to more security against 51% attack .
Even so, the small blockchains that operate on this algorithm may be more vulnerable to such attacks since there isn’t much computing power for an attacker to compete with.
This is why 51% attacks often happen on small blockchains (e.g. ETC). The Bitcoin blockchain has never been a victim of a 51% attack before.
ASICs are one of the latest hot topics in the blockchain space recently. ASIC mining is a mining technology developed by different Bitcoin miners to enhance the mining hardware, making it much more powerful.
Currently, a lot of people in the field are debating whether ASIC miners are making certain individuals or mining pools too powerful. Blockchain Monero (XMR) recently implemented a protocol update that blocks ASIC mining on its blockchain. As a result, the total hash power on the network is reduced by a staggering 80%.
This indicates that the power of the Monero network is in the hands of ASIC miners. If all the participants on the network are using ASIC mining hardware then that doesn’t matter. The problem is that large miners like Bitmain are suspected of controlling a large number of ASIC mining operations. While these organizations also distribute the technology to individuals, they are probably only doing so after having used it for a long time themselves.
Many in the blockchain space argue that this control makes ASIC-owning companies too powerful. And that’s not really ideal because manipulation or fraud is very likely. A blockchain should be managed by as many individual miners as possible. This is what makes it more decentralized.
Hopefully this article has been helpful in helping you understand blockchain better. You can continue to expand your knowledge of blockchain with the following articles:
Beginner 1: 7 steps to help you understand how Blockchain works
Beginner 2: How mining works and how to process transactions on blockchain
Beginner 3: What is a 51% Attack? How does it work?
Beginner 4: Nodes and masternodes
Beginner 5: Mining difficulty and time to execute a block (blocktime)