How Bitcoin Mining Works
In 2008 an individual, group of individuals or entity (we actually really don’t know) by the pseudonym, Satoshi Nakamoto, invented Bitcoin, the first peer-to-peer network to allow for the electronic transfer of cash between two parties.
This marked the first time people could send funds to each other instantly, with very little fees, anonymously and without the need for a financial intermediary.
This was and is, perhaps, the single most significant change in the financial services industry, completely usurping the centralized banking world.
This is all made possible by several unique characteristics of Bitcoin, the most economically significant of which is “mining”.
In this lesson, we will learn exactly what bitcoin mining is, and why it is instrumental in enabling bitcoin to function.
BACKGROUND: WHAT’S MINING?
Bitcoin mining is the act of solving a mathematically complex puzzle in order to be awarded the right to append new transactional data onto the blockchain, and in turn, unlocking newly minted bitcoin as a reward for the effort.
If this doesn’t make much sense to you right now, worry not, we are going to cover some ground here to provide some context.
In order to better understand what mining is, we need to know a bit more about what Bitcoin is, and how it works.
BACKGROUND: WHAT’S BITCOIN?
Bitcoin is the first Decentralized Autonomous Organization – meaning it runs without a central governing authority, and through its protocol, can function autonomously for the foreseeable future without any significant oversight, governance or changes.
The protocol contains all of the rules and logic for how events occur on the bitcoin network.
An example of such a rule is, how transactions are processed or how long it should take to process a transaction.
The Bitcoin Protocol is the core software client or program that allows the Bitcoin network to function, without it, Bitcoin would cease to exist.
Bitcoin is technically a distributed topology, with many interconnected nodes joined together – this architecture is critical to allowing the network to run without a central authority – it eliminates the need for a single, authoritative, trusted party.
BACKGROUND: WHAT’S A BLOCKCHAIN?
Bitcoin is essentially a computer program that allows for the transferring of value between two parties, through the use of a ledger.
The ledger assures that if someone spends bitcoin, that party actually has enough bitcoin in their wallet address to initiate that spend.
Therefore the network must keep track of what every wallet holder possesses in their wallet address.
It does this through the use of a chained ledger – a global accounting system, that contains the sum of every single transaction that has ever occurred.
Since the ledger is chained, all transactions originate from one prior to it, thereby tracking the movement of bitcoin from one point to another since the beginning of time – creating one of the most accurate accounting ledgers known to man.
BACKGROUND: WHAT’S A BLOCKCHAIN?
This chained ledger is called a blockchain – as each new set of transactions are combined into a single block, then appended to the block before it using cryptography.
The reason this is significant is that the exercise of creating a new block and adding it to the blockchain is performed by miners.
Without miners, transactions cannot be verified and added to the very long ledger called the blockchain.
Since the whole point of the network is to record the transfer of value between two parties in these transactions, if these transactions cannot be verified, then the network would cease to function.
So the work of the miners is critically important to the functioning and health of the network.
MINERS: WHAT ARE THEY?
The crypto world is full of strange jargon, and the word mining to describe a process on a software system is no exception.
Miners are participants on the network, that provide computing resources, to perform cryptographic hashing functions on the network.
Miners are sophisticated, purpose built computers, called ASIC’s (Application Specific Integration Chipset).
They consume significant energy as they race to solve the problem.
Based on the current hashrate, it would take 16,000 years for a single, high-powered, bitcoin miner to solve a single block – therefore most mining operations have hundreds if not thousands of these miners.
MINERS: WHAT DO THEY DO?
This is why miners generally combine resources together in what’s known as mining pools.
Due to the hardware and power expenses, miners need to be compensated for their efforts – they unlock new bitcoin as a result of mining, in what’s known as a coinbase transaction, a feature that was programmed into the Bitcoin protocol from day one.
The whole process repeats about every 10 minutes.
The complex cryptographic puzzle is designed in such a way that it is statistically very unlikely that a single machine or pool can solve several consecutive rounds, so the effect is that the ‘winner’ of the solve is randomized.
These difficult problems are coded into the protocol to intentionally slow down the process of the block solve time.
To better understand how this works, we need to understand the consensus model applied to the network, called proof-of-work (PoW).
MINERS: WHO ARE THEY?
When you think of a miner, perhaps you think of a hard-working, underpaid and somewhat dirty individual banging away using a pick.
In the context of cryptocurrency mining, the people that mine vary, but they can range from very large, billion dollar mining conglomerate like BitFury, to college students, and occasionally nefarious governments.
Mining is fairly straightforward, requiring a miner – such as those made by Bitmain, or a graphics card (in the case of Ethereum or Dash) an internet connection, a little bit of setup, and a lot of power. Miners need to run 24/7 to maximize their return on investment.
MINERS: WHEN’S THE PARTY OVER?
There are actually a finite number of bitcoins defined and created since the inception of the Bitcoin protocol – the total is 21M.
To date about 80% of all bitcoins have been mined and are in circulation.
Best estimates peg the year the final bitcoin is mined at 2140, after that, no new bitcoins will be created.
Since newly minted bitcoins serve as the incentive for miners to perform the expensive work on the network – should all of the bitcoins be mined, another form of incentive will have to occur.
Current expectations are that miners will likely have to be compensated purely in transaction fees – current fees are partially subsidized by the mining reward.
Putting a cap to all bitcoins in existence creates scarcity.
PROOF OF WORK: ACHIEVING CONSENSUS
We learned earlier that Bitcoin relies on decentralization in order to negate the requirement for a single trusted party to govern and operate the network – we call this a trustless system.
In order to eliminate trust, we need to make sure that no single individual or entity has the exclusive ability to write onto the blockchain – if this was allowed, than that single individual could create transactions in their favor, such as spending coins out of the same address multiple times.
The safest network is one that has a process to randomize which entity gets to write transactions into the blockchain.
PROOF OF WORK: ITS PURPOSE
The purpose of a proof-of-work protocol is to enable multiple computers, connected to the same network, the ability to universally agree on something.
This notion of universal agreement is called consensus, and therefore the function of proof-of-work to allow consensus to occur on a network like Bitcoin.
Proof-of-work is simply, a function that utilizes a very difficult mathematical problem, that can be solved by computing random cryptographic calculations, called hashing.
The nature of cryptographic functions is that they can be made so complex, it would take an entire worldwide network of computers, some length of time to solve.
This length of time can actually be programmed by adjusting the difficulty of the solve parameter – a critical aspect of Bitcoin’s difficulty adjustment.
PROOF OF WORK: ITS PURPOSE
In a proof-of-work consensus mechanism, computers are asked to solve a difficult cryptographic problem in a race of who can find the solution the fastest – the answer is called the proof.
The computer, or group of computers, sometimes called a mining pool, that correctly solves the problem (called the winner), is granted the right to combine a series of transactions into a single block, and append it to the blockchain – this exercise is called a block proposal and the result is called a confirmation.
The difficulty of the cryptographic puzzle, effectively makes the selection of the winner random.
As a result it is statistically unlikely that the same computer will be able to win consecutively – in fact, the probability of winning several times is near zero.
PROOF OF WORK: ITS PURPOSE
This is what we call probabilistic finality – that we can, within reason, say that a transaction is final on the network given enough confirmations.
Bitcoin’s difficulty adjustment is dynamic, and pegs the solve time to about 10 minutes, by constantly adjusting the difficulty of the cryptographic problem – it can do this by requiring a certain number of leading zero’s (0) to the output or proof.
By fixing the solve time to an extended length of time, the potential for ‘attacks’ on the network, are mitigated by intentionally slowing the process of adding blocks to the chain.
The whole point of proof-of-work is to randomize the participants of the block proposal process, preventing a single entity from having exclusive control over the right to add blocks to the blockchain, creating a system that is trustless.
PROOF OF WORK: CRYPTOCURRENCIES
Proof-of-work is used by the majority of the cryptocurrencies you may be familiar with, and therefore the process of mining is very similar across these cryptocurrencies:
Bitcoin, Ethereum, Bitcoin Cash, LiteCoin, DASH, Monero
Mining is the computation work done by computers connected to a blockchain network.
Miners solve the proof in a proofing based consensus model.
They are necessary to confirm transactions and record them onto the blockchain.
They are an integral part of the decentralized and trustless feature called consensus.
Miners are rewarded for the work they do in the form of newly minted coins and transaction fees.
Miners can range from large entities, to individuals, such as college students.
Mining requires specific mining hardware, and internet connection, and some setup.
EDUCATIONAL PURPOSES ONLY
This information is intended for educational purposes only and should not be construed as investment advice.
As with all financial decisions you should contact your licensed financial advisor before investing in any financial instrument.