What Is A 51% Attack And How Do They Work?

Read this article in 中文, Indonesian, Vietnamese, Türkçe, ΕΛΛΗΝΙΚΑ, and Russian.

Decentralization is one of the core principles of the cryptocurrency economy. Instead of relying on a single company or entity, blockchains generally rely on a distributed network of nodes that help ensure they remain secure and operate efficiently.

Because of this, blockchains can be incredibly resilient in the face of attempted attacks.

But there’s one type of vulnerability, called a 51% attack, that stands out from the rest, due to its potential to completely undermine that principle of decentralization.

But what exactly is a 51% attack? Here’s everything you need to know.

What Is A 51% Attack?

A 51% attack is a type of attack on a blockchain network where one entity gains control over more than half (51%) of that blockchain’s mining hash rate, computational power, or staked tokens. By centralizing the control of a blockchain into the hands of a single bad actor or entity, 51% attacks have the potential to subvert the principles of decentralization, security, and trustlessness that define blockchains. The concept of such attacks has been discussed since the early days of bitcoin, including in Satoshi Nakamoto’s original bitcoin whitepaper from 2008.

If an entity were to gain control over 51% (or more) of a network, it could allow them to significantly disrupt the integrity of that blockchain in a variety of ways, including reversing transactions, blocking new transactions from being confirmed, the double-spending of tokens, or even the creation of an alternative version of that blockchain (known as a “fork”) that could fragment the network and confuse users.

How Does A 51% Attack Work?

Any 51% attack starts with the exploiters trying to gain majority control over that blockchain. While typically, risks around 51% attacks have centered around proof-of-work blockchains like bitcoin, they’re theoretically possible on proof-of-stake chains as well.

For a proof-of-work chain, where miners compete to solve complex cryptographic puzzles in exchange for block rewards, attempting a 51% attack would require the attacker to amass enough computational power to take over the network. This typically means buying or building enough mining rigs that they’ve amassed at least as much power as the rest of all the other miners in the network combined — if not more.

Alternatively, an attacker could join, or create, malicious mining pools, which are essentially miners who combine their computational power to work together and increase their chances of earning rewards. If an attacker is able to influence enough miners to join a pool, they could potentially accumulate 51% of a network’s hashrate.

Once the exploiter gains control over 51% of the network, they have a range of options at their disposal.

They can opt to:

Partition The Chain

This means that the hacking group or entity has essentially segregated its group away from the main network’s miners. With this separation, the hackers can continue with mining operations but can refrain from sharing updates with the primary network.

Add New Blocks

With the majority of the network under their control, the attacking entity could also opt to add blocks to the blockchain faster than the rest of the network can. If the attack continues for some time, eventually the difference in length between the two versions of that blockchain will become proportional to the difference in the hashing power between the hackers and the main network.

Reintegrate With The Network

If the hacking group opts to rejoin the network following the initial partition, the original network, and the competing version created by the hackers will both begin spreading through the entire network. If the new chain has more blocks than the initial chain, then typically the new chain will replace the original chain, meaning that the attackers will have gained the ability to execute a wide variety of potential threats.

What Are The Risks Of A 51% Attack?

If an attacker was able to successfully acquire enough computing power to partition a chance, add new blocks, and then reintegrate that new chain with the original network, then there can be serious implications for that blockchain and its users, including:

Double-spending

Upon the advent of digital currencies and assets, a key concern was around the potential to “double-spend.” Since digital currencies are just data, they can potentially be copied and spent more than once if not managed properly. But through blockchain and its consensus mechanisms, it can be ensured that only valid transactions are recorded and that once a transaction is confirmed, it can’t be altered or reversed.

But if an attacker gained control over 51% of a network, all that goes out the window, and the most feared consequence is that they’d move to try to double-spend tokens. To do this, the attackers would first need to record a regular transaction. Then, they could use their control over the network to change the blockchain to show that they never spent the money at all, and repeat that over, and over.

Denial Of Service Attack

Another potential consequence of a 51% attack is a denial of service attack. Essentially, the attacker could block the addresses of other miners, making it impossible for certain transactions to be confirmed. At the same time, since attackers have control over most of the network, they’d be able to potentially prioritize their own transactions over the legitimate ones that they’re blocking. This would not only delay real users but could also lead to the attacker’s false transactions becoming permanent.

Loss Of Trust

Blockchains operate on a trustless nature. Since there’s no centralized entity in control, trust is essentially distributed across the network of nodes and miners. When operating correctly, this means that there’s no single point of failure, and that it’s extremely difficult for a blockchain to confirm an illegitimate transaction. But after a 51% attack, a user’s trust in that blockchain could be permanently eroded because of the seriousness of the exploit, which could make it challenging to retain users, could lead to a drop in that network’s native currency, and could make it difficult to continue to grow and scale that chain.

Are 51% Attacks Likely?

While 51% attacks might be the most feared of all potential blockchain exploits, they’re actually extremely unlikely — at least for major blockchains. To successfully take over 51% of the bitcoin network, for example, it would cost an estimated $20 billion to do so. And to take over 51% of all staked ETH tokens, it could cost even more. And as these blockchains acquire more users and become more decentralized, the task only grows more difficult.

To take over bitcoin’s network, the exploiter would have to not only have the funds to buy billions of dollars of mining equipment, but also have the funds to pay massive electricity bills to keep them running, in addition to even finding a source for such a hefty amount of computing power. Bitcoin mining uses up as much electricity as some entire nations, meaning the costs would add up quickly, since taking over the network would require even more power.

Beyond the sheer cost, there’s also no guarantee that if one did take over 51% of the network, it would be successful. Theoretically, validators and miners could also coordinate against a suspected hacker, and have options including choosing to restart the blockchain from a period in time before the hack happened. For the largest, most-used blockchains, these potential deterrents have been strong enough to avoid a 51% attack.

But smaller blockchains that don’t have as much mining power or staked tokens can be far more vulnerable.

Successful 51% attacks in recent years include:

Bitcoin Gold: This blockchain was 51% attacked twice, first in 2018 and then in 2020. In 2018, the 51% attack led to $18 million in double-spending of the chain’s native token. In 2020, the blockchain was exploited again, to the tune of around $70,000 in double-spending.

Ethereum Classic: Ethereum Classic has been the subject of multiple 51% attacks, stemming from the fact that it is a relatively lightly used blockchain. In 2020, ETC suffered three 51% attacks in the span of a month. In one of the attacks, an exploiter paid around $200,000 to acquire enough computing power to take over the chain, then went on to double-spend more than $5.5 million in ETC tokens.

Vertcoin: A largely unknown blockchain, Vertcoin was 51% attacked in 2018 and in 2019. In its first exploit, about $100,000 in the blockchain’s native currency was double-spent.

Bitcoin Remains Secure

While 51% attacks are possible in theory and they have occurred on smaller, less secure blockchains, they’re an extremely unlikely threat for the most major blockchains in the cryptocurrency ecosystem. The scale of the financial, logistical, and computational resources required to execute such an attack acts as a powerful deterrent.

At the same time, the fact that 51% attacks are possible in theory underscores the necessity of maintaining a robust and sufficiently decentralized network and ensuring security remains paramount.

More fromLorenzo academy

December 10, 2024
Bitcoin - Core Concepts

What Is Bitcoin Mining?

Bitcoin mining is the engine driving the world’s largest decentralized financial network. But how does it work, and why does it matter? This article dives into the intricate process of mining, detailing how miners validate transactions, secure the blockchain, and introduce new bitcoin into circulation. From the evolution of mining hardware to its environmental controversies, we explore the pivotal role mining plays in Bitcoin’s ecosystem and its implications for the future of global finance.

December 7, 2024
Bitcoin - DeFi

Bitcoin & The Move Ecosystem: An Overview Of Key Players And Implications

Dive into the groundbreaking convergence of the Move ecosystem and Bitcoin DeFi.

December 6, 2024
Bitcoin - Core Concepts

Who Owns The Most Bitcoin? View The Biggest Whales

An overview of the world's top Bitcoin holders, spanning individuals, companies, and countries.