In 2008, a research paper was released by a person under the name of Satoshi Nakomoto. Yes; you guessed it right; his real identity is still not known to the world yet. What Satoshi introduced in his paper was an idea to change the basic underlying infrastructure of the way we transact and which could lead to elimination of banks from the whole flow. There are a few different parts which we have to delve into, to understand how Bitcoin can do that.

What is it that Bitcoin is solving ?

In the first section; “The History of Money”; you remember we talked about people switching from physical gold to depositing their gold in banks and getting receipt in exchange for that to transact. The banks solve two purpose in this case;

Provides you with an account with the legal contract that you own some specific amount of physical gold. Act as a central trust organization who can take care of transactions by checking for how much everyone has and accordingly allow transactions.

Now ask yourself, why do we need banks again? Without it; who will make sure that someone sending money has enough enough for the transaction to happen? Again, we are talking about transferring virtual money; checks and receipts; instead of physical gold. It would all work well if everyone is honest. Let’s consider three people involved in transaction. A, B and C. The condition is that at any point only two people can talk. A and B both need to give half a million dollars to C so that he can build his home. B doesn’t have the money; so A lends it to B so that B can give to C. B can then give the money to C. A can also give C the remaining half million dollars. C now knows from B, that A and B have half million dollars and the same information from A. All is well and C can build his beautiful home. But what if B was lying? A gives B half a million dollars and B tells C that he has received $750k from A(remember only two people can talk at once), gives $500k to C and keeps the rest in his back pocket. Again, its just virtual currency and anyone can change the digits at any point. Now A transfers $500k to C, but from the transaction from B, C knows that A should only have $250k. Also, since the transactions are happening in real time, it takes the same time for transaction to happen from A to B to C and from A to C. C will also be confused as to if he should accept the transaction from B. Any one of them could be lying. But, how does C know who is lying? Even if you add few more people into this, it takes only one person for this transaction to fail. We need some third party to verify the accounts of everyone. This is what a bank does; in nutshell).

So, how to solve this problem of transaction between people without getting banks involved or having a decentralized system? This is the problem that Satoshi was able to solve in his paper and the problem is commonly referred to as Byzantine General problem. Lets add some more people in this mix and try to understand the solution.

Obama initially has $100 from which he gives $50 to Trump and $50 to Hillary. Trump cheats the $50 transaction; changes it to $75 and gives $60 to Bush. Bush gives $50 to Hillary. Also, Obama gives $50 to Hillary. But, Hillary now knows that Obama should only have $25 left as per the transaction record that it got from Bush; so can she accept this transaction? Also; note that all transactions happen in millisecond and you can assume that it takes the same time for the transaction to from Obama to Hillary as from Obama to Trump to Bush to Hillary. The system or rather Hillary is confused whom she should trust. How to identify that whether Obama has faked the transaction or it’s someone else?

Satoshi solved it using two techniques; cryptography and proof of work.

Let’s go through the problem again. This time, Obama gives $50 to Trump and also spends some time creating a hash (a magical string) which takes a certain time to create and is made from the transaction record that says Obama has given $50 to Trump. The hash is key here because it follows some interesting properties.

First, to create a hash you need some input and the similarity between input does not mean that output hash would also be similar. This means that even a slightest change in input can lead to a completely different hash which is why it is difficult to find it and takes certain time. We assume here that it takes 10 mins.

Second, even though it is difficult to create a hash from the input data, it is not difficult to verify once its created. You can easily verify a hash to say that it was indeed created out of the input data. In this case, once a hash is there anyone can verify that it was created from the underlying transaction that was sent along with it.

Now, Obama has spent 10 minutes to find the hash and once found sends the message to Trump along with the hash. Trump can verify that hash to make sure it matches the difficult level of 10 mins (a property of the magic string) and also its contents which basically is the transaction record. Once he does that; when he sends the money to Bush, he again has to spend 10 minutes on it to find a new hash. Now; this is where it gets interesting. If he were to hack the original transaction from Obama, he has to create a new hash that will correspond to the new fake transaction from Obama. Which means, he has to spend 10 minutes on this new fake transaction plus on the transaction he has to make to Bush. In total he has to spend 20 mins. If he does that, Bush and everyone else would identify there is something fishy going on. He cannot spend 20 mins on 10 min task. The only option he has is to spend time on this new transaction. As such no one really has the option of faking the transaction because it would take too much time to create hashes. Also, as new transactions happen it becomes more and more difficult to hack the system, since anyone, at any point of time will have to fake all the original transactions too. Woohooo! Everyone can now send transactions to everyone else without the need of some central authority.

How it works technically?

The example I discussed is a very basic use case which is used in a more advanced fashion in Bitcoin. The network can consist of miners (also users) and users. The miners are the one doing the job of verifying the transactions and hashing them. The hash applied is also in a different way. Every 10 minutes, all the transactions that happen are combined together to form a block. Consider this block as the unified transaction for which a hash string has to be generated. Now, the hash is a bit special. It should take exactly 10 minutes. This is achieved by making sure the hash is of specific length and starts with a specific number of zeroes. The technical representation for the code that generates the hash looks something like this

sha256(sha256(data+nonce))

Sha256 is a cryptographic hash function which can take in arbitary amount of data and produce an output string which 256 bits in size. nonce is the random integer that miners try to guess to make sure the hash qualifies the minimum difficulty level i.e has certain number of zeroes in front. This difficulty level keeps changing depending on the number of miners in the network. The data is the actual hash of the transaction data for all the transactions in the current block and the previous’ block’s hash. All of the blocks mined are available in a public ledger and anyone can see it. Check a sample block here to see how it looks like. As you can see the hash of this block is 0000000000000000014228823553852a90563fe84da5f0a5aa4832e85f68b1b5. The sequence of zeroes you see is the difficulty level that needs to be reached. Also as you can see, the block also has information about the previous and next block making the ledger a chain of block. That’s why the name “blockchain”.

Once a hash is generated by any miner, it is relayed to all other miners in the network (as well as verify the hash and the transactions in it are correct) and other miners upon receiving it, add it to their ledger which is also referred to as blockchain. Each miner upon creating a block is rewarded with some bitcoins and this prize keeps on reducing as the network grows.

Creating new Bitcoins and the incentivization model

After reading all this, you may tend to question the meaning of creating new bitcoins and the necessity of incentivizing miners. This is what I think is a masterstroke behind the original idea and one that was so powerful. For any network to grow you need adoption by users, especially in the case of currency; unless it is being used by a critical mass; it doesn’t justify its usage. Also, for the network to function, you need currency which will happen by creating new bitcoins. There are two ways of creating new currency; exchanging old currency with new one using a predefined fixed rate. This would have worked if all the governments of different countries came up with a plan and mandated everyone to do this. Good luck with that! The second way is the bitcoin way; you incentivize everyone who helps the network to grow by gifting him/her bitcoins. This way; you are creating new bitcoins and at the same time helping the network to grow. It is true that; at a later stage, for people to come on board, they would have to exchange their old currency with these bitcoins which only miners owe (or people who they transferred to); but it’s a double benefit for miner as part of their trust in network. Satoshi has set a predefined upper limit of 21 million bitcoins that can exist in the network. Why 21 million? It is all dependent on the block confirmation time of 10 minutes and the logic to reduce block reward by half every 4 years.

Source: StackOverflow

As to the question of why keeping the limit at all, apparently there is more than one explanation behind it.

By keeping a cap on the supply, it made Bitcoin more attractive and motivated people to buy Bitcoins in the hope that its price will increase. If there was no cap, there would be little incentive for people to take part in this network. Also, since there is a cap, it completely prevents government control over its supply and as such there is no scope of inflation. Many critics of the current inflationary system and the mechanism of central banks (including Satashi Nakomoto) are in support of this model.

With the supporters of the model there are also naysayers and critics to the inherent deflationary model of Bitcoin. There are two main arguments against it

Since the supply of Bitcoin is set to 21 million there is always a theoretical danger of people hoarding bitcoins in an effort to gain from its value. What this means is that, as more and more transactions start happening on Bitcoin network, the value will keep rising which will motivate more people to hoard it. But it doesn’t make much sense from a practical point of view. If there are less bitcoins in the network, it will restrict the scope of transactions which will in turn reduce the value of Bitcoins. This will motivate to sell or transact using bitcoins raising its value again. The second more critical argument is the implication it will have on central banks. If an entire country were to move on Bitcoin network, it will drastically limit what central banks can do to manage the economy. Essentially it all boils down to pumping more money which it won’t be able to do with Bitcoin.

This ends our current article on the crypto revolution. Stay tuned for the next article in this series which will look at how Bitcoin is just the tip of the iceberg in this revolution and how blockchain is a revolutionary concept that can disrupt other systems.