post-image

Blockchain explained easily for Beginners


Chapter 1

Unless you are living under a rock, like Patrick, I’m pretty sure you’ve heard of blockchain. It is generating a buzz in the media these days. But if you’re short on the information or are wondering what it is, this article will help you understand blockchain. You’re going to understand blockchain technology in the simplest way possible.

Imagine Ranju is your sister. She lives out of town. One day, she calls you and tells you she has run out of money.

She asks you to send her Rs.10,000 immediately.

As usual you go to your bank and ask your account manager to transfer Rs. 10,000 to Ranju. Your bank manager opens the register and checks if you have enough balance. Since you have plenty, he performs the transfer. He also makes an entry in the register

Now you call Ranju and tell her that you’ve transferred the money into her bank account.

Did you notice what just happened here?

There was no physical movement of the money involved, was there? All it required was an entry in the register. An entry neither you nor Ranju controls or owns.
You and Ranju both trusted the bank to make the transaction. We have been depending upon these intermediaries since a long time.
You might ask what is wrong with that.
First, the register which contains the entry of the transaction is single in number. It will only take one person/organization to turn dishonest and misuse it.

  • What if the register which stores the information gets destroyed?
  • What if the account manager mistakenly writes Rs.15, 000 instead of Rs.10, 000?
  • What if he did that on purpose?

How can we be sure that the data in the register will remain secure?
I want you to think for a while.
What does transferring money mean?
Will we always need to depend upon the third party to transact?

OR

Is it possible to maintain the register among ourselves without needing banks or third party?

You’ve guessed it correct.
The Blockchain is the answer to this question. It is a method that allows us to maintain that register among ourselves without having to depend upon a third party to do it for us.
We’re not going to get into the technicalities and complicate it. All you need to remember as you read the rest is that:

  1. It is a digital method of transaction.
  2. It does not require bank or any third party.
  3. It uses digital currency.

Confused? Hang in there. We’re heading closer to solving the mystery.

How does Blockchain work?


This process requires you to form a group with a minimum of three people, willing to give up on the third party.
Let’s take 20 people for our example. They will have details of each other’s accounts. Their identity, however, will remain unknown.

1. An empty folder

  • Everyone in the group has an empty folder.
  • These 20 individuals will keep on adding pages to the currently empty folders as they progress.
  • This collection of pages will create the register that tracks all the transactions.

2. Making the transaction

Everybody will start with a blank page to record all the transactions that happen within the network.

Now #3 wants to send Rs.1000 to #9.

To make the transaction #3 announces  by saying ” I want to transfer Rs.1000 to #9.”

Note: Every member of the network records every transaction that happens within the network.

Jargon Alert: The members of a blockchain are referred to as ‘nodes’.

 The transaction is now regarded complete.

3.Transactions increase

 More people in the network start transferring money to each other.  They follow the same process and announce to everyone else. Everyone then records the transaction on their pages as soon as they hear the announcement.
This activity continues until everyone runs out of space. For our example, let’s assume that the page has the space to record 20 transactions. Everyone one will run out of space as soon as they record the 20th transaction.

Since we no longer have the space to record new transactions, we will have to put away the page.

Jargon Alert :  I’ve been referring to the money in Nepalese currency to help you understand the process easily. The actual transaction uses cryptocurrency (digital currency) like Bitcoins and Ethereum.

4. Putting the page away 

A unique key, which all the members have agreed upon is used to lock the page. It ensures that no one can go back and change the data, once the page is locked and put away in everyone’s folder.

Jargon Alert: This process is called mining, but we’ll call it ‘locking’ to keep it simple.

The lock provides us with the security that the middlemen used to provide before i.e. the contents of the page won’t be changed.

How do you lock the page?

It’s important we understand how the lock works before learning about how to lock the page.

The Mystery Box

Imagine a box. If you send something inside the box (input), it will spit it out in a code made up of alphabets and numbers (output).

Jargon Alert: This is called hash function, but we want to keep it simple so we’ll call it the mystery box.

If you send number 6 into the box it would spit it out as ‘vgfhrt3’

Nobody knows what magic this is but we do know that is irreversible.

It is impossible to tell what was fed into the box, by looking at the output. But every time you send number 6 in will spit out vgfhrt3.

Note: No matter how many times you send a particular input, it will always generate the same output.

Now, I want you to tell me what I should feed the box to get an output that starts with three zeroes like ooo3e, ooodf, oooyu or any of the three.

Take your time and think

I’ve just told you that it’s impossible to guess the input by looking at the output. So, how do you find the answer?

I know!

Why don’t you try every number you can think of one by one until you get the desired output.

How do you use this box to lock the page?

Hopefully, after a thousand failed attempts, you will end up with the one that generates an output that starts with three zeroes.

It is extremely difficult to find input from a given output, but surprisingly easy to verify whether a given number generates the desired output.  All you have to do is feed the number into the box and check the output it spits out.

Remember this property of the box (hash function) as you read the rest.

  • It’s extremely difficult to calculate input from the output
  • It’ extremely easy to verify if an input leads to the stated output.

We’re going to practice on a hypothetical situation.

Imagine you have two containers. The first one contains the number ‘67558’. Then I ask you to find out a number, when added to the first container and sent into the mystery box will generate an output with three leading zeroes

We faced a similar situation before, and we know that the only way of finding the answer is by trying every number in the universe.

After a thousand attempts, we will stumble upon a number say 10302, when added to the number 67558 (67558+10302 = 77854) and fed into the box, will generate an output that fits the requirement.

In such instance, the number 10302 becomes the lock for number 67558.
Now imagine a page that contains the number 67558. To lock it, we will cover it with a shield labeled 10302. As soon as the number 10302 is attached to it, the page is locked.

Jargon Alert: The locking number is known as ‘Proof of Work’ which signifies that this number is the proof of the efforts made during the locking process. But we’ll stick to the locking method.

To verify whether the data in the page were altered, you just add the content of the page to the locking number and feed it to the box. If the output is a word starting with three zeroes, the contents were not altered. If not, the contents of the page were changed. This page is of no use now.

We’ll use the similar mechanism to lock all the pages and ultimately manage them in respective folders.

Locking our page

First, we must discover a number, when added to the prior transaction and fed into the box, will generate an output that starts with three zeroes.

Note: I am using the ‘output starting with three zeroes’ only as an example to explain the ‘hash function’ in a simple term. The real equation is much more complicated.

The page is locked with the number, once it is calculated. You can easily verify if someone has changed the data or not, by feeding the calculated number into the machine.

Are you with me?

I hope you remember that after the 20th transaction is recorded everyone in the Blockchain runs out of space.
As soon as they run out of space, they move forward to determine the locking number to lock the page in the folder.

Everybody in the network can do the calculation but the first one to figure out the number, announces it to everybody else.

On hearing the number, everyone confirms whether it generates the required output or not.  If it does, everyone marks their page with the number and puts it away in the folder.

 What if for someone, the number does not yield the required output?

For instance, # 17 didn’t get the required output. The probable causes could be that

  1. He might’ve misheard the announced number.
  2. He might’ve miswritten the announced transactions.
  3. He might have tried to cheat to benefit himself or someone else

Despite the reason, #17 only has one option; to get rid of his page and copy the list of transactions from someone else, so that he can put his page in the folder.  #17 won’t be able to perform any transactions unless he locks his page and puts it away in the folder.

Note: The number upon which majority agrees upon becomes the locking number.

Why does everyone spend time and electricity calculating the number when someone else can calculate and announce it to them?

Yes, there’s an incentive.
All the members of the blockchain are eligible for it, but only the first person to work out the number gets free money as a reward for his efforts.
Let’s say #6 calculates the locking number. He gets Rs.2000 as a reward, that is created in the process. In other words, the account of #6 is increased by Rs.2000 without decreasing Rs.2000 from anyone else’s account.
This is how Bitcoins came into existence and was the first money to be transacted in blockchain. It is rewarded to encourage the efforts.
Once everyone puts their pages away in a folder, they take out a new page and continue the same process.

Jargon Alert: Think of the page as a block and the folder as a chain of pages that contain the list of transactions, which makes it a Blockchain.

And that is how Blockchain works.
Hang on! There’s still one tiny little thing we need to know about.
Imagine there are 6 pages already locked and tucked away in the folder. What if someone goes back and alters the data to favor themselves?
No worries right? Because the locking number will easily notice the irregularity.
What if I calculate a new locking number for the modified transaction and mark the page with the new locking number?

Is Blockchain secure?

Well, there’s a little twist which protects the locking numbers from modifications.

Earlier I gave you two containers, one with number 67558 and one empty for you to figure out the locking number. There are three containers, in reality, two are already filled and one needs to be calculated.
The contents of these three containers, when added and fed into the box, must yield the required result.
So, we know that one container has the list of transactions on the page, another contains the locking number. The third container consists of the output of the box for the previous page.

This trick makes sure that each page is linked to the previous page, creating a link.  This link makes it very difficult to modify the contents or the locking number. If someone wants to modify a page, he has to change the contents and the locking number of all pages after that.

If one person, out of the 20 we assumed before, tries to modify the contents of a blockchain  (the folder containing locked pages), he will have to alter several pages and also re-calculate the locking number for them.  Since it’s very difficult to calculate the locking number, one dishonest person will not be able to beat 19 other honest individuals in the network.

The dishonest guy creates another chain from the modified page, which won’t be able to catch up with other chains in the network; thus, ensuring that the longest chain is the honest chain.

What if 11 individuals instead of 1 turn dishonest?

This called the 51% attack. Blockchain is built upon the assumption that majority of the crowd is always honest.

The only reason blockchain might fail is If the majority of individuals in the network decide to turn dishonest.

That’s the only reason why blockchain might fail. However, this is rare to happen.
And that,my friends, is the end. If you ever find someone who wants to understand  blockchain in the simplest way possible, you know where to point them to.

please click here to download the full article.

Chat Now
💬 Need help?
Scan the code
Hello 👋
Can we help you?