The Forks

A fork, in the crypto world is very different from our useful daily utensil which can be used to eat (if one wants to do it in a classy civilized manner)! In fact, the other term for fork is branching out. And that is exactly what has happened repeatedly in the BTC world.

As we explained earlier, BTC was proposed by Satoshi Nakamoto, and is primarily responsible for popularizing the Blockchain technology. If you’ve read my article on Blockchain technology, then you will know that in a blockchain, the ‘trust’ between two parties, which till now was being enforced by contracts and the code of law, is replaced with a mechanical system which is programmed to ensure that no third party is required to ensure that two parties do not act in a manner contrary to what has been previously agreed upon.

How does the blockchain achieve this?

A small recap:

In a blockchain, all transactions are stored in all the nodes of the system, and in case of a discrepancy in any version of record for these transactions, the system can simply look up the version that is stored in the other nodes of the system. If the majority of the nodes in the system hold a record that does not match with that present in the local node (the source of the discrepancy), the local is deemed as incorrect, and that version is discarded and replaced by the version present in any other nodes. The benefit here is that if a hacker wants to hack (keep in mind that the only way the hacker can move any kind of token that acts as the means of payment in the system, is by hacking into a node and changing the existing record), he or she will have to hack all the nodes and modify the records in all the nodes, so that when a discrepancy happens and the system looks up other nodes to search for a solution, it gets the exact same record as there in the attacked node. Doing so is impossible considering the amount of time and resources that a hacker expends to actually hack into a system is quite long. To do so for all the nodes which maybe numbering in millions is next to impossible (theoretically, a hacked would need to hack atleast more than 50% of all nodes to get away with the money). Thus, a unique record is maintained, and the integrity of the chain is retained.

For those who didn’t read the upper part, do not fear, for that was just a small recap!

But there is a problem. BTC as we all know was developed more on an Ad Hoc basis rather than in a planned way. This resulted in a number of rules that BTC had that were quite controversial amongst the BTC community itself. The BTC community in this case is referring to all supply side stakeholders, such as producers, grids, miners, users etc. Now with time, the flaws in BTC became increasingly apparent. Many of these high level stakeholders decided that the existing rules were not good enough and that they were going to do something about it.
How to do something about it?

All you’d need to do is make yourself a new chain! But how? A complete new chain would be too difficult to build, especially if a lot of stakeholders on the existing chain agree with you that an upgrade is needed. Since you’ve already set up your software before, you already have a system that can wrk with the original rules (Let’s call them legacy rules). So why bother more investment if I can tweak the current system and fix the problem! As reasonable as it may sound we will have a few problems. We shall cater to the very briefly.

For more details please head here. [One important thing in this article that you need to keep in mind is that nodes are separate from miners.

Nodes: Nodes are special systems that store the entire chain of blocks in them. There are many such blocks on a blockchain and whenever a new transaction is added to the chain, each of these nodes store a copy. During calculations, each of these nodes is checked to see if they are matching, if any doesn’t match, it is assumed that the majority of the nodes that matched hold the correct chain.

Miners: They are the ones who collect the transaction fees, and slowly add them to form blocks, and then send the block to the nodes for record keeping. The more advanced the miner, the faster it is expected to do the job, and earn that sweet sweet BTC.

Often the same system can work as a node as well as a miner, but for understanding purposes, please consider them separate.

As in a blockchain, blocks of transactions are recorded sequentially, the moment a few participants decide to change the rules, the original chain of blocks will suddenly face a fork, i.e., it will start branching out. One branch accepting the newer blocks with new rules, and the other branch keeps the legacy blocks. There are 2 kinds of forks:

Hard Forks: Here the new rules implemented loosen the existing rules. For Eg: In the initial blockchain the rule was that the blocks were of sizes of 1 MB. In a hard fork, the 1MB can be changed to 2 MB, thus loosening the rules.

Soft Forks: Here the new rules tighten the existing ones. For Eg: In the initial blockchain the rule was that the blocks were of sizes of 1 MB. In a soft fork, the 1MB can be changed to 1/2 MB, thus tightening the rules.
Go through the linked article if you want to learn more. The base idea for the soft or hard fork to work, is that both the nodes that record the blockchain and the miners that create the blocks and send it to the nodes need to update their software.

This may happen over a duration of time, and there are many risks that are there. But if implemented currently one of two things will happen:

1. In certain scenarios the existing chain can just be updated, so as to incorporate the latest improvements. This normally happens when the whole community of miners, nodes and other stakeholders agree on these improvements and implement the same.

2. In other scenarios when there exists significant difference in opinions, but both parties on the other sides of the difference are large enough, a fork might lead to the creation of a new blockchain.

[Note: Both soft and hard fork can lead to 2 different blockchains, and hence 2 different coins. But eventually over a period of time one chain overpowers the other if one party can gather significantly more resources than the other in terms of miner’s & stakeholder’s consensus.]

In scenario 2, which is the scenario that we should be concerning ourselves with, a few things should be noted:

1. We now have 2 blockchains. And the time at which the fork happens, beyond that point, or rather beyond the block, there are 2 branches, corresponding to 2 different blockchains.

[We will explore this scenario below, but first I want to get across one core concept. Each time the system calculates what amount of tokens there is in someone’s wallet, it calculates all the transactions from the start, adds and subtracts all the transactions that have so far been made, and eventually arrives at a figure]

a. Now, first problem, say we have forked at block number 3. And from block 4 the system has bifurcated into two chains, say 4 and 4’. Imagine the below scenario.

Imagine initially each has 10. Let this be a new currency called legacy coin

Block NumberTransactionFinal Balances
1A->B: 5A: 5, B: 15, C:10
2B->C: 10A: 5, B: 5, C: 20
3C->A: 3A: 8, B: 5, C: 17
4C->B: 5A: 8, B: 10, C: 10
5C->A: 3A: 11, B: 10, C: 7

After the fork happens. Now for the chain that continued to follow the legacy rules, there will be no major problem

I hope you have a clear understanding of how transactions are happening, blocks are being made, and the final balances are being calculated. It happens in the same way in the real blockchains. The system parses through transactions to figure out the final balances of each participant. So after the fork, at the 4th block, the participants A has 8, B has 10, C has 10 worth of legacy coins.

But now what about the forked Blockchain? Let’s call it fork coin.

Block NumberTransactionFinal Balances
1A->B: 5A: 5, B: 15, C:10
2B->C: 10A: 5, B: 5, C: 20
3C->A: 3A: 8, B: 5, C: 17
4’C->B: 5A: 8, B: 10, C: 10

So the question you should be asking is that when the fork happens, and at 4’ block, I am technically holding a new currency right? So without doing anything a person who was holding legacy coins at block 3, at the next block (that we named 4’) he/she is also holding fork coins! A has 8, B has 10, C has 10 worth of fork coins. So what gives? Do they get free coins?

Yes, they do get free coins. During forks on BTC, all existing holders received an equal number of the forked coins. Post that the chains take their own directions. So if anyone can say, “Look I got free money,” it’s these people.

b. Now that we have demonstrated the first point regarding a fork. Let’s talk about the next issue. There are certain vulnerabilities that arise especially after a fork. One of them is the replay attack, but this is beyond the course of this discussion. To read more go here.

Now that we have set the grounds for what a fork is. We shall discuss the actual forks that have happened till now:

On Bitcoin itself
1. BTC Cash
2. Segwit2x
3. BTC Gold
4. Super BTC

On Ethereum
1. Ethereum classic