What is the point of Bitcoin mining? What is the value of the process?
The answer to these questions lies the one thing that most of those who are quick to dismiss cryptocurrencies often miss or choose to ignore conveniently. And it is also the one thing that makes Bitcoin a disruptive innovation.
It is through understanding the process of Bitcoin mining that one comes to appreciate the real value of Bitcoin and how it is not only a unique technology but also one that has the potential to transform human society in ways we’ve not even begun to comprehend.
When Bitcoin mining is mentioned, what comes to the minds of many is an opportunity to earn digital coins by connecting powerful computers to the Bitcoin network. And indeed, over time, many have participated in Bitcoin mining without ever knowing its actual primary purpose. Their main focus in these cases is to get the mining reward, convert to fiat currency, and increase personal gain.
Designed to self-sustain
There is nothing wrong going into Bitcoin mining with earning the reward and increasing the personal worth as all that concerns you. This only illustrates the genius in Satoshi Nakamoto, the founder of Bitcoin.
Satoshi wrote a powerful piece of software to implement a truly decentralized electronic cash. But more importantly, the inventor designed a game theory that incentivizes self-seeking stakeholders to play by the rules to maintain the system. By trying to maximize their gain, stakeholders on the network end up effectively supporting the system.
So what is bitcoin mining actually doing?
The primary purpose of Bitcoin mining is to facilitate consensus on the status of a shared ledger on the network. This input is particularly important because the Bitcoin network is decentralized (peer-to-peer). It is composed of independent nodes (computers) with no central arbiter, but they all have to agree on what transactions are valid and who owns what at what time.
To understand the Bitcoin mining process, it is crucial to first acknowledge the critical role of a ledger in an electronic payment system. The term ‘blockchain,’ used to describe the underlying cryptocurrency technology, denotes a distributed ledger.
There is no electronic payment system that doesn’t have a ledger, a record of transactions. It is through the ledger that we get to know who owns what at what time. In centralized payment systems, there is an authority that maintains the payment ledger.
In a commercial bank, for example, the ledger is stored on the company’s servers. The process of assigning the rights of writing on the ledger is a straightforward one. A chain of command at the institution authorizes the bank teller (human or machine) to make changes on the ledger on behalf of the customer.
To maintain the integrity of the ledger, administrators hired by management strictly control and monitor access to writing privileges and rights.
Bitcoin too has a ledger where records of who owns what at what time are kept. How the ledger is stored and updated is very different though.
Where is the Bitcoin ledger stored?
Before looking at how this ledger is maintained, it is important first to explain where it resides because that has a bearing on you understanding how and why mining is essential.
On a centralized payment system, like the one that a commercial bank maintains, the ledger is residing on servers. On the Bitcoin network, however, there is no server on which to store the ledger. Instead, each full node on the network keeps a duplicate copy of the ledger.
Also, unlike a commercial bank, Bitcoin does not have a central authority to assign the rights and privileges of writing on the ledger. Nevertheless, the need to update the ledger as users execute new transactions exists. And it is adequately and securely met.
When new transactions have to be added to the ledger, every one of the nodes on the network updates and synchronizes their copy with the rest. What Bitcoin mining does actually is to guide the process by independent nodes on the Bitcoin peer-to-peer network to update and synchronize their copies of the ledger. This is often described as finding a consensus on the status of the shared ledger.
The protocol that guides the Bitcoin mining process is the first ever to facilitate peers on a public network to agree on the status of a ledger of payments. Up until 2009, all electronic payment ledgers were all maintained by centralized entities like banks.
What most of those who dismiss Bitcoin often miss is that with the launch of Bitcoin, for the first time people on a peer-to-peer network who do not know nor trust one another were able to agree on a single truth. They were able to accurately and securely maintain a ledger of transactions without the help of a central arbiter.
What is consensus on the Bitcoin network?
However, like most other terms in the blockchain space, the term ‘consensus’ as used to describe what Bitcoin mining achieves is a slight misnomer. It just happens to be one that explains what is closest to what actually happens.
What occurs during the Bitcoin mining process is that the computers on the network compete in some form of a lottery. The winning machine gets the rights and privileges to write the next block of transactions on the shared ledger for approximately 10 minutes.
The set of self-executing rules that guide the lottery are written in the core software that a computer has to install and run to communicate with others and be part of the Bitcoin network.
It is the set of self-executing rules that is known as a consensus algorithm or protocol. The rules can only be changed through an elaborate process, and all must agree to update their core software to a version that has new rules. This process is not easy to achieve, and that is the primary reason people trust the viability and longevity of Bitcoin.
How does the Bitcoin network achieve consensus
Here is a high-level presentation as to how a cycle of Bitcoin mining happens:
Each of the special nodes on the network known as miners collects the transactions users submit for confirmation. Each puts the transactions together into a batch known as a block.
The computers then compete in computing the data of the block into value and shape that is prescribed by the protocol. This process is known as hashing as it uses a mathematical hash function, which you could interpret as a mathematical multiplier. The Bitcoin network uses the SH256 hash function.
The mathematical computation process consumes a lot of energy. It also requires high computing power, and that is why today you can only join the Bitcoin mining process with application-specific integrated circuits (ASIC) powered hardware. This is powerful enough to do computation at the rate that is acceptable on the network.
The first miner to find the value, their block automatically joins the shared ledger as the next block. All the other miners update their copies of the ledger with the new block. While it takes time, computer power, and electricity to hash transaction data into a given value and structure, it is very easy for others on the network to prove that work was put into the process.
The miner whose block is recognized as the next official block of the shared ledger gets to keep the newly minted coin in that block. This is referred to as the reward, and its value halves every four years. Besides, the winning miner gets to keep the fees those sending bitcoins attach on their transactions.
These earnings are meant to compensate the miner for their time, investment in the mining hardware, and the electricity bill.
The process then starts all over again.
It is important to point out that even though a miner gets to write the next block of transactions on the shared ledger, they have to follow script rules. Otherwise, the network will ignore their block and add the next that follows all the rules.
Different types of blockchain consensus protocols
The electricity consuming consensus protocol that the Bitcoin network uses is referred to as the Proof of Work (PoW) algorithm. With the success of Bitcoin, other cryptocurrencies have been built. According to the digital asset tracking website CoinMarketCap, there are slightly over 2000 cryptocurrencies in circulation.
The increased number of cryptocurrencies has also seen an increased number of mining algorithms. Indeed, there are now over 20 consensus algorithms that have joined Bitcoin’s Proof of Work. Another most used consensus protocol is Proof of Stake (PoS) where a miner that writes the next block is chosen depending on native coins they hold.
The ultimate goal of all the consensus protocols used by blockchain network is the same; to help a peer-to-peer network pick the node that gets to write the next block of transactions on the shared ledger.