Skip to content

Bitcoin Mining – Bitcoins “production” process (20 – 25 min read).

In order for a dezentralised network to function, users need to be incentivised to participate. Satoshi Nakamoto, the creator of Bitcoin, successfully established such a system with the introduction of rewards for participants.

The Bitcoin network is public, meaning that anyone can join. One can download the Bitcoin Core software and connect hardware to the Bitcoin network. Satoshi Nakamoto was the first member of the network. Hal Finney, a member of the cypherpunk mailing list, was second. On January 11th he announced via twitter “Running bitcoin”.

Slowly after, more users joined. Some users “mine” bitcoin, meaning they feed the network with computational power and verify transactions, for which they are remunerated with new bitcoins and bitcoin transaction fees. In short, Bitcoin mining describes the process of creating new bitcoin by authorising payments. It upholds the decentralised Bitcoin ledger and helps to collectively store transaction information on the blockchain.

The Bitcoin blockchain is a “gossip protocol”, meaning that all modifications to the Bitcoin ledger, hereby all individual transactions, are broadcasted to all network participants. It is important that users agree on the same information. All participating nodes in the Bitcoin network maintain their own identical copy of the Bitcoin blockchain. A bitcoin transaction is only executed when every node of the Bitcoin network independently confirms a transaction and all ledgers of the network are updated. Afterwards, a new block is added to the blockchain. This prevents double spending.

Bitcoins distributed ledger, the blockchain, is the networks transaction history. A new block, which is a list of verified  transactions, is added on average every 10 minutes. Miners compete with each other to validate the next block. The mining process is a race to solve an algorithmic problem in the Bitcoin software code, where miners compete with their respective computing power to find a valid nonce for a Bitcoin block. The winner verifies a new block. A nonce is a random number that is attached to every Bitcoin block, takes electricity (work that is costly) to compute and thus ensures that a majority of the network participants act honestly. Users that have cost contributing to a network are incentivised to not act dishonest, as this would create cost without reward. Miners often cooperate with each other, forming mining pools, where they share their computational power. Rewards are distributed equally amongst the members of a mining pool in respect to their input. The system is known as “Proof of Work”.

“Finding a valid nonce for a Bitcoin block is a guessing game. It is very much like rolling a die, or flipping a coin, or spinning a roulette wheel. You are, in essence, trying to find a beyond-astro­nom­i­cally large random number. There is no progress toward finding a solution. You either hit the jackpot, or you don’t. Every time you flip a coin, the chance of it coming up heads or tails is 50% — even if you flipped it twenty times before, and it came up heads every time. Similarly, every time you wait for a bitcoin block to come in, the chance that it will be found this second is ~0.16%. It doesn’t matter when the last block was found. The approx­i­mate waiting time for the next block is always the same: ~10 minutes.” Gigi

The difficulty is a measure of how difficult it is to mine a Bitcoin block. A high difficulty means that it will take more computing power to mine the same number of blocks, making the network more secure against attacks. Mining power is estimated in Hash Rate (TH/s). The hash rate refers to the estimated number of tera hashes per second (tera means trillions of hashes per second) the Bitcoin network is performing at and represents the speed at which a computer is completing an operation in the Bitcoin code (e.g. its computational power). It defines the level of difficulty to mine.

The Bitcoin blockchain
via https://mempool.space/


Showing the average fee, size, transactions and timestamps of blocks 699290,699289 and 699288 on the right, and blocks 699291, 699292 waiting for their confirmation on the left side.

Each new block introduces a block reward given to whoever successfully mined the block, called a coinbase. A coinbase transaction refers to the transaction whereby miners receive bitcoin as a reward for generating a new block through mining. A block reward is made of newly minted coins and transactions fees. The newly generated coins represents the biggest part of a block reward. The transaction fees are paid by the users. Bitcoin transaction fees are included with any bitcoin transaction in order to have a transaction confirmed and processed by a miner. Similar to a transaction fee that a bank or payment network like PayPal would charge its users. Because Bitcoin acts a free market, the competition between miners ideally keeps transaction fees low.

„By convention the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.” Bitcoin: A Peer-to-Peer Electronic Cash System, Satoshi Nakamoto, first ever bitcoin miner, October 31, 2008.

The “Lifecycle” of a Bitcoin transaction

In order to understand how a bitcoin transaction is executed and included in the blockchain, it is important to understand who is part of the Bitcoin network. Miners form an important part of the network, but users add security. The Bitcoin network works in symbiosis between both miners and users.

One is free to join the network and become a “user” by running a Bitcoin full node, which is any computer that runs the Bitcoin Core software. A Bitcoin full node is a program that keeps a copy of the entire Bitcoin blockchain and helps to increase network security by fully validating transactions and blocks. It connects with other nodes, forming a communication network checking that all additions to the blockchain are valid, and reject those that are invalid. A user in this case is not someone who uses bitcoin for payments etc., but who runs the Bitcoin Core software.

After a transaction is executed, it gets broadcasted to the Bitcoin network, where it is checked by every node independently. The transaction then sits in a “waiting area”, called the Mempool (Memory Pool). The transaction waits inside the Mempool until it’s picked up by a Bitcoin miner and inserted into the next block. Whereas a full node, which may be run by any user, is able to verify all transactions from the beginning, a Bitcoin miner creates new blocks in the blockchain which the nodes keep. Miners work on the bitcoin transactions by coming up with the best combination to store that information. The information is then stored by nodes, who verify it with other users.

A little illustration I made to help you understand the process of a Bitcoin transaction.
Users & Miners create an encrypted wall of energy that protects the network.


Once a transaction is included in a block, the transaction has had one confirmation. Exchanges usually increase the required number of confirmations for an increase in transaction amount. One confirmation is enough for small Bitcoin payments of less than $1,000. For a payment of over $1,000, exchanges like Kraken and certain wallets require three confirmation, taking 30 minutes. For transactions up to $1,000,000 six confirmations are standard (60 minutes). Payments above $1,000,000 will take over six confirmations, and so take over an hour. Larger transactions receive more confirmations so that they are deeper buried in the blockchain for increased security.

The payee needs proof that at the time of each trans­ac­tion, the majority of nodes agreed it was the first received. […] When there are multiple double-spent versions of the same trans­ac­tion, one and only one will become valid. The receiver of a payment must wait an hour or so before believing that it’s valid. The network will resolve any possible double-spend races by then. Satoshi Nakamoto (2009)

Full nodes do not receive a reward, but there are other benefits. Someone who executes a number of transactions per day, increases the security of transactions by running a full node. Mining operations together with full nodes uphold the decentralised Bitcoin network, replacing the centralised banking infrastructure that is necessary to uphold the dominant central banking system. 

In order for the Bitcoin network to grow over time it must be desirable for users to participate, also in the future. Bitcoin therefore is designed to be deflationary. Meaning that over time, its value is intended to increase. Fiat money in contrast is inflationary. Fiat money is managed by central banks, who are interested in stimulating their respective economies short term. Central banks continuously create fiat money. For example, when the European Central Bank issues a loan to a European country, the European Central Bank creates the money which is then paid to the customer – the money did not previously exist. Over time, the increase in money leads to a decrease in value of the money in circulation. In contrast, the Bitcoin software has a pre-defined schedule ‘hard-wired’ into the protocol. It’s production and maintenance process limits the total number of Bitcoins so that they gradually approach a total of 21m. This figure includes those that have been lost and there will never be more Bitcoins than this.

In 2009 each new block introduced 50 bitcoins as a block reward. In order to decrease the supply of bitcoins over time, the block reward is gradually reduced. The initial quantity of Bitcoins introduced, with each block, to the system (50) halves every 210,000 blocks. So, the limit of coins is subject to:

(210000 x 50) x (1 / 1 – 0, 5) = 21.000.000

The Table shows the number of bitcoins over time (Bitcoin.stackexchange.com)

A Bitcoin block halving occurs on average every four years. So far we have gone through three bitcoin block halving:

1. 2012 50 – 25 BTC (3600 bitcoin created daily)
2. 2016 25 – 12,5 BTC (1800 bitcoin created daily)
3. 2020 12,5 – 6,25 BTC (900 bitcoin created daily)

During the last halving, which was the third overall, the annual increase of the total Bitcoin money supply fell by more than half to 1.8%. To compare United States total money supply (M2) increased 12.1 % year over year in Juli 2021. US money supply M2 growth data is updated monthly and available from Jan 1960 to Jul 2021. The data reached an all-time high of 27.1 % in Feb 2021. CEIC calculates M2’s monthly growth rate. The Federal Reserve Board provides M2 Data in USD. Over the past 50 years, the US dollar has only managed to fall below two percent inflation in 1993 and 1994.

Basic economic theory tells us that when the supply of new bitcoin is less than the demand, the price should naturally rise. Even if the demand doesn’t increase, supply will decrease, causing the price to go up. As a result, per usual the bitcoin price increases with every block halving. The event’s impact isn’t felt immediately, but instead occurs with time. In 2013, little over a year after the first block halving, the bitcoin price hit an all-time high of over $1000 in December. After the second block halving occurred in 2016, it took bitcoins price a year and a half to increase. The price rose to over $19,000 by mid-December 2017. Read more via “The Economics of Halving: What Will Happen to the Price?”.

Source Uknown.

The halving does not affect the 10 minutes time between every block, only the reward. The 10 minutes time frame is directly related to the difficulty adjustment, which is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block every 10 minutes, 2016 blocks would take exactly two weeks to find. If the previous 2016 blocks took more than two weeks to find, the difficulty is reduced, if it took less, difficulty is increased. Difficulty is adjusted by the hash rate.

As more people compete with each other to confirm transactions, the hashrate goes up. Alternatively, the hash rate decreases when less people are competing with one another. A higher hash rate, which refers to the power of a miner, increases the opportunity of confirming the next block and receiving the reward.

In the early stages, ordinary computers mined bitcoin, but as bitcoins have grown in value, so has the competition to mine them. As a result, more powerful computers are needed (Frisby, D. (2014). Bitcoin: The Future Of Money?. London: Unbound). The hash rate was around 0.001 tera hashes per second (TH/s) in 2010. By June 2019, the hash rate had rocketed up to 51,933,576 TH/s.  

A comparison between Bitcoin’s hashrate and price history via https://www.reddit.com/r/CryptoCurrency/

“The diffi­culty-adjust­ment is about keeping a constant time, not a constant level of security, diffi­culty, or energy expen­di­ture. This is ingenious because good money has to be costly in time, not energy. Linking money to energy alone is not suffi­cient to produce absolute scarcity since every improve­ment in energy gener­a­tion would allow us to create more money. Time is the only thing we will never be able to make more of. It is The Ultimate Resource, as Julian Simon points out. This makes Bitcoin the ultimate form of money because its issuance is directly linked to the ultimate resource of our universe: time.” (Gigi)

Today over 75% of all bitcoins that will be created have been created. Since the third halving in Mai 2020 , the rate of new bitcoin creation is approximately 39 per hour, creating near-perfect price inelasticity of supply (Peterson, T.F. (2017). “Metcalfe’s Law as a Model for Bitcoin’s Value”. Alternative Investment Analyst Review, Q2 2018, Vol. 7, No. 2, 9-18.). 

The main cost involved in Bitcoins production is the blockchain’s maintenance. For Bitcoin to function over time, even after all bitcoins are mined, people must be willing to continuously run mining operations. A functioning framework will continue to exist through the distribution of transaction fees. The system is “self-reinforcing”.

In 2009, most of the Bitcoin blocks were mined by Satoshi Nakamoto, there were few using Bitcoin. It is estimated that the wallet of Satoshi Nakamoto holds around 1m Bitcoin today. This is quite reasonable given that 1.6m Bitcoin were mined in 2009, meaning that Satoshi could have mined about 60% of the total network at the time. The mining of the other 40% can be attributed to some early adopters (How Manny bitcoin did Satoschi Nakamoto mine ?).

The blocks mined in 2009 have very few transactions in them, with the majority including a single coinbase transaction. This keeps the system running, triggering the block reward. The first block in the Bitcoin blockchain is referred to as the Genesis block, and contains information from a Financial Times article. A quote from the Times of London, 3rd January 2009, “Chancellor on brink of second bailout for banks”. The inclusion of the quote was intended as a statement of intent, symbolising Bitcoin’s creator’s intent to revolutionise the financial sector.

Economic incentives in the form of newly mined bitcoin and transaction fees created large interest among people looking to participate in the mining process. It is safe to say that the Bitcoin network has grown so much that the risk of a single point of failure has been eliminated, making the Bitcoin network secure. In this regard it has an advantage over centralised ledger systems. In addition, Bitcoin has achieved a level of computing power, that the effort to disturb it would require an extremely high level of computational effort.

In order to attack the Bitcoin network, someone would have to control more than 50% of the network’s computational power, which is known as a 51% attack. This would give the attacker dominance for the next block and enable an attacker to modify the ordering of transactions. As a result, the attacker could prevent any transactions from getting a confirmation, choose which transaction will receive a confirmation or reverse transactions. The attacker could also double spend coins. 

However, it is highly unlikely that anyone is willing to put up the computational power, money and resources to perform such an attack by now. In case an attacker would be successful, he/she would control 1 confirmation, which takes around 10 minutes. After this, the other Bitcoin network participants would collectively spot the attacker and be able to take back control of the network by increasing their hashing power. In reality, no single attacker could compete against the whole Bitcoin network, which is made up of thousands of miners with collective estimated revenues worth around $ 13 Billion in 2021. An attacker would have to spend billions to attack the Bitcoin network, in order to control it for 10 minutes and would receive little to no reward. Someone interested in making profit would be much better off just making use of the networks incentives structure and actually mine bitcoin (Antonopoulos about a 51% attack). Until now and despite numerous attempts, no one has been able to seriously disturb the creation and distribution of bitcoin, or attack the Bitcoin software with its internal security and self-relying value system (Antonopoulos, 2015). 

The mining process illustrates one of the core ideas of Bitcoin, in that it represents the creation of an economic reality where participants will gain individual benefits by creating advantages for the community. Let’s define the economic incentives in bitcoin mining as part of “crypto-economics”, which describes a concept in which cryptography and economic incentives are exploited to achieve information security and enforce certain behaviours. For money to be valuable, you need to have a guarantee that the money and the system it runs on, will also be valuable in the future. Without assurances about both of these things, there is no reason for people to use that money or trust the system. The Bitcoin network has managed to provide all of these. In addition, it has created a self-reliant value system, with its value being defined by free market forces, without any central authority that controls its creation or distribution.

Some criticize mining for its electricity use. We believe that argument to be weak. First, the social cost of electricity use for the creation of digital value, like bitcoin, is proportionally low in comparison to the social cost of creating physical value like gold. Historically the demand for gold has led to continents being looted, cultures destroyed and millions been murdered. Bitcoin in contrast has caused electricity use. There is no war known that was caused by someone’s appetite for bitcoin. Secondly, the electricity required for mining will decrease in the long term, as miners are incentivised to cut costs by using alternative and more environmentally friendly forms of electricity.

A 2017 report by director of research at non-profit advocacy group CoinCentre Peter Van Valkenburg, suggests that Bitcoin mining could positively influence innovation in clean efficient energy. Just as the consumer electronics revolution led to massive computing efficiencies known as Moore’s law, “demand drives supply and thus rewards those who develop cheaper modes of electricity generation”. Electricity made from solar and wind where once the most expensive and are now considered to be fairly cheap. Because miners are incentivised to decrease cost and thus computational power used, in the long term they will come up with more ecologically friendly and efficient ways to generate electricity for mining.

If you are interested to learn more on the topic of bitcoin & sustainability go ahed.

Thank you for taking the time to read though this piece, if you have any questions, thoughts or advice, please reach out.

_______
Follow me 
Twitter
Instagram

 

share this article
Facebook | Twitter | LinkedIn