paint-brush
Understanding 51% Attacks on Bitcoin and Blockchainby@talktomaruf
204 reads

Understanding 51% Attacks on Bitcoin and Blockchain

by Abubakar MarufJune 20th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A 51% attack doesn't mean the attacker can send BTC from your wallet or account; it only means the blockchain has been compromised, and double-spending of crypto is imminent. Blockchains like Bitcoin and its contemporaries, with larger mining nodes and hash power, are less likely to be attacked due to the financial cost involved.
featured image - Understanding 51% Attacks on Bitcoin and Blockchain
Abubakar Maruf HackerNoon profile picture

Blockchain technology is no longer a new word in this digital era. The name prevalently comes to mind anytime Bitcoin cryptocurrency is mentioned in any discourse. Unfortunately, the connection between blockchain and Bitcoin can't be ruptured because the Bitcoin cryptocurrency brought blockchain to the limelight in 2008.


For clarity's sake, Bitcoin is a blockchain on its own, while its native cryptocurrency that is used to incentivize miners is BTC—Bitcoin cryptocurrency. The cryptocurrency was birthed through one of the several use cases of blockchain in the finance industry.

What Is Blockchain?

Blockchain is an immutable and decentralized public ledger that records transactions in packs or blocks. It runs on P2P—peer-to-peer— nodes that are interconnected to one another such that the nodes are the storage facility where blockchain stores its blocks of transactions.


Each time a transaction occurs on a blockchain, it is recorded by sharing a copy across all nodes in the ecosystem.


This explains the timely records of piles of transactions stored in a block. When the block is full, another block is created with the previous block's information, creating a chain link between the preceding and succeeding blocks.


Examples of blockchains include Bitcoin, Ethereum, Tera, Tron, Polkadot, Cardano, and Ripple, among others. Every blockchain has its consensus mechanism that is used to validate transactions; it can be PoW—Proof of Work—or PoS—Proof of Stake.

What Is Bitcoin?

Cryptocurrency is a digital currency developed as a medium of exchange on a decentralized network—blockchain. The physical currency is fiat money, while the digital or computerized currency is a cryptocurrency issued and secured cryptographically.


Just like countries have their official currency or fiat money as a legal tender for doing business, all blockchains also have their respective cryptocurrency spent in their respective ecosystem. Bitcoin—BTC—is the native cryptocurrency of the Bitcoin blockchain network. It is the trailblazer of other cryptocurrencies that runs on a P2P network and can be transferred without intermediaries. BTC can be gotten in different ways:


  • By purchasing it on crypto exchange platforms
  • By accepting it as a means of settlement for goods and services
  • By mining

Bitcoin Mining

Bitcoin mining is the process of digitally verifying Bitcoin transactions on the Bitcoin blockchain and adding them to the blockchain's ledger. The bitcoin blockchain uses the PoW mechanism as its consensus mechanism, so mining is done by solving complex cryptographic puzzles to verify blocks of transactions that will be updated on the decentralized blockchain ledger.


Solving complex puzzles requires in-depth computing knowledge, strong computing power, and sophisticated equipment. At the end of solving each puzzle, miners or validators are rewarded with BTC for their work. This BTC is then released into circulation and traded on crypto and exchange platforms.

Let’s Take a Small Dive Into Consensus Mechanisms

A consensus mechanism is when the majority agrees on something or disagrees. Imagine you conduct a survey with 100 different people from different locations about how sweet a particular cookie is. If all 100 say it is sweet or otherwise, their opinion is unanimous, which marks a consensus.


The consensus mechanisms employed in all blockchain networks are similar to the example above. In the case of blockchain, miners replicate the audience that took the cookie survey. Back to Bitcoin mining.


As mentioned earlier, the consensus mechanism of bitcoin is the PoW, where miners compete to solve complex cryptographic puzzles with their mining machines. Whoever can solve this puzzle faster and produces the winning hash wins the right to add the newly verified transaction data to a block. Such a validator will be rewarded with the native crypto of the blockchain—BTC.


What usually determines who wins the right to fill a new block with transaction data is having a mining machine with a high hash rate—i.e., machines that can produce more hashes per second. This can be achieved by having more machines and combining their mining power or getting machines with higher mining power to mine faster than your competitors.


This suggestion can be likened to participating in a raffle where having more tickets increases your chances of winning. Now, what if an unscrupulous or malevolent actor has a higher mining power than other miners? Then, a 51% attack is imminent!

What Is a 51% Attack?

A 51% attack occurs when a malevolent miner in a blockchain network gains control of the blockchain mining power. This means that the miner—in this case, an attacker— will be able to mine faster than other miners because the attacker now controls more than 50% of mining power.


Having 51% control—which is the least percentage required to take over a blockchain network—is ominous.

Difference Between a 51% Attack and a 34% Attack

A 34% attack is known with the Tangle consensus algorithm. The attacker only falsifies the blockchain's ledger by approving or disapproving transactions. In contrast, the 51% attack gives attackers control of a blockchain such that they can disrupt mining and the entire blockchain.

Implications of a 51% Attack on Blockchain and Bitcoin

When an attacker controls 51% mining power in a blockchain, then the security of such a blockchain has been compromised, leaving the attacker in control of transactions. Below are the implications of what's bound to happen due to a 51% attack:


  1. Network Disruption by Delaying Validation of Transactions: The attacker disrupts the blockchain network by attacking the miner's computing resources. In such a scenario, there'll be a delay in the validation and storage of transactions in a block. As a result, the blockchain is hampered, causing the attacker to process transactions faster than the miners or even prevent another miner from adding blocks.


  2. Double Spending: Double spending occurs when miners spend their crypto twice on a particular blockchain network.


    How?


    Imagine if the attacker had previously purchased a Ferrari 250 GTO with 1,600 BTC; he paid for the car and got the delivery of the vehicle. During a 51% attack on the BTC blockchain, the attacker can reverse the 1,600 BTC transferred to the seller's wallet such that he keeps the car and the BTC. The BTC can then be spent for another purpose. This is known as double-spending.


  3. Reduction in Miner's Reward: Since miners are usually rewarded for validating transactions on a blockchain, in the wake of a 51% attack, the attacker steals the shares of other miners, making them earn less than what they're supposed to earn.

Diminishes Blockchain's Credibility

A 51% attack on a blockchain network will diminish the credibility of such a blockchain. Both miners and investors will not trust the security framework anymore. This might lead to abandoning the project or some exchanges delisting the crypto from their market.


Below are the examples of blockchains that have suffered a 51% attack:


• BSV—Bitcoin Satoshi Vision—was attacked in August 2021

• ETC—Ethereum Classic—was attacked thrice in August 2020

• BTG—Bitcoin Gold— was attacked twice; once in 2018 and then in 2020

• GRIN was attacked in 2020, the attacker controlled about 58% of GRIN's hash rate

• VTC—Vertcoin—was also attacked twice in 2019

How to Prevent 51% Attack

i. Limited Hash Power - Blockchains running on the PoW mechanism should limit the hash power of each miner to 50% or lesser. This will pre-empt such an attack


ii. Using PoS or DPoS A PoS- Proof-of-Stake- the mechanism is another consensus mechanism for validating blockchain transactions. It is eco-friendly because no power is needed, and it doesn’t require a sophisticated machine. PoS uses coin owners' machines to mine crypto. Investors stake their coins in return for an opportunity to validate blocks.


DPoS, on the other hand, means Delegated Proof-of-stake. It is a decentralized PoS where the crypto community appoints validators by voting. If a validator is perceived to be compromising the network, they are also voted out by the community.

Conclusion

A 51% attack doesn't mean the attacker can send BTC from your wallet or account; it only means the blockchain has been compromised, and double-spending of crypto is imminent. Blockchains like Bitcoin and its contemporaries, with larger mining nodes and hash power, are less likely to be attacked due to the financial cost involved.


Photo by Chris Sabor on Unsplash