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

HomeCrypto News

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

Despite being underpinned by blockchain technology that promises security, immutability, and complete transparency, many cryptocurrencies like Bitcoin

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.

PoW vs PoS

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.

Diagrammatic representation of a 51% attack

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…

cointelegraph.com