Understanding Bitcoin (5 of 5)
Mining: Let the Ledger Keep Running
We are approaching the last piece of puzzle in Bitcoin. The ledger, a critical component in Bitcoin, is powered by blockchain technology. As a decentralized setup, no single authority claims the ownership. So who is building this ledger and more importantly, how and why?
First we need to touch on some operation in blockchain, again in a simplified version. Blockchain is a chain of blocks. Each “block” here is a collection of validated transaction records. “Chain” means that these blocks are linked in sequence with strong cryptography. The “mining” process is to add a new block with validated transactions to the chain, and make this new block part of the chain.
Then we go into “mining” process.
Bitcoin is a network of nodes, each of which is connecting to several others. There are a certain amount of nodes participating the mining process, and they are called mining nodes. We refer these mining nodes as “miners” but sometimes “miners” mean those own the mining nodes (an individual or an organization).
When Alice’s wallet sends the transaction record to Bitcoin network, all the nodes will receive this. Each mining node collects a certain amount of these “to-be-validated” transaction records and validates them. The validation includes checking whether the entries on INPUT part are unused, the sender is the owner of these entries, the amount of OUTPUT cannot exceed that of INPUT, etc.
After the validation, mining nodes will pack these transactions into a newly created block, inside which are the validated transaction records, plus some important information from previous block (remember, every node has a copy of the blockchain) and a proof of work, which is to solve a cryptographic puzzle (I will not dive into this, but trust me it is the funniest part).
All mining nodes are doing these separately, and, in fact, they are competing to one another. After a node has solved the puzzle it will broadcast the block. When other nodes see a new block is published, with the correct information of previous block and a proof of puzzle solved, they will accept it as a new block added to the blockchain. They give up what they are doing now, and start another round of mining process: collecting “to-be-validated” transaction records, validation, and solving puzzle. The cycle of mining process, that is, of a new block added to the blockchain, is around every 10 minutes per Bitcoin design.
Those transaction records, after they are placed into a block and the block in turn becomes part of the blockchain, are considered validated and recorded in the ledger.
Reward for Miners
The whole process was designed in day one and has been working for almost 10 years. But what motivates the miners? No one is interested to maintain this blockchain and hence the Bitcoin’s operation unless there is certain incentive. And it is another interesting part in Bitcoin’s design: reward new bitcoins to the miner who successfully mines a new block.
After the miner’s new block is accepted and placed onto the blockchain, the miner will receive new bitcoins as reward. We say “new” because it is really new, not from someone or some organization. It is as if someone discovers something and claims ownership of it. That is where the term “mining” comes.
According to Bitcoin’s design, at the beginning (year 2009) the reward is 50 bitcoins for each new block mined. That means every 10 minutes 50 bitcoins were given out at that time. And this reward is halved every four years. As of today (year 2018), the reward is 12.5 bitcoins. If you calculate the price of bitcoin today, you can imagine why “mining” itself can become a business. We will talk on this later.
Lastly, remember we have transaction fee on each transaction record? The fee is also collected by the successful miner who has added that transaction into the block. There is no standard price tag for transaction fee: so a higher transaction fee “attracts” more miners to include your transaction. It really makes business sense.
Mining: A Type of New Business
The puzzle solving portion in fact is a type of lucky draw, and the only way to win nowadays is by “brute force”, that is, by trying different combination to get a target result. Ideally everyone has the same chance to win. However, since it requires processing power to get the result, those miners of great computation power will have a higher winning rate than my desktop.
Consider the return. When this article is written each Bitcoin is around US$10,000. The mining reward is US$125,000 (HK$ 1 million). This creates a new type of business: building a farm of mining machines, equipped with the high-end processing power and mining. By calculating the winning rate of mining, compared to the capital and operating expenditure on the mining farm, it can be a sound business.
How big can this mining farm can be? I randomly search from Internet and find one in inner Mongolia in China. They have 8 buildings, 5,000 mining machines operating at 24 hours a day. This possibly is not the largest, but we can imagine the scale a mining farm would be. Nowadays majority of new blocks are mined by several large scale mining groups. We can see who has mined each block as it is again public information.
A risk-free business? Not really. At the end of the day the puzzle solving is still of luck, and there is still chance “not to win”. Investor needs to do their own homework before getting into such investment.
As mentioned at the beginning, this aim of this series is to give some basic understanding on Bitcoin, its concepts and operation behind. Whether you plan to step in this world, be either a basic user or an investor (mining and/or trading), it is better to equip some of this information. Hope this aim can be achieved.