BlockChains explained to a 5 year old child! [Part 2 of the tutorial series on Ethereum DApps]
We discussed about Public Key Cryptography, Hash Functions and P2P network in the previous tutorial available here. For those who have not read it, please go have a look as it explains these “tough sounding” concepts in a very simplified manner.
In this article, we will mainly talk about blockchains. I have taken references from some resources on the internet and rightfully mentioned them after the article. This is just my take on the explanation they have provided. Writing something I have learned helps me retain the knowledge longer and also helps me spread the knowledge to others who might not know about it :)
In the next article, we will set up our development environment in under a minute! [Available here]
We are 2 friends sitting in a park. You are Alice, I am Bob.
I have a toy. You have none.
I give the toy to you.
Now you have a toy. I have none.
Pretty Straightforward, right?
I had a toy. I gave it to you. We did not need a third person to make the transfer for us. I can’t give the toy to someone else because I don’t have it anymore. Whereas you can give it to whomsoever you wish to. And they can give to whoever they want to and so on.
Now suppose I have a digital toy.
I give you my digital toy.
Wait.
How do you know I didn’t give the digital toy as an email attachment to Charlie first? Or I saved a million copies on my laptop and gave it to everyone on the internet?
So, sending digital toys is not the same as giving physical toys.
This problem is called the double-spending problem!
But isn’t the solution very simple?
We can maintain a ledger. Similar to what people at shops maintain. An account book, where all the transactions are recorded.
So, there will be a ledger where all the transactions of digital toys will be recorded. Someone, say Danny will be in charge of it.
Problem Solved, right?
No.
Because how do we know if Danny is not cheating and adding digital toys to his and his girlfriend’s account anytime he wants?
Also, why do we need to involve Danny in transactions that concern only you and me?
Enters BlockChain!
What if everyone had a copy of the accounting book on their computer and all the transactions that ever happen are recorded there.
This is tough to beat. Now Danny can’t add toys that he doesn’t have to his account. Because then it wouldn’t match with everyone else’s book.
Everyone who has a copy of the ledger on their system and maintains it by validating the transactions get digital toys as rewards. This is the way digital toys are ever produced.
This is blockchain. And these toys that I was talking about are bitcoins or for that matter anything of value.
The ledger is visible to everyone.
Now we don’t rely on a third person (Danny) to maintain our balances for us.
We don’t need to worry about the double spending problem.
This is a very simplified story but if you understand this well, you know more about blockchains than many people in the industry. And to develop DApps this much knowledge is enough for now. Rest we will figure out as we will move forward.
If you enjoyed reading this article, hit the little green heart button to show your love! It gives me the energy to write more :)
To stay updated for the next article in the series, please follow :)
And if you want your friends to read this too, click share!
References: https://medium.com/@nik5ter/explain-bitcoin-like-im-five-73b4257ac833#.iigacc6wt