paint-brush
Beginner’s Guide to Blockchain — Explaining it to a 6 Year Oldby@_sidharth_m_
9,297 reads
9,297 reads

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

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

Too Long; Didn't Read

This article is the followup to <em>“</em><strong><em>Beginner’s Guide to Blockchain: Explaining it to a 5 year old</em></strong><em>”. </em>If you haven’t checked out the first part yet, you can do that <a href="https://hackernoon.com/beginners-guide-to-blockchain-explaining-it-to-a-5-years-old-772caac6ae97" target="_blank">here</a>.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

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

A Simple Guide to Understand Blockchain with a Real World Analogy — Part II

This article is the followup to Beginner’s Guide to Blockchain: Explaining it to a 5 year old”. If you haven’t checked out the first part yet, you can do that here.


Beginner’s Guide to Blockchain — Explaining it to a 5 Year Old_A Simple Guide to Understand Blockchain with a Real World Analogy_hackernoon.com

In this article, we will continue with the example of parking garages presented in the part I to explain the concepts of Cryptocurrencies, Mining and Smart Contracts.

Ethereum, Bitcoin or some X-coin

Everyone of you must have heard at least once about any type of X-coin whether its Bitcoin, Litecoin, Ether or any other coin. What are these? These are cryptocurrencies, getting their names from cryptography — the concept that powers the underlying technology of your favorite coin. But, why we need these digital coins? Apart from sending money to your friends or receiving some from them, these coins are used to incentivize the computers on a Blockchain network. Woah! To much of technical jargon!! Let’s move back and bring in our parking garage example in to the picture. :)

Pay for the Garage vs Cryptocurrency

If you remember from previous article, we mentioned that garage owners will rent their parking spaces to those in need. Now, you might be thinking, how would a lessee pay the lessor? Simple! through the bank transfer. But why would someone share their bank details with a stranger in case they are renting their garage? That’s a valid question.

Let’s solve this problem by using a Paypal (or any other digital Wallet). The garage owner uses their Paypal email address to receive payments. This way they don’t have to share their bank details to strangers. Did you notice something in this situation except privacy? Yes! anonymity. By using an email address to receive payments, the garage owner can stay completely anonymous to the tenant and same goes for the tenants as they will also be paying from their Paypal accounts.

Now, let’s compare this with cryptocurrency. In crypto world, it's almost the same except with a small difference that instead of using an email address you use a Bitcoin or Ethereum or any other coin’s wallet address, which is unique to you. You send the coins from your X-coin wallet to the receiver’s X-coin wallet. Since, the network is full of strangers so revealing bank details for money transfer would be a big problem. Therefore, using wallet addresses facilitate the users to send and receive payment by staying anonymous to everyone on the network and this is also one of the reasons why some countries have banned crypto or why it is very popular in the illegal world.

If you are with me till this point, I am sure you must be thinking that you can transfer money from bank to Paypal but how does that happen in crypto world? Let’s look in to this!

Genesis of the First Coin or New Coins

Just like transferring money from your bank to Paypal, you can transfer money from your bank to you X-coin wallet by buying coins from some registered Exchange. But, the question here is, how the first X-coin came into existence or how new coins are added to the system? But before we answer this question, let’s take a look at another familiar term “mining”.

WTF is mining?

If you remember, in the previous article, we talked about computation (process to calculate lock-key pair) and validation (process to check if a lock-key pair is correct or not). Let’s assume that all the garage owners participate in the process of calculation of a new lock-key pair, which requires lots of computing power (brain power) and time (Just like those tricky calculus questions you got stuck at during your high school). So, the rule of this game of computation is whosoever calculates the correct value first, wins! (Just like a quiz round in your high school you can say!). This entire process of computing the correct lock-key pair is termed as “mining”.

But why would a garage owner spend time to work on computing a lock-key pair? We need to incentivize them! Let’s assume that the winner gets a cash prize, similar to the cash prize you got after winning the quiz at your high school.

Did you notice one thing here? The prize money is the money that wasn’t with the garage owners before (or you can say it wasn’t a part of the parking system before). It is the fresh or the new money that was introduced to the garage parking system after mining in the form of prize money. Now, let’s use this analogy to understand the mining in crypto world.

Crypto World Mining

As you know from the previous article that all the blocks in blockchain are safeguarded by hashes, which are calculated based on previous block’s hash and current block’s data. Thus, binding all the blocks in a chain. This hash computation is resource intensive because it requires you to hit and trial every possible value to get a correct hash (just like what garage owners did). So, the more values you can try per second, the faster you will be able to compute the correct hash (This is why you might have seen your friends buying big machines to mine Bitcoin or any other X-coin).

But the same question arises again, why would someone lend their computer to the X-coin network to perform these resource intensive computations? Correct! the same answer — incentives. Any computer that is able to calculate the correct hash first is awarded with a new X-coin. This new coin wasn’t a part of the system before. This is how the new coins come into the system.

But why the name “mining”?

Well, all the cryptocurrencies are considered to be digital assets or commodities just like the Gold or the Silver or any other metal or mineral. Since, the process of extracting these metals from their mines is known as mining, the cryptocurrencies computations also got the name “mining” because mining brings a new coin to the system.

Now, let’s move out of the cryptocurrency world and dive in to application development on Blockchain!

Decentralized Applications (DApps) & Smart Contracts

If you remember, I mentioned in the part I of this article about researchers realizing the benefits of the underlying technology of Bitcoin (which is Blockchain) for different applications apart from just cryptocurrencies. This is where smart contracts can be useful. Before we dig in the technical side. Let’s continue with our parking example. For a moment let’s assume that there is no prize money included for mining winners (Why? we will discuss in the next section).

Consider that, you have to pay for moving your vehicle into the garage. So, to simplify that, every garage has a fee collecting machine outside it which allows you to read a barcode using your phone and send in the payment from your Paypal. This machine collects the money and as soon as the garage is closed all the garage owners start computing the lock-key pair (mining) and once that garage’s lock-key pair is generated, the machine sends that money to the garage owner who won the mining contest.

The fee collecting machine in the above scenario is a smart machine because it figured out on its own, whom to send the collected money once lock-key pair was generated. And in case anything buggy happens like, a technical error, the machine refunds you the money and either you can pay again or can take your car out.

Similarly, on Blockchain this smart machine is called smart contract — a piece of code that does everything for you on blockchain. As all garages have smart machine, all the computers on the Blockchain have a copy of the smart contract. So, when you send money, it makes sure that you have enough money to send and the receiver gets the money and in case of any error, it just reverts the transaction.

However, smart contracts are not just for money transactions, you can use them to store or modify data on the Blockchain which can be Youtube like model for videos (such as Viuly), or a dropbox type model for storing files (such as Storj.io or SiaTech) or even games like Cryptokitties. The list of use cases is endless!

What Happens When No New Coin?

Do you remember that in the previous section, we assumed that there is no prize money to the winners for computing correct hash value. This gives birth to a new question — Why would someone rent out their computers in case they will not be rewarded with any new coins? Yes, you know the answer. Just like, the fee collecting machine outside the garage collected money and gave it to the winning garage owner, every transaction on the Blockchain costs a very small fraction of money. This small fraction is deducted from all the transactions. When a block on the Blockchain is mined ( its hash is computed by all the computers on the network), the computer winning the mining contest, gets the money deducted from all the transactions mined in that particular block (each block contains a fixed number of transactions) as a reward or incentive. This keeps the crypto model sustainable even after no new coins are issued. Now you know why your friends are buying big machines!

Conclusion

Bravo! You finally acquired the basic knowledge about the Blockchain and its components. I hope this series of articles helped you strengthen your foundations in this emerging technology. From here on, if you are a tech person, you can start learning about developing applications on Blockchain or even setting up your own Blockchain.

However, if you are a non tech person, you can start looking out for problems that can be solved using Blockchain. This will help you deepen your knowledge about the application part of this amazing technology.

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