Bitcoin — It has been a buzzword that everyone talks about for about a decade now. Well, why shouldn’t it be? In March 2010, the value of bitcoin was just about $0.003. By the end of December 2017, its price was over $19,000. Currently, it is trading at about $9000. I agree it’s volatile, but imagine the returns that it would have given you if you were an early investor. (You can calculate it and get a bit jealous of not investing early). Bitcoin has created a lot of Millionaires, and it might continue to do so in the future.
Unfortunately, the majority of the population only understands Bitcoin in purely monetary terms. They do not follow the beauty of technology involved in it. Well, that’s what I am here for. I will try to explain to you the mechanism of how Bitcoin works, and hopefully, by the end of this article, you would be well versed with this technological revolution than the majority.
Before you understand a solution, it is essential to know what problem it is trying to solve.
Suppose it is your friend Ram’s birthday today. You want to give him some money so that he can spend it on whatever he wants. You give him a 2000 Rupee note ( You are pretty generous, aren’t you ). In this transaction, there is an exchange of the physical asset. You and I both know, I have given you a note of Rs 2000, and once I have transferred it to you, I no longer own this note. So, there is a clear distinction between who owns what.
Suppose you are using digital currency. You would be transferring the money digitally. This is where the problem begins. Because there is no physical asset involved, you can easily duplicate this money. There would be no proof that I have transferred this Rs 2000 to only Ram. Maybe I have transferred this to some other friend as well or used it in any other way. So, what I am mainly doing is double-spending my money. This problem is known as the “Double- Spending” problem.
So, how would you solve it? Have someone verify your digital transactions. They need to validate that your transaction is correct and ensure you would not double spend. Currently, the bodies responsible for doing this are the Banks. They ensure your wealth is secured digitally, and whenever you make any transaction, it reflects into your account, and your money is tracked accordingly.
You might be wondering if the problem is solved. Why did something like Bitcoin come up? Let me tell you an interesting fact. About 92% of the world’s currency is digital. You heard me right. It is not printed, but digital. Banks track all these huge amounts of money.
This is a centralized approach to solve the double-spending problem where banks ensure everything runs smoothly. But, don’t you think an enormous amount of power is given in the hands of a very few people ( Banks )? Only a few persons would control the entire world’s money. Also, in this centralized approach, banks are a single point of failure. Hackers would be waiting for an opportunity to make some money.
Enter Bitcoin. Bitcoin is a decentralized digital revolution started years ago when an anonymous man named Satoshi Nakamoto ( the founder of bitcoin, who is still unknown to this day ) created an ingenious mathematical wonder known as the blockchain, a decentralized database technology that empowers Bitcoin.
Do not worry if you do not understand some of the terms. We are just getting started with the article.
Suppose you want to send your friend a Bitcoin. You need a bitcoin wallet, your private key, and a bitcoin address. Think of a Bitcoin address as a transparent deposit box. It is password protected. Everyone can see what is inside it, but nobody can take anything or put anything in it. It can be opened by the password that only you possess, which is your private key.
When you want to send your friend a bitcoin, you will sign the transaction with your private key and then send out that transaction into the Bitcoin network.
Don’t get confused. It is similar to any other digital transaction that you do. Once you enter the amount that you want to send, you either provide your ATM pin, or your OTP, which is similar to the private key. Afterward, your bank gets the details of this transaction that you want to carry out. Your bank verifies it, and finally, your transaction gets completed.
The only thing that changes in your Bitcoin transaction is the process of verification.
Once you submit your transaction, it is sent to the bitcoin network. Here is where the magic of blockchain happens.
In simple terms, a blockchain, as the name suggests, is a connection of blocks. Each block contains multiple transaction details.
Now once you carry out a transaction, it needs to be verified and put into a block. Who does this verification? Enter Bitcoin Miners.
For validating the transactions, the miners need to solve a computational puzzle. The miner who solves the puzzle gets to verify the transactions and add the corresponding block at the rear end of the blockchain. Once the transactions are added to the blockchain, the miner is rewarded with bitcoins. Also, all the other miners get updated on the addition of the new block and the new blockchain structure.
This is a simple version of how bitcoin mining works. So, you can either move to the next section of the article or if you are interested to understand it in a bit more detail, be my guest.
Let’s get into the transaction process again. You have sent a bitcoin to your friend, and it is reflected in the bitcoin network. A miner is a person in the network whose sole purpose is to earn bitcoins by verifying the transactions.
The miner needs to find a mathematical solution to validate the transaction. The mathematical solution is actually a cryptographic hash function that the miner needs to run on his computer to generate a hash for the block.
Now, what is this hash function?
A hash function is a mathematical function that converts an input value into another compressed output value. The input to the hash function is of arbitrary length, but the output is always of fixed length.
Let me give you a simple example. Let’s say you have a hash function H().
H (input) 🡪 hash [ When you give an input to a hash function, it will generate an output ]
Let us say,
H( input 1 ) -> 1a
H ( input 2 ) -> 2a (Output of this hash function has two characters, and its output length is fixed for all inputs of different sizes)
………, and so on.
An essential property of a hash function is that the hash function must use all the input data and produce a unique output for specific input. Also, the operation that is performed by a hash function must be complex such that it must not be easy to get the input by looking at the hash outputs. At the same time, it must also be easy enough to produce a hash of the required length from the given inputs.
In simple terms, you are encrypting a file into a language that would be difficult to understand by others. Because your information is private, it must not be easy for a person to decrypt it and get back the input from the hash.
In our case, the miner needs to generate a hash for the block that he or she wants to add at the rear end of the blockchain.
Now, each block in the blockchain contains the transactions of that block and the hash value of the previous block. What I mean is that each block’s hash is produced from the hash of the block before it, and the link grows back to the very first block created in the blockchain, at some time in January 2009, when Bitcoin was launched. If anyone tried to add a fake transaction, the hash associated with the block would change, and when users run hashing on those fake blocks, the system will instantly understand that the block has changed from last time. The transaction will be immediately spotted as a fake. If a hacker wants to fake any transaction in the blockchain, he needs to update all the blocks in the blockchain at once, and this is not possible because it requires a very high computing power, which is not possible to generate with the currently available technology.
Not only the blocks, but even your bitcoin addresses are stored after applying the hash function. The bitcoin blockchain uses SHA 256 hashing algorithm. Well, I won’t explain to you the algorithm, but I will give you a sense of security it provides you. If you get a supercomputer that can perform 15 trillion calculations per second to crack the hash, it would take almost 0.65 billion billion years for it to crack the hash of a single bitcoin address using brute force attack. (Yes, the sentence actually had two billion.)
I just felt this is a good time to address the safety and security aspect of a bitcoin protocol as we were speaking of hash functions. I hope you are not lost. Please come back to the bitcoin miners.
As I told you before, generating a hash from a given data is easy, but the reverse is very difficult. In this context though, the task of generating a hash is not always easy. Or else, don’t you think the miner’s main work would be very easy? All they need to do is generate a hash, and get paid in bitcoins. Easy way to earn money, right? … Wrong. It’s actually not the case.
The miners need to generate a hash that needs to adhere to specific criteria. These criteria require huge processing powers. The miners invest a lot of capital to acquire this power. They need to invest a lot of different processors, electricity, computational power, and various other resources. The smart mathematical design of the bitcoin protocol makes sure that the hashing function is resource-intensive and time-consuming. So, whenever a required hash is generated, it means that sufficient resources and effort have been put in by the miner. This is known as “proof of work.” This concept of proof of work ensures that enough resources have been put into producing the required hash.
An important thing that I want you to know is that there are only 21 million bitcoins that can ever be mined. And also that the only way a new bit is ever produced or in other terms the only way a new bitcoin enters the network for any usage is through Mining. It is quite simple to understand. When you mine or discover something, only then can you use it. Once the miners generate the hash and add the block to the blockchain, he is rewarded with a certain number of bitcoins for his work.
This means miners are the only ones who receive new bitcoins for their work, and as and when they receive bitcoins, the amount of bitcoins available to be mined becomes lesser and lesser. Miners later sell these coins on the exchanges, and it comes in circulation in the open market. The good news is anybody can become a miner. All you need to mine is download the mining software which is available for free and run it on your superfast computer.
Logically, you might get the following questions considering the above information on Mining:
- You might think if I have a superfast computer with higher processing powers, then I can verify more blocks faster by producing the required hash and get more bitcoins as a reward. Also, you might think by having more superfast computers, 21 million bitcoins would be mined very fastly.
- Why is there a limited number of bitcoins?
- Is 21 million bitcoins enough globally?
- If I have to use it as a currency to exchange goods, how would I know the worth of each bitcoin?
The bitcoin protocol knows that superfast computers would be able to generate hash much faster. You might think that in case many miners bring loads of computational resources into the network to generate the hash, the rate at which new blocks are verified will naturally increase. This actually does not happen. Thanks to the incredible course adjusting mechanism that is built in the protocol. When more computational power is applied in the network, the mining difficulty in producing the required hash increases, and when the computational power decreases, the mining difficulty decreases accordingly. This self adjusts in such a beautiful manner that the average time of a mining operation per block remains 10 minutes. Even if all the computers and supercomputers in the world are brought to mine the network, the mining time per block would remain almost constant.
Once the miner generates the required hash and adds the block to the blockchain, he is awarded a certain number of bitcoins as “block reward.” The block reward is cut in half every 210,000 blocks, or roughly every four long years (Time to verify each block takes about 10 minutes as discussed above. So, you can calculate easily that 210000 blocks come down to four years). The block reward that started at 50 in 2009 reached 25 in 2014, and now it is at 12.5 bitcoins. It will continue to decrease. The ever-decreasing block reward will hold the value of Bitcoin straight up always, and by the end, mathematically, 21 million bitcoins would have been released by the year 2140.
To answer your second question, just think about Gold. Why do you think Gold is valuable? It surely doesn’t cure any disease or provide you with any magical powers. The reason Gold is valuable is that it is limited in quantity. As we know the supply of Gold is limited on Earth, it gets difficult to mine as and when the amount available to mine starts decreasing. This ensures that its value does not change a lot over the years. The same concept is applied to Bitcoin.
Coming to the third question, the denomination in which you can do a bitcoin transaction is up to eight decimal places. So, I can send you a 0.00000008 bitcoin. Now, you can get an idea that 21 million are enough to have it as a global currency. And as I said before, it needs to be limited to maintain its value.
Moving on to the final question, Bitcoin stock exchanges determine the value of each bitcoin in dollars. It is similar to any other stock exchange, and I don’t think I need to explain about stock exchanges in detail. It follows the same basic economies.
Now that you understand the beautiful working phenomenon of bitcoin, you might be wondering that it has a very bright future.
Well, it will depend on the governments of various countries and whether they adopt it as a currency or not.
Currently, governments control fiat currencies. They use central banks to issue or destroy money out of thin air and use monetary policy to exert economic influence. They also track the currency movement, dictate who profits from that movement, collect taxes on it, and trace criminal activity. All of this control is lost when non-government bodies create their own currencies. Think about it. As I told you, anybody could become a miner, and this means anybody can generate currency ( bitcoin ). Also, the currency movement can be tracked by everyone in the network. There is no centralized authority that holds power over the money supply. This might be bad for governments who do not want to lose that control.
If you look at it from different perspectives, there are lots of pros and cons of using bitcoin as a cryptocurrency. But that is a topic for another time. You can go through its pros and cons by yourself. All you need to do is Google.
I think the emergence of this revolutionary blockchain technology needs to be discussed more and debated. It is going to offer us a lot of fruit in the future.
If you like to read more such articles, either follow me or please visit our blog Bifluke.