Not a single day goes by without an article related to Bitcoin popping up in my feed, whether it be a new YouTube video proclaiming the future of Bitcoin, or a news article discussing the soaring prices of it. Whatever it may be, one really discusses the why or the how behind bitcoin, I have seen quite a lot of words being loosely thrown around such as "Blockchain" or "Mining" in the tech space without much context, leaving the reader with a whole slew of questions and doubts. I was in a similar position about a week ago when I decided dive into this subject and try to answer a lot of those queries I always had about Bitcoin. In this (what I hope to be a comprehensive) article, I wanted discuss the bigger picture – the need for a decentralized currency, its reliability, and a lot of the common terminologies associated with bitcoin.
The crux and I daresay the flaw of traditional money is its centralization – the government controls the issuance of new money, the flow of cash and several other factors that give them absolute control over the money. It doesn't take much for problems to arise due to the economics of how it all works, leading to events such as the financial crashes or the inflation. So, I want you to imagine a currency whose issuance, verification, and transfer is handled by its users, a currency which no central authority can control, a currency that makes exchanges fast, reliable and cheap without the need of a centralized authority, here comes Bitcoin which aims to re-imagine what a conventional currency is and instead puts forward a different approach towards a regulated currency. Proposed by an individual under the pseudonym "Satoshi Nakamoto" with the release of a whitepaper in 2009. Precisely two years into the financial crash of 2007. So now let us try to understand the core principle behind a currency like bitcoin and how those principals are implemented
At some point, we all have come across a standard payment application such as PayPal, Google pay, or Paytm. The way these payments are processed is straightforward – the application sends a transaction request to your bank, who will then verify the request based on your credentials and validate the exchange, after this your request will be forwarded to the receiver's end where their interface will chord another request to their bank to verify and add the funds.
All transactions being processed have to completely rely on the servers they are being processed through, which means, if any of the servers involved in this exchange fail, the entire transaction will be invalidated, wasting not only the resources of other computers involved but also time, something invaluable in our ever so fast-moving economy. Not only this, but we have to fully trust the intermediatories involved in this exchange, trusting them with absolute control over our funds this and the fact that a single breach can compromise the entire system ruin the general integrity of such payment system, providing the user with no privacy or control over their funds.
Bitcoin solves this issue by making use of a concept known as decentralization. A traditional network is comprised of multiple users and a single server, all the requests and data sent by those users will be processed through a central computer called a server. Now, what if, each user connected on this network provide a small percentage of their computers' processing power? Now we have a network that is entirely comprised of users' computers or "nodes", any information that needs to be relayed will go through all of the nodes connected across the network and will finally reach the designated receiver node. So In bitcoin every time a user downloads the Bitcoin client onto their system, not only do they become a part of the network but the network itself – what I mean by this is, now a part of the bitcoin network will live on your system, which will be used by bitcoin network to store, validate and do a range of tasks on it, so even if every computer or "node" on the network was destroyed, but you still have it on your system, the network won't die, since your computer is not only a part of the network, but also the network itself. This removes the need for a centralized server, thus removing the trust that needs to be put in a central authority.
Now, in this open setup, any transactions going through the network will be exposed to every other user on it so we cannot use something like a PIN to identify the account, so the question is, how do we relay transitional data across a potentially compromised network? This is called the "Byzantine generals' problem" Bitcoin solves this quite ingeniously by using a concept in cryptography known as "Hashing"
Hashing is an algorithm that generates a random set of characters, the two main properties of such function are
What bitcoin does, is once you create a wallet (think of it as an account for now) on the bitcoin network, your wallet application will generate a random string of characters, called a "private key", it will then use this private key in a formula –
public_key = private_key * G
This public key is used in yet another formula to generate a bitcoin address, you can think of it as an email. In this entire process what we did here is made it so that only someone with the right public key can generate this specific bitcoin address, and someone with the right private key can generate the public key, this is how you can prove the ownership of your funds on an open network, since you are the only one who can generate these specific keys. Essentially, we can digitally sign a transaction with a signature that only we (or someone with our private key) can reproduce. This is how bitcoin can verify the ownership of transaction. We hear stories of yet to be millionaires losing the keys to their beefy wallets – in such cases the "funds" aren't lost, but the proof of ownership of those funds is lost, if in theory, our prospective millionaire is able to find their private key written in a note, they can reclaim those funds.
We have been talking about transactions and how the bitcoin system verifies without much explanation as to what those transactions imply. Think about a transaction – it defines the transfer of the ownership of certain amount of funds from one account to another; Since digital currency is intangible, we can just put "you gave jenny 1 bitcoin" into a ledger, broadcast this information for every other computer on the network to verify and update their ledger, and now we have essentially validated this transaction – you doesn't necessarily have to have this specific amount of currency your wallet, all we need to do, is broadcast this information throughout our network and your wallet can simply look at your transaction history on the standard ledger, and tally it to get the unspent funds your account holds. Take an example –
Y's wallet interface will essentially sum up these transactions to get a value that it can display as Y's unspent amount (10 - 5 + 1 = 6 BTC), and can verify any subsequent transactions against this debit.
Transactions can be thought of as "double entry book keeping" – When creating a new transaction, your wallet tries to look for the most recent transaction in which you received certain bitcoin, if it is able to find this, lets say your last transaction was "Ben gave you 5 BTC", and you need to give someone 2 BTC, your wallet will create a transaction with two parts, one will be the input "You will give", the other will be the output "John 2 BTC", along side this, in the output, another transaction will be added that returns the change back to you, However if in case your wallet isn't able to find a recent transaction that fulfills the right amount, it will look up your history and tally the outputs to get the right amount, think of it as rummaging through your wallet for spare change, now, it will essentially say
INPUT: You gave
OUTPUT: John 1.5 BTC
CHANGE: You received .5 BTC
Let's try and understand what are wallets – wallet essentially creates and stores your private and public keys. A wallet can prove that a transaction belongs to you using the private key it holds; unlike a physical account which holds the literal cash, a wallet just provides a proof of ownership and an interface for you to use that proof to send/receive funds. You have three main options when choosing a wallet, A full client contains the entire transaction history of other wallet on the network, this allows the wallet to verify both the senders' and the receivers' funds; A partial client, will hold only the transaction history of itself, which makes it light, at the cost of being a little less secure, and then there is the third kind, A "web wallet" these wallets are entirely managed by external providers, a popular example will be CoinDCX , which is a crypto exchange, meaning you can buy or sell your crypto in the same place, the only downside to a web wallet is the fact that you don't have control over it and the fees put on transactions by the wallet provider.
In a digital currency like bitcoin, an important question arises, how is new money going to be issued without a central party authorizing it? If we give all the users this power, it would lead to massive inflation which will devalue our currency, this is where Nakamoto's innovation comes into play -- a decentralized consensus called "proof-of-work". Imagine a school exam, Students, need to compete in a test which requires a lot of work to be put in, the tests are then checked and the winners are announced, the tests by themselves are meaningless, they are just here to serve as a "proof of work" done by a student, which tells the institution that the student is capable and they can trust him. This is what happens in bitcoin as well, once the wallet and has verified the transaction, it is then put into the memory or transaction pool , here, the our transaction alongside several others await until a miner can pick them up, a miner, is just a specialized node (a computer with bitcoin client installed) that are actively looking for new transactions to mine, miners across the network will now pick up all the transactions until the last block, then they will individually verify each transaction to ensure they are valid, if not, then the transaction will be discarded and the network will return an error to the user, the miner will then, craft a "block" – block is essentially a data structure which will be put on the blockchain. A block has two main parts
Once a block is ready to be published, the miner will now compete in a race to solve the "proof-of-work", this work involves miners generating a certain hash value again and again, each time appending a "nonce" to the input to completely change the output hash until they find one output hash that fits the criteria, when this happens, the miner will then publish their block to the blockchain, once the block is published, the system will broadcast this information, prompting the other systems on this network to subsequently verify and add the block to the blockchain. Each step that our transaction goes through in this network, it gets more trustable, making trust an emergent factor of the network.
Let's discuss a bit more about the special "Coinbase transaction", In order to ensure the currency doesn't inflate, the bitcoin system halves the reward a miner will get every four years, in-essence making the currency deflationary, this is because the demand of bitcoin continues to increase, but the rate at which new currency is minted halves. Current reward for a miner is about 6.25 BTC, and will continue to halve until 2140, when 21 million bitcoins will be in circulation, after this point, no new currency will be issued, instead the miners will earn reward from a small miner's fee on a transaction, even right now, a small fee is derived from the transaction, however it makes up for about 0.5% of the miners' reward.
This open and decentralized nature of bitcoin makes it susceptible to "51% Attacks", essentially when the majority of the computers on the network are controlled by a single party, they, in theory can modify the blockchain and control the transactions, but this task requires massive amounts computational power which is simply infeasible even for wealthy organizations.
This "proof of work" model of bitcoin has been criticized due to the environmental impact its creates with no gain – miners buy expensive rigs and facilities which eat up a lot of energy, to solve a problem that is essentially meaningless outside of being a proof of computational work, to combat this another model "proof of stake" has been proposed, where the trust is derived on the basis of the users' capital on the network, many currencies such as Ethereum (ETH) are moving to this model in order to reduce the inefficiencies and the carbon footprint associated with proof of work.
Bitcoin is just the tip of the iceberg and each of the concepts mentioned here deserve their own articles. Even I am just beginning to understand the sheer ingenuity of this system, which is why I would suggest the reader to do their own dive into this subject.
Finally, is it worth putting your money in? As much as I find the concept of bitcoin interesting, I find it quite a risky "investment" especially from the purposes building a capital, I would suggest anyone who is getting into this (including myself) to first observe the market and to invest when they feel confident enough.