Before we delve into the 51% attack, it is necessary to take a closer look at mining and blockchain-based systems.
One of the main advantages of Bitcoin and its underlying blockchain technology is the distributed nature of building and verifying data. The decentralized work of nodes ensures compliance with protocol rules and ensures that all network participants agree on the current state of the blockchain. This means that a majority of nodes need to regularly agree on the mining process, the software version used, the validity of transactions, etc.
Bitcoin’s consensus algorithm (proof of work) ensures that miners can only prove their work if the network nodes unanimously agree that the block hash value they provide is accurate (that is, the block hash value proves the miner’s work A new transaction block can only be verified if the amount is sufficient and an effective solution to the problem of the block has been found).
As a decentralized ledger and distributed system, blockchain infrastructure prevents any centralized entity from using the network for its own purposes, which is why there is no single authority on the Bitcoin network .
Since the mining process (in PoW-based systems) involves investing large amounts of electricity and computing resources, the performance of a miner depends on the computing power it possesses, which is often referred to as hash power or hashing power Rate. There are many nodes participating in mining activities, and they are distributed in different locations. These nodes compete with each other because they all want to be the next node to find a valid block hash value and receive the newly generated Bitcoin reward.
As a result, mining power is distributed across different nodes around the world, meaning that the hash rate is not controlled by a single entity. At least it shouldn't be.
But what happens if the hash rate is poorly distributed? For example, what if one entity or organization had access to more than 50% of the hashing power? One of the possible consequences is what we call a 51% attack, also known as a majority attack.
A 51% attack is a potential attack on a blockchain network in which a single entity or organization is able to control a majority of the hash rate, potentially disrupting the network. At this point the attacker will have enough mining power to deliberately exclude or modify the order of transactions. They can also reverse transactions that have been made without controlling the network, leading to a double-spending problem.
Most successful attacks can also allow the attacker to prevent some or all transactions from being confirmed (transaction denial of service), or prevent some or all other miners from mining, leading to a so-called mining monopoly .
On the other hand, most attacks do not allow an attacker to reverse other users' transactions, nor do they allow an attacker to prevent others from creating and broadcasting transactions to the network. It is also impossible to change block rewards, create tokens out of thin air, or steal tokens that do not belong to the attacker.
Because the blockchain is maintained by a distributed network of nodes, all participants cooperate in the process of reaching consensus. This is one of the reasons why blockchain is generally more secure. The larger the network, the greater its defenses against attacks and data corruption.
As for proof-of-work blockchains, the higher the hash rate a miner has, the greater the chance of finding a valid solution for the next block. This is true because mining involves countless hashing attempts, and higher computing power means more attempts can be made per second. Some early miners joined the Bitcoin network and contributed to its growth and security. As the price of Bitcoin as a currency continues to rise, many new miners are entering the system with the intention of competing for block rewards (currently set at 12.5 Bitcoins per block). The existence of this competition is one of the reasons why Bitcoin is safe. Miners would have no incentive to invest significant resources if it were not to act honestly and strive to receive block rewards.
Therefore, due to the large size of the Bitcoin network, a 51% attack is unlikely to occur. Once a blockchain becomes large enough, the likelihood of a single person or group gaining enough computing power to overwhelm all other participants quickly drops to extremely low levels.
In addition, as the chain grows, it becomes increasingly difficult to change previously confirmed blocks because these blocks are linked by cryptographic proofs. By the same token, the more confirmations a block has, the higher the cost of changing or reversing transactions within it. Therefore, a successful attack may only modify the transactions of the last few blocks for a short period of time.
Next, imagine if a malicious entity attacked the Bitcoin network not to gain profit, but just to destroy it, regardless of the cost. Even if an attacker succeeds in compromising the network, the Bitcoin software and protocol will quickly modify and adapt in response to their attack. This requires consensus from other network nodes to agree on these changes, but if the situation is urgent, the process can be completed quickly. Bitcoin is highly resistant to attacks and is considered the safest and most reliable cryptocurrency in existence.
While it would be quite difficult for an attacker to gain more computing power than the rest of the Bitcoin network, it is much less challenging with smaller cryptocurrencies. Compared to Bitcoin, altcoins have relatively less hash power to secure their blockchains. Low enough for a 51% attack to actually occur. A few famous examples of cryptocurrencies that have been subject to most attacks are Monacoin, Bitcoin Gold, and ZenCash.