Analogy to understand Bitcoin, Proof of Work and Cryptocurrencies

in bitcoin •  7 years ago 

Imagine that there is a block of lockers in a public place, lets say a central station. These lockers are completely transparent so everyone in the public space can see what is inside of them.

When a wallet is downloaded and an account created, is similar to get one of these transparent lockers and the key to open it :key:. There are no other copies of this key, if the key is lost, everything that is inside the locker cannot be retrieved anymore. Every locker only have a number, personal data is not related with this number, in this way privacy is offered, nobody has access to your private information only to your locker number, unless the locker number in some way be tied to you, is when privacy is lost.
If you want to make a transaction, lets say you have the locker box 1 and want to send a certain amount of bitcoin to locker box 2, in reality you don't do this directly but in fact you create a funds transfer order to send the amount from locker 1 to locker 2 and place that order in an inbox (Mempool) :inbox_tray:.

A person that offers the service to validate and process the orders (called miner in bitcoin terms), is going to grab several of these orders and he is going to validate and process them, in the case scenario presented he is going to validate that locker 1 has enough funds to transfer the desired amount of bitcoin to locker 2, but to process the transaction he needs to follow certain rules.

In reality there are several persons that offer these services, but only one of them is going to process your transaction, so to decide who is going to process your transaction, they are going to compete for it.

To start, a miner needs to have a copy of all transactions that have been processed in the whole history since the system was born, those transactions are packaged in groups (called blocks :white_large_square:) and each package is tied to one another one in sequence in time (called block chain). Lets imagine that those packages are pile up from the oldest at the bottom to the newest at the top, and nobody can extract one package from the middle, because if that is done, all the packages piled on the top of that one fall down and they are not useful anymore.

There is an agreement that the miner who has the longest pile of packages, he has the valid pile, and everyone else should add a copy of the missing packages from the valid pile to their own pile, so removing a package from the middle is not a wise decision.

As each miner has his own pile of packages of all the transactions already processed, he is going to grab a copy of several fund transfer orders from the inbox, he is going to validate if locker 1 has the enough funds by going through all the transactions related to locker 1, all transactions that received bitcoin minus all transactions that sent bitcoin. If there are enough funds to transfer the desired amount to locker 2, then he is going to start a new package with this order and he is going to continue adding validated fund transfer orders copied from the common inbox.

These services miners provide are not free, miners charge a transaction fee and also for a certain period he is allowed to create an order that creates new bitcoins and transfer them to his own locker. When the package is done he is going to seal it in a way that fund transfer orders can be read but the package cannot be modified anymore.

Note that miner grab copies of fund transfer orders, that means that a single fund transfer order could be copied by more than one miner. As each miner is constructing a transaction package only one of them could place the package on top of the pile. They compete to be selected for putting the package on top of the file. The competition consists in solving a mathematical problem that is difficult to find the answer but once is found everyone could validate the answer easily. The fact that I have the answer to a problem that everyone else is able to validate easily is called in bitcoin terms Proof of Work (PoW). The difficult of the problem varies depending on the number of miners that are competing, if there is a large number of miners the difficult increases, if there is a few miners the difficult decreases.

If I am the miner that solved the problem first than everyone else, I am allowed to place my package on top of the pile and notify everyone else about this, remove the orders from the inbox and the value is transfer from source lockers to target lockers. All other miners verify that the answer is correct, if this is the case they copy the package I created, and pile it up on their own piles, they destroy the package they are constructing and start a new package again by grabbing copies from the inbox.

Could be possible that if you are a miner too, and you didn't received my notification that I already solved the problem and pile up a new package on top of my pile, you continue solving the problem of your package while everyone else that received my notification is already working on the new package that is going to be on top of mine. When you solve your problem it is probable that someone else already solved the package that goes on top of mine, you notify that you solved your problem and placed your package in top of your pile, every one else is going to tell you that there is already a larger pile and therefore the valid pile, so you need to remove your package from the top of your pile and copy the missing packages and start an new package again.

Bitcoin characteristics

Transparency.- As noticed, everyone can see what is inside each locker and everyone can audit all transactions in the largest pile. So everyone can check and enforce the agreements or rules.
Privacy.- As long as the box number is not tied to you or your personal information, there is privacy.
Distributed vs centralized.- As you noticed there is no central authority, everyone has a copy of all transactions removing the single point of failure and everyone is in charge of respecting and enforcing the rules.

Bitcoin problems

Waste of energy.- Solving mathematical problems leads to require large computation power that consumes electricity :electric_plug: and produces heat :sunny:.
Disagreement on the community.- As you see, everyone should agree on the rules, but there could be disagreement inside the community :family: causing fractures.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!