What is a 51% attack and how to detect it?

Published at: Nov. 12, 2022

Despite being underpinned by blockchain technology that promises security, immutability, and complete transparency, many cryptocurrencies like Bitcoin SV (BSV), Litecoin (LTC) and Ethereum Classic (ETC) have been subject to 51% attacks several times in the past. While there are many mechanisms by which malicious entities can and have exploited blockchains, a 51% attack, or a majority attack as it is also called, occurs when a group of miners or an entity controls more than 50% of the blockchain’s hashing power and then assumes control over it. 

Arguably the most expensive and tedious method to compromise a blockchain, 51% of attacks have been largely successful with smaller networks that require lower hashing power to overcome the majority of nodes.

Understanding a 51% attack 

Before delving into the technique involved in a 51% attack, it is important to understand how blockchains record transactions, validate them and the different controls embedded in their architecture to prevent any alteration. Employing cryptographic techniques to connect subsequent blocks, which themselves are records of transactions that have taken place on the network, a blockchain adopts one of two types of consensus mechanisms to validate every transaction through its network of nodes and record them permanently.

While nodes in a proof-of-work (PoW) blockchain need to solve complex mathematical puzzles in order to verify transactions and add them to the blockchain, a proof-of-stake (PoS) blockchain requires nodes to stake a certain amount of the native token to earn validator status. Either way, a 51% attack can be orchestrated by controlling the network’s mining hash rate or by commanding more than 50% of the staked tokens in the blockchain.

To understand how a 51% attack works, imagine if more than 50% of all the nodes that perform these validating functions conspire together to introduce a different version of the blockchain or execute a denial-of-service (DOS) attack. The latter is a type of 51% attack in which the remaining nodes are prevented from performing their functions while the attacking nodes go about adding new transactions to the blockchain or erasing old ones. In either case, the attackers could potentially reverse transactions and even double-spend the native crypto token, which is akin to creating counterfeit currency.

Needless to say, such a 51% attack can compromise the entire network and indirectly cause great losses for investors who hold the native token. Even though creating an altered version of the original blockchain requires a phenomenally large amount of computing power or staked cryptocurrency in the case of large blockchains like Bitcoin or Ethereum, it isn’t as far-fetched for smaller blockchains. 

Even a DOS attack is capable of paralyzing the blockchain’s functioning and can negatively impact the underlying cryptocurrency’s price. However, it is improbable that older transactions beyond a certain cut-off can be reversed and thus puts only the most recent or future transactions made on the network at risk.

Is a 51% attack on Bitcoin possible?

For a PoW blockchain, the probability of a 51% attack decreases as the hashing power or the computational power utilized per second for mining increases. In the case of the Bitcoin (BTC) network, perpetrators would need to control more than half of the Bitcoin hash rate that currently stands at ~290 exahashes/s hashing power, requiring them to gain access to at least a 1.3 million of the most powerful application-specific integrated circuit (ASIC) miners like Bitmain’s Antminer S19 Pro that retails for around $3,700 each. 

This would entail that attackers need to purchase mining equipment totaling around $10 billion just to stand a chance to execute a 51% attack on the Bitcoin network. Then there are other aspects like electricity costs and the fact that they would not be entitled to any of the mining rewards applicable for honest nodes. 

However, for smaller blockchains like Bitcoin SV, the scenario is quite different, as the network’s hash rate stands at around 590PH/s, making the Bitcoin network almost 500 times more powerful than Bitcoin SV.

 In the case of a PoS blockchain like Ethereum, though, malicious entities would need to have more than half of the total Ether (ETH) tokens that are locked up in staking contracts on the network. This would require billions of dollars only in terms of purchasing the requisite computing power to even have some semblance of launching a successful 51% attack. 

Moreover, in the scenario that the attack fails, all of the staked tokens could be confiscated or locked, dealing a hefty financial blow to the entities involved in the purported attack.

How to detect and prevent a 51% attack on a blockchain?

The first check for any blockchain would be to ensure that no single entity, group of miners or even a mining pool controls more than 50% of the network’s mining hashrate or the total number of staked tokens. 

This requires blockchains to keep a constant check on the entities involved in the mining or staking process and take remedial action in case of a breach. Unfortunately, the Bitcoin Gold (BTG) blockchain couldn’t anticipate or prevent this from happening in May 2018, with a similar attack repeating in January 2020 that lead to nearly $70,000 worth of BTG being double-spent by an unknown actor. 

In all these instances, the 51% attack was made possible by a single network attacker gaining control over more than 50% of the hashing power and then proceeding to conduct deep reorganizations of the original blockchain that reversed completed transactions.

The repeated attacks on Bitcoin Gold do point out the importance of relying on ASIC miners instead of cheaper GPU-based mining. Since Bitcoin Gold uses the Zhash algorithm that makes mining possible even on consumer graphics cards, attackers can afford to launch a 51% attack on its network without needing to invest heavily in the more expensive ASIC miners. 

This 51% attack example does highlight the superior security controls offered by ASIC miners as they need a higher quantum of investment to procure them and are built specifically for a particular blockchain, making them useless for mining or attacking other blockchains.

However, in the event that miners of cryptocurrencies like BTC shift to smaller altcoins, even a small number of them could potentially control more than 50% of the altcoin’s smaller network hashrate. 

Moreover, with service providers such as NiceHash allowing people to rent hashing power for speculative crypto mining, the costs of launching a 51% attack can be drastically reduced. This has drawn attention to the need for real-time monitoring of chain reorganizations on blockchains to highlight an ongoing 51% attack. 

MIT Media Lab’s Digital Currency Initiative (DCI) is one such initiative that has built a system to actively monitor a number of PoW blockchains and their cryptocurrencies, reporting any suspicious transactions that may have double-spent the native token during a 51% attack.

Cryptocurrencies such as Hanacoin (HANA), Vertcoin (VTC), Verge (XVG), Expanse (EXP), and Litecoin are just a few examples of blockchain platforms that faced a 51% attack as reported by the DCI initiative. 

Of them, the Litecoin attack in July 2019 is a classic example of a 51% attack on a proof-of-stake blockchain, even though the attackers did not mine any new blocks and double-spent LTC tokens that were worth less than $5,000 at the time of the attack. 

This does highlight the lower risks of 51% attacks on PoS blockchains, deeming them less attractive to network attackers, and is one of the many reasons for an increasing number of networks switching over to the PoS consensus mechanism.

Tags
Related Posts
What is Bitcoin hash rate and why does it matter?
How does the hash rate affect Bitcoin price? The main drivers of Bitcoin’s price include computational power, mining profitability and network difficulty. Since miners are compensated in Bitcoin while incurring costs in local currencies, the hash rate follows the price. That said, the more computational power the Bitcoin network employs, the higher its value is. Moreover, rational miners are only willing to mine BTC if it is profitable, which implicitly means that any other cryptocurrency with no demand for it would have zero value and miners would redirect its resources elsewhere. Additionally, the network difficulty can be used as a …
Blockchain / Oct. 5, 2022
How to mine Bitcoin at home
Bitcoin mining (BTC) is the process of adding transactions to the Bitcoin blockchain, a decentralized public ledger of all Bitcoin transactions. Miners use powerful computers to solve complex mathematical puzzles, known as proof-of-work (PoW), to validate transactions and add them to the blockchain. In return, miners receive newly minted BTC as a reward for their work. The process of mining Bitcoin involves solving a complex mathematical puzzle, known as a hash, using specialized software and hardware. The miner that solves the puzzle first is rewarded with new BTC, as well as the transaction fees associated with the transactions included in …
Blockchain / Jan. 26, 2023
Crypto project brings apps and smart contracts to Bitcoin
A blockchain project says it makes Bitcoin programmable in a way that it hasn’t been before — enabling apps and smart contracts to be brought to the network. Stacks (formerly known as Blockstack) aims to position BTC as the foundation for a better internet that’s owned by users. Those behind this ecosystem argue that the internet is broken, with tech giants dominating the landscape. Stacks is a Layer 1 blockchain that uses Bitcoin’s infrastructure as a secure base layer. Smart contracts and apps can be enabled with little modification, with “minimal transaction load” on the network. Underpinning how scalable Stacks …
Blockchain / Jan. 14, 2021
Experts debate Bitcoin climate footprint in latest Cointelegraph Crypto Duel
In the latest Cointelegraph Crypto Duel, founder of Digiconomist Alex de Vries and CEO and founder of Blockchain for Climate Joseph Pallant debated the intensity of Bitcoin’s footprint and possible paths forward to reduce it. As pointed out by de Vries, Bitcoin’s energy consumption has been increasing together with its network. The analyst predicts its carbon footprint could increase tremendously as Bitcoin gets closer to mass adoption. “I fear that this will quickly get completely out of control if adoption increases a lot more”, he said. According to de Vries, as long as Bitcoin functions with a proof-of-work system, bringing …
Technology / April 30, 2021
Is post-Merge Ethereum PoS a threat to Bitcoin's dominance?
While Ethereum (ETH) fans are enthusiastic about the successful Merge, Swan Bitcoin CEO Cory Klippsten believes the upgrade will lead Ethereum into a “slow slide to irrelevance and eventual death.” According to Klippsten, the Ethereum community picked the wrong moment for detaching the protocol from its reliance on energy. As many parts of the world are experiencing severe energy shortages, he believed the environmental narrative is taking the back seat. In an exclusive interview with Cointelegraph, Klippsten said “I think the world is just waking up to reality and Ethereum just went way off into Fantasyland at the exact wrong …
Blockchain / Sept. 25, 2022