Ok so you have read this term “Blockchain” in news, tech articles, medium, etc. You know its related to Bitcoin and Distributed ledger. But you don’t understand the hows and whys of all this.

So to put it simply — Blockchain is a smart new technology to implement distributed ledger.

Now what the heck is Distributed ledger and why do we need this?

Lets first understand that —

First of all lets leave the computer stuff for a moment. Lets see how Distributed ledger can be implemented in the real world minus the computers!

Lets see how YAPESE community used to trade in 1700s. Back then, people had no currency. They used to trade with food grains, cattle, gold or something precious and limited in quantity. The place where Yapese lived had big rocks known as Rai stones; so people used them as their currency. Everybody owned some rocks and whenever they wanted to pay someone, they transferred the ownership of that rock to the payee.

They didn’t rely on a central bank to do transactions. Instead they all maintained a ledger of their and everybody else’s wealth and transactions.

The way it works is this — Whenever two people want to trade, say A and B, so then A announces it to everybody that A has given its rock to B. Everybody including A and B note it down in their ledgers.

But why this — Why not have a bank like we guys do?

The biggest upside to this is that they dont rely on a single authority, which may turn greedy tomorrow, or which can be compromised. If this single entity breaks, the whole community is back to ZERO.

Also, in this system, everybody knows about every happening. Everyone knows each other’s wealth. This is an open system. No under-table transactions or black money.

Also, lets say one of the member E is out for vacation, there is no problem. The rest of the members (A,B,C,D) all have the updated ledgers. E can join in back and update his ledger after talking to all A,B,C,D.

What happens when any one of them tries to be over smart? What if tomorrow C announces to everyone that he and D had met yesterday in a bar, and D lost all his rocks to C in a bet. D disagrees to this. In this case, other members can discard this transaction considering that the transaction didnt happen in everyone’s presence, and if C doesnt conform, all the other members can kick him out of the community.

Quite smooth system till now.

Now that we have understood Distributed ledger. Lets see what are the challenges in implementing this. We will continuously improve this system, eventually creating one like a Blockchain.

Lets see what happens when the community grows and all of them are doing transactions very frequently.

Everyone is shouting their transactions aloud and its complete cacophony. In the end, nobody is able to understand what others are saying, or others are able to hear only some of the transactions. In either of the case, our system fails. All of the members have a different version of the ledger and they are all fighting.

To combat this, we need a system to make sure people follow queue and wait until previous transactions are done recorded in everybody’s ledger.

You might think that the community can select a leader who manages a queue. But thats the whole point — nobody trusts each other, the system should be designed as such so that there is no dependency on a single node.

Here comes the role of Voluteers/Miners —

Lets say B and D volunteer to become miners and make sure the system works smoothly. They both will listen to transactions of people who come to them, check for sufficient balance, if passed they will record it in their respective ledger and will sync that with the other miner. For their effort, the community will give a them a small part of their transaction amount as fees (why else would they help everyone?). Others are free to query for and get the latest version of the ledger from any miner anytime. In this way, we still have distributed ledger and an open system and all the members can function smoothly.

Now again lets see what will happen if some of them tries to be oversmart?

A wants to buy goods from E and C worth one rock each. But he has only one rock with him. He found out a flaw and wants to fool the system. Lets see what he does —

A & E go to miner #1 i.e. B and tells him that he is giving his rock to E. B notes this down in his ledger. E gives A the goods he wants.

A then rides his horse, picks up C, and goes straight to miner #2 i.e. D before B meets him. He tells D that he is giving the same rock to C. D doesn’t know that A had spent the same rock. D notes this down and validates the transaction. And as expected, C gives the goods to A.

As you see, A double spent his rock. One should not be able to do that!

Now when in the evening when B and D meet to sync up, they don’t know which transaction by A is to be considered as valid.

You must be thinking that they could discard the transaction that happened later, but again TRUST issues. We cant trust that the miner is telling the right time of the transaction!