Why do we need Blockchain ? and how does it work ? ELI5
A simple post to understand Blockchain in detail, in simple, non-technical, non jargon way. We start with why does it exist ? do we even need it ? is it a fad or the new internet ?
Before deep diving into what blockchain is and how it works, let us first ask some basic questions like why does it exist ? which problem is it solving ? was there a need for something like this or is it just a glorified ledger ?
By the way, I write occasionally around Product and Growth in digital space and SNT in the tech space. Do subscribe to get thoughtfully crafted short scripts in your mailboxes
Do we need Blockchain ?
Now to answer these questions, let us consider a simple example of two friends, Avi and Sam. Sam and Avi met one Saturday afternoon, Sam liked Avi’s watch and couldn't stop admiring it. Avi being an opportunist saw through his friend Sam’s curiosity, and offered to sell him his watch for Rs. 500, Sam negotiated for a while and they settled at Rs. 350. Sam being the extra careful said, wait what if you change your mind someday and want this watch back and deny of this exchange ever happening ?
To validate this exchange, they called upon their third friend Yug. Yug records the exchange and gives it a go ahead, but in return he charges 5 bucks from each parity for his services. Yug has a good reputation and his signed transactions are accepted across.
Avi got 495, Sam paid 505, Yug milked out 10. All thanks to lack of trust amongst Sam and Avi.
but here’s what is wrong with this transaction:
Yug is a singular entity
Trust is outsourced
Singular entity is destroyable and corruptible, we don’t trust ourselves but a third party ? it is as fallible as we are.
What if we were to maintain the trust amongst ourselves without relying on an entity ? how would we achieve that ? the answer to these questions my friend is Blockchain
What and How does the Blockchain works?
To simplify how it works, let take an example, we have 5 friends
Avi, Sam, Yug, Ram and Rio
They all have 5 empty files, 5 blank sheets, 5 modifiable stamps and 5 scientific calculators, one owned by each. Some transaction happens amongst them, they all record them into their sheet of paper, simultaneously. They keep making and recording transactions until their sheet of paper is filled and it can no longer record anything extra.
Now, to ensure this is the first page for all they write the Pagecode of previous page on the sheet which is 0. (if this is not the first page, they write the random value generated by their calculators aka Pagecode, for the previous page in the folder)
Page code is output of hashing function, generated when any block is signed and added to a blockchain, more on this page code below.
Finally they decide to seal and save it securely in their folder. But how to ensure everyone has corretly entered the transactions and the previous page number, how can they validate this in unison? We need a seal of Trust(one of the core problems)
Yug says, folks, I have a method, why don’t we all convert our transactions(current page data), previous page code and a random value/sealing, which when combined and fed into our scientific calculators gives out the pagecode for this new page ?
But here is the catch, Current page code must start with 123asd……
now, here is the situation, we need to find the right value for Sealing code so that adding it to Previous page code and current page data we get the desired output as per the format(123asd….)
Only way to do this is, try infinite values one by one and see the outcome in the calculator. The first one to come up with the desired output using the sealing code is Rio, he shouts I did it, and says the Sealing code is 221144.
Everyone hears this code, stamp their sheets with this number, noting the pagecode for future reference.
Rio obviously gets a reward for finding the sealing code first and sharing it with the network.
Calculator is the hashing function
Sealing of page is called Mining
Sealing code is Proof of Work
Each sealed Page is a block
The pages stored in a sequence is Blockchain
This is how blockchain works, an ordered sequence of blocks, where each block is linked to the previous one.
Are the 2 issues solved ?
Trust lies with a singular entity
Trust is outsourced
Here, the trust factor is played by the sealing number. if the sealing number is correct, and it gives out correct pagecode when fed into the calculator with page data and previous page code, then that means the data on the page is also correct.
Anyone of the participants can solve the puzzle and generate the sealing number, hence no singular entity owns it, on the top all the participants try to do sealing hence all are part of the network(trust is not outsourced)
If anyone was to turn rouge and tamper with page data, then he would get a new page data, hence a different sealing number, also the pagecode would change. So it is extremely difficult to tamper with the data in the folders/blockchain.
But you know what there are ways to bypass this sealing and commit fraud, blockchain is not 100% immutable there are chances of fraud, more on this later.
Further reading :
http://www.imponderablethings.com/2013/07/how-bitcoin-works-under-hood.html
https://www.ted.com/talks/bettina_warburg_how_the_blockchain_will_radically_transform_the_economy?language=en
https://hackernoon.com/wtf-is-the-blockchain-1da89ba19348