Sign up for our Telegram channel for daily crypto news • Follow us on Twitter for new article updates • If you are new to Crypto, check out our Crypto Education section

Crypto Forks and 51% Attacks Explained

As a Crypto pioneer, understanding some of the backend technology will help you to navigate the risks when evaluating new crypto projects. Here, we’ll take a deep dive into some of the terminology used in Crypto to explain soft forks, hard forks, and 51% attacks. We’ll do this through the framework of Bitcoin, but the knowledge that you will gain can be applied to other blockchains as well. You will then have the means to evaluate risks and join in conversations such as crypto governance, consensus algorithms, and the fair balance of power within blockchains.

First, let’s go over some key concepts that are essential pre-requisites to understanding forks and 51% attacks. The Bitcoin ecosystem can be broken down into three key contributors: full nodes, miners, and developers. It is a proof-of-work system that ensures accuracy through cryptography.

The Role of Full Nodes

A full node on the Bitcoin network is a program that fully validates transactions and blocks. It contains the entire bitcoin blockchain consisting of every transaction ever made across the entire network. When Bitcoin is sent, the transaction is announced to the network through a gossip protocol. Essentially, the new transaction is first presented to only a few of the thousands of nodes across the Bitcoin network (hence the gossip). These nodes in turn check that the transaction is valid before passing the information any further. This process continues until the entire network of nodes is made aware of a new pending transaction.

Because full nodes contain a complete copy of the entire Bitcoin blockchain, the new transaction is compared to the whole Bitcoin ledger, which allows for full node operators to verify that a newly presented transaction is not being double-spent. Since all the Bitcoin transactions are recorded on the blockchain since the very first transaction, these validators can then determine if a new transaction was already spent through the comparison. This catches any users trying to send Bitcoin out of their wallets twice, yet this does not complete the process.

The Role of Miners

The validated transaction is still in pending status until it is confirmed by a miner. Miners run a specialized kind of node that batches transactions together into candidate blocks. The miners then compete to solve a cryptographic puzzle to determine who wins the block reward and thereby have their candidate block appended to the Bitcoin blockchain.

Bitcoin miners use powerful computers knows as ASIC miners (Application Specific Integrated Circuit); these devices have been optimized for the purpose of mining Bitcoin or other similar proof-of-work blockchains. The miner that solves the cryptographical puzzle currently wins a reward 6.25 Bitcoin plus the transactions fees within the block. For more information on mining and blockchains in general, check out Blockchain Explained.

The Role of Developers

 Developers are the programmers completing code and dreaming up new ways to improve the blockchain. They create what are known as BIPs (Bitcoin Improvement Protocols). Unlike a centralized system, where the protocols are housed only on servers within a central organization, with Bitcoin, the software running the network is stored and maintained on the full nodes throughout the world. In other words, no central authority can just decide to update the software; rather, the full node operators must agree to the proposal before any changes take place. There have been many proposals to update the Bitcoin blockchain over the years, but it is only the proposals that have been agreed upon by the full node operators that make their way into the network.

Soft Forks

Now that we have a sense of how the Bitcoin ecosystem works, we can grasp how soft forks occur on the Bitcoin blockchain. At its core, Bitcoin is code running on a network consisting of full nodes and miners (technically speaking, light nodes run the network as well, but these are not relevant to our topic). Since the full nodes are the ones validating the transactions and the blocks, they hold power in adopting changes to the Bitcoin blockchain.

A soft fork is a new proposal adopted by the full node that is backward-compatible with the existing blockchain. The Bitcoin code consists of parameters, which are like governing boundaries that determine what can and cannot be processed. If there are changes to the code that are within these boundaries, then the change is said to be backward-compatible.

Let’s consider the upcoming Bitcoin Taproot soft fork that will be implemented later this year. The soft fork will bring more privacy to the Bitcoin network, increased efficiency, and even provide the basis for smart contracts on the Bitcoin network. The new code was programmed in such a way so that new blocks created within the Taproot framework are still backward compatible with the software running on full nodes that do not upgrade. Hence it is a soft fork.

This does not mean that the soft fork can be automatically adopted without a hitch. If the nodes do not come together and agree to its adoption, the updated protocol would never gain traction—at least 51% of the mining power must shift to the new version for the soft fork protocol to be adopted.

The full nodes have already agreed to adopt the Taproot soft fork by a wide margin. Taproot will activate at block 709,632 in November of 2021.

Hard Forks

Blocks that are validated by the full nodes form a long chain of blocks going back to the very first block on the blockchain called the genesis block. The Bitcoin protocol is known as a consensus algorithm because this entire blockchain has been created through the consensus of the miners. Because the miners are incentivized through the block reward to mine only valid blocks, if they provide faulty information to the blockchain, then the blocks will not be validated, and the miners would not receive their reward.

Hard forks occur through intentional breaks from the blockchain protocol, which are not backward compatible. Bitcoin Cash, for example, was created through a hard fork where some developers changed the Bitcoin code by increasing the block size from 1 MB to 8 MB. This change was no longer compatible with the software running on most Bitcoin full nodes and this change is what initiated a hard fork.

Because a minority of the full node operators did agree to the change, a hard fork occurred, thus splitting the Bitcoin blockchain into two: Bitcoin Cash and Bitcoin. Bitcoin, of course, retained its dominance as most of the community remained supportive of the Bitcoin blockchain. But Bitcoin Cash did become a viable alternative as an independent blockchain with its own community.

To complete a hard fork, coordination is needed. The developers would be the initial drivers of the change by presenting the new code to the community to be adopted. The full node operators can then implement the updated software protocol, but without having miners running software that is compatible with changes, the transactions will never be mined into valid blocks; therefore, developers, full node operators, and miners all take part in the execution of a hard fork.

51% Attacks

Let’s circle back to the blockchain. As discussed, each new block is secured by the miners who earn rewards by mining new blocks. The difficulty to mine new blocks change based on the protocol built in the Bitcoin code, a code that targets a 10-minute timeline for new block creation, otherwise known as the block time. Therefore, the ability for any miner to complete a block (or mine a block) is dependent upon how much hash power they have allocated to their mining rigs. Through the purchase of ASIC miners, the miners increase their hash power to mine more blocks and earn more rewards. The more hash power garnered, the better their odds at solving the cryptographic puzzle and getting paid.

Bitcoin miners are spread out all over the world. But if any miner decided that they wanted to take over the Bitcoin blockchain, they would have to control 51% of the total hash power to do so. This would be extremely costly, as the mining hash power that such an attacker would have to procure would cost billions of dollars. And if someone did decide to do so, other miners may take notice and add hash power to their own mining operations, just to protect their investments and avoid the prospect of a nefarious actor taking over the network. So far, there hasn’t been a successful 51% attack on the Bitcoin network in its history. And as the network grows, it becomes less and less likely.

But let’s speculate. How could a 51% attack be completed?

First, a miner would have to secure 51% of all the hash power by building an immense ASIC mining infrastructure. The hash power would have to surpass the hash power of all the other mining nodes on the network—which would be a tremendous feat.

Since the hypothetic attacker has over 51% of the hash power, they would be able to falsify blocks during their mining process. They could double-spend transactions for example, and then begin mining a separate blockchain in secret with all their 51% plus hash power. Instead of broadcasting their newly mined blocks to the network, the attacker would instead split the chain and work on their own falsified version of the chain in secret. With this second blockchain now isolated and validated, the attacker could then spend their duplicated coins (created through the faulty double-spends they used to split the network).

With 51% of the hash power, the attacker would thereby create the longest chain by outpacing the chain of the other miners. Once the attacker has created enough blocks to be longer than the legitimate chain, they would then broadcast their corrupt chain to the Bitcoin network.

Miners, who are incentivized to receive a reward for creating new blocks, would then flip their hash power to the new (corrupt) chain. Because if they didn’t, the Bitcoin protocol wouldn’t allow them to receive the block reward—in this way the corrupt chain would become the main chain thereby completing the 51% attack.

The Beauty of Bitcoin

Therein lies the beauty of Bitcoin. Based on the current size of the Bitcoin network, a 51% attack is virtually impossible at this stage—and it was intentionally designed this way. Satoshi Nakamoto created a democratic, balanced system of economic power, which has persisted since its inception.  But this is not to say the smaller blockchains do not run the risk of 51% attacks. In fact, in its early years,  Ethereum was intentionally split through a 51% attack to reverse a faulty transaction that the prior protocol enabled. The highly controversial planned attack split the blockchain into Ethereum as we know it, and Ethereum Classic.

Some critics point out that mining Bitcoin is now only feasible to the wealthy. Yet this does not mean that the Bitcoin blockchain is controlled by the wealthy. Unlike a Bitcoin mining operation, the cost to run a full node on the Bitcoin network is relatively inexpensive. And since it is the full node operators that accept or reject any changes to the Bitcoin protocol by deciding whether to adopt the updated software, they thereby hold the power in determining the future direction of Bitcoin. In this sense, Bitcoin is a slow-moving juggernaut that takes a tremendous amount of agreement and consensus to change its course. The protocol itself is its own Bill of Rights, so to speak—the foundation for a democratic system of wealth where anyone can have a voice in the network just by running a full node.

Like this post? Please share!

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Leave a Comment

Get Our Exclusive Free Articles
Sign up for our FREE, exclusive content on revolutionary crypto projects, building a truly decentralized lifestyle through sovereign wealth, and expert guidance on how to prosper from crypto.​

OTHER ARTICLES YOU MIGHT ENJOY