paint-brush
Beginner’s Guide to Blockchain — Explaining it to a 5 Year Oldby@_sidharth_m_
40,424 reads
40,424 reads

Beginner’s Guide to Blockchain — Explaining it to a 5 Year Old

by Sidharth MalhotraAugust 15th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This is a two part series. You can find the link to the follow up article at the end of this article.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Beginner’s Guide to Blockchain — Explaining it to a 5 Year Old
Sidharth Malhotra HackerNoon profile picture

A Simple Guide to Understand Blockchain with a Real World Analogy

This is a two part series. You can find the link to the follow up article at the end of this article.

Everyone is talking about Bitcoin these days, from your barber to your friends working at stock market. Don’t worry this article is not about several other articles talking about making money from Bitcoin. However, I will try to help you understand the underlying technology which makes Bitcoin work and how this concept of blockchain can be useful in the coming decades.

Historical Overview

October 31, 2008, a white paper from an anonymous person or organization named Satoshi Nakamoto was published which explained a novel approach to send money from sender to receiver directly without involving any financial intermediaries. The paper gave a name to this concept — Bitcoin. Since, Bitcoin uses some underlying concepts of cryptography, this new way of exchanging money was categorized as cryptocurrency. The only purpose of Bitcoin was for financial transactions but researchers realized that its foundational technology can be harvested to build other secure and robust applications that can revolutionize the way current systems work. “Blockchain” was the name given to this foundational technology. Lots of technical words? Let’s simplify!

What is Blockchain? — A Real World Analogy

Let’s imagine that you live in a city, which has a big parking space to park 200 cars at one time (assume that the parking space just has a ground floor). This parking space has a main gate which stays locked and is only opened when a car moves in or out. Now let’s analyze this single parking building from different points of view —

  • Price: Since some private company built this parking space exclusively for parking purposes and all the maintenance cost will be beared by the owner company, there will be a high renting fee for renting out a single parking space.
  • Security: If thieves get access to the main door, they can easily get to your car (take its wheels, or fuel, or damage the brake, anything!)
  • Limit: What if the number of cars in your city grow from 200 to 300? The parking space will not have enough space for all cars and some other private agency will have to built a new parking space.
  • Trusted: You trust the parking space company and they are responsible for taking care of security and reliability.
  • Centralized: Since all the cars are in one building, we can consider it to be a centralized parking.

Now, let’s modify the current scenario. Imagine that there are 200 houses in your city and all 200 houses have two garages each. However, to simplify our explanation, let’s assume each house just has one car (all cars filling up all the slots of big parking space described above). So, each house has one empty garage out of the two garages available. Now, let’s say people of the city decide to rent out the extra garage to anyone who needs a parking. This model of providing parking space will solve the problem of parking 200 cars or more cars (in case people move in and out of the city) without the need of building any central bigger parking space for the entire city. Similar to the previous scenario, let’s analyze this scenario —

  • Price: Since people didn’t built the second garage exclusively for renting purposes and the cost of maintenance will be little, the cost to rent that extra space will be low comparatively to the big central parking space
  • Security: Each car is locked in a different garage therefore thieves will have to unlock all the garages to get access to the cars, thus providing more security. (Security in blockchain is a bit different but for simplicity let’s consider it this way for now!)
  • Limit: As the number of houses grow, assuming each new house also has extra garage space, the space to keep more cars will keep increasing. Thus, increasing the network of lessee and lessor.
  • Trustless: Since, no central authority controls these distributed parking spaces, we assume that there will be certain rules set by all the participating garage owners for renting out their places.
  • Decentralized: As mentioned in the previous point, these parking spaces are distributed throughout the city, we can consider it to be a decentralized parking.

The above analogy provides the foundation for understanding the actual technical infrastructure of the Blockchain.

Parking Model to Technical Model

The parking model presents a very basic overview of Blockchain in some real world language. Now, let’s try to match the components of our parking example to the actual technical model —

  • The big central parking is a centralized system like AWS, Google Cloud etc. (these cloud platforms are also distributed at some level but for the sake of simplicity, we will assume them to be a single entity).
  • The cars are the data and applications.
  • The distributed parking is a decentralized system — Blockchain.

Wait! We missed something.

All decentralized systems are not Blockchain!! Yes, Blockchain is a particular type of decentralized system that has a unique property. Which property? Let’s talk about it.

“Blocks” make Blockchain

Let’s revisit our distributed parking example and make a small change. Let’s assume that the lock to a particular garage is generated when a car is parked inside it (we assume that the same car goes to the same parking everyday). Also, assume that we have numbered all the distributed garages in serial order. The lock-key pair of garage #50 is based on the lock-key pair of garage #49 and also on the features (like color, weight, engine number etc.) of the car parked inside garage #50 and this process starts from garage #1 and moves till garage #200 or even more.

Each garage’s lock-key pair depends on the garage’s car features and previous garage’s lock-key pair.

Therefore, if a thief tries to break into garage #49 and modifies any feature of the car, say its color or registration number, the features of car in garage #49 will change which means a new lock-key pair for garage #49 will be generated and since lock-key-pair for garage #50 depends on lock-key pair of garage #49, lock-key pair for garage #50 will also change and same goes on for future garages.

Now, let’s make one last assumption that computing a lock-key pair requires lots of computing resources which means if we have to recompute these pairs in case any thief modifies any car feature in any garage, it will be practically impossible to recompute all the pairs again.

What happens if a lock-key pair is changed?

Hope you remember that we talked about all garage owners abiding by some rules? One of these rules is to check for a valid garage. A garage is valid if you can validate its lock-key pair and if any lock-key pair gets changed, the lock-key pairs of all the following garages get invalid because every pair depends on the previous pair. (Process to validate a lock-key pair for a particular garage is very fast as compared to generating one).

This dependence of one pair on the previous pair makes it a chain of garages and in technical world, these garages are “blocks”, thus getting its name — Blockchain (a chain of blocks).

Blocks in Blockchain are tied to the next block by hashes just like lock-key pairs in our example. Similar to garage example, if data in one block is modified, hashes need to be recalculated for all the following blocks and since calculating the hash is a very resource intensive operation, it gets practically impossible to do that and hence the network rules out the invalidated block. The calculation of hash is called mining and we will talk more about it in the next release of this series.

How do the blocks recover from modification?

All the computers on the blockchain network, keep a copy of the full blockchain, so if one block or one complete chain at a particular computer or multiple computers is modified, the whole network tries to compare it with their own copies of the full chain.

If majority of the nodes (or computers) on the network find that the modified chain is invalid, the modified chain is replaced with valid chain from other nodes. This makes Blockchain vulnerable to 51% attack. In simpler words, if more than 50% of the nodes on the network are malicious (or say have a modified chain), then the whole network can be compromised.

Conclusion

Phew!! that was a lot of information to digest. This was the part I of the full beginner’s guide, providing the basic foundation for Blockchain. I hope this article prepared you for some good discussion with your friends regarding Blockchain. Checkout the next release of this series where we talk about Ethereum, Smart Contracts and Mining.

If you enjoyed reading this, please click and hold “Claps” below and help your friends find it by sharing it with them. Thank You! :)

This was the first release of the series “Beginner’s Guide to Blockchain”. You can check out the second release here.