Bible stars Matthew and Luke were known to use the phrase: “…and there shall be weeping and gnashing of teeth” as a means to describe what awaited sinners in eternal damnation.
A great expression for the torments of Hell: and the phrase also seems strangely applicable to the conceptual acrobatics needed to understand a key process underpinning hundreds of active cryptocurrencies: mining. Take a deep breath.
What exactly is cryptocurrency mining?
The Proof-of-Work (PoW) protocol, or mining, was developed by Bitcoin’s founder, Satoshi Nakamoto, as a process which had two purposes: to validate transactions within the network and to ensure a steady stream of bitcoins (BTC) would continue to enter circulation.
In a PoW network, transactions are collected together to form a block which, in Bitcoin, holds roughly one megabyte’s worth of data.
Once a block is filled with transactions, normally in the region of hundreds, the block is cryptographically locked and coded in a mathematical puzzle that needs to be solved in order for transactions to be verified and added onto the blockchain.
To ‘unlock the block’, miners need to determine its hash: a 64-digit hexadecimal figures, made of up of numbers 1-9; letters A-F, and which looks something like this: 00000000000000000007be9ab9afb28af05334078e24eeb5391767301d332f6f.
Although you may not have heard of them before, hashes are a relatively common security measure. Most websites that require users to create passwords will use a hash function that will correspond to passwords.
The idea is that user information won’t immediately be compromised following a successful attack as the hacker still needs to determine the password that matches the hash.
In a similar manner, miners attempt to successfully work out a block’s hash function by generating nonces, ‘numbers used only once’ which, if equal or less than the hash, will unlock the block and claim the reward.
There is no particular order or strategy to mining: hashes are chosen completely at random meaning there is no way to predict or determine what the next block’s hash is likely to be.
Because of this, miners essentially perform a type of technical guesswork, where they rapidly propose new nonces that could correspond to the correct hash. However, as there are over 150,000 other miners also doing the same thing, mining essentially becomes a fierce and potentially lucrative race.
Bitcoin miners who hit upon the right nonce are rewarded in BTC but only after 99 other blocks have also been validated. Although the lucrative part for miners is unlocking the block, the most important role for the network as a whole is their role in validating transactions.
Part of the attraction of blockchain is the absence of central authoritative figures or third parties: transactions remain a two-party affair between those involved. and do not need the authorization of an institution, such as a bank, to wire funds across.
That said, to safeguard the integrity of the network, basic rules still need to be enforced. Digital currency can be duplicated and one of the roles of miners is to validate transactions to ensure senders aren’t ‘double spending’: using the same Bitcoin ad infinitum.
For validating transactions, miners are rewarded a small fee – a portion of the value from the sender to the receiver – and once consensus is reached by a certain level of miners, the block, with all the transactions that are inside it, is added to the chain.
So where do Bitcoins come from?
For the lucky miner, the reward is sent straight to their wallet address, like any other transaction. The difference is is that the BTC is essentially minted from the network itself from a consensus among miners, who agree that the proposed nonce is indeed the correct one.
Therefore, as well as being a means to validate value exchange on the Bitcoin network, mining also enables a steady stream of new BTC to enter circulation.
Because they have to wait until 99 blocks other blocks have been mined, miners are incentivized to continually participate and validate transactions so that they can collect their lucrative reward.
As you may have already guessed, these computations are far above the ability of a standard computer. Over the years mining has moved from an obscure cottage industry to big business and has become increasingly harder as the competition has increased.
Back in 2009, when the number of BTC miners could probably be counted on one hand, a standard CPU could mine 200BTC in a couple of days. However, the rise of Application-Specific Integrated Circuits (ASICs) mining rigs, which have a much higher ‘hashrate’ (i.e. can propose nonces at a faster pace), means that CPU miners could potentially mine one BTC in 98 years.
This gives companies like Bitmain and Bitfury, which manufacture and operate their own ASICs, with top quality rigs going for thousands of dollars, a strong competitive advantage over independent miners.
Similarly, as the Bitcoin ‘arms race’ continues, the rewards for mining Bitcoin have decreased. In 2009, this was 50BTC (which would have then been worth less than one USD), but every 210,000 blocks, the reward halves, turning into 25BTC in late 2012 and 12.5BTC back in 2016. At current estimates, the reward will fall to 6.25BTC sometime in 2020.
The future of Bitcoin mining
Mining has its flaws: it is prohibitively expensive and rapidly becoming the preserve of a few big companies and mining pools who have enough computational power that can justify the large initial costs. Mining has also been shown in the past to be damaging to the environment.
This article has focused on Bitcoin, which continues to remain the most highly lucrative venture for cryptocurrency miners, but mining protocols include other household names within the crypto-sphere: Litecoin, Ether, Cardano, and NEO.
However, as the downsides to mining have become increasingly more apparent, so too is it likely that the cryptocurrency sphere will turn its back on this form of activity.
The Ethereum network for example, which at the time of writing is still a PoW protocol, has already begun to move towards the Proof-of-Stake (PoS) means of reaching consensus and Vitalk Buterin’s Casper implementation, which will be Eth’s first step, is slated to be implemented in the next couple of months.
Mining is ingenious. As a mechanism, transactions can be validated and coins minted all without the need for third party involvement.
However, as cryptocurrency matures and gains critical mass, so will the original ideas penned by Satoshi Nakamoto be adjusted and revised to work for an industry that could hit $1trn by the end of this year.