According to the media “cryptocurrency is complicated”. Many are put off investing in so-called ‘digital currency’ for that reason alone - never mind the scams, scares and volatility. One aspect of that complexity is the mining process. Here we explain the concept of Bitcoin mining in simple terms.

What is cryptocurrency mining?

Mining is the process that validates transactions on a blockchain. Each block contains a batch of transactions and a hash number that relates to the information in the previous block, all the way back to the very first block - the genesis block.

The hash is what links together the blocks in the chain, thereby maintaining the integrity of the blockchain as a whole. But what exactly is the hash? A hash is a string of numbers and letters that is produced mechanically by processing data using a specific set of rules.

The input data are derived from the set of new transactions to be added to the chain, a timestamp, the hash of the previous block, some other bits and pieces, and a nonce - a random whole number between 0 and several billion.

In the case of Bitcoin, Secure Hash Algorithm (SHA) 256 is the set of rules used to produce a hash. The algorithm is was devised by the US National Security Agency and published in 2001. Different algorithms are used by other cryptocurrencies but the general principle is the same.

It is essentially just a means of reducing a set of inputs into an output that has a particular format. Passing the same information through the hash function will always generate the same result. Make even a minute change to just one element, and the resulting hash will look completely different.

In order for a hash to be added to the Bitcoin blockchain it must satisfy a difficulty requirement. This simply specifies the number of zeroes that the hash must begin with. The more zeroes, the less likely finding a valid set of inputs becomes.

This is where mining comes in. Miners in the Bitcoin network repeatedly apply the hash algorithm in a race to find the nonce that generates a hash that satisfies the difficulty requirement - the ‘golden nonce’.

Once a valid hash is found it is broadcast to other miners for confirmation. Once confirmed by a majority of the network the block is added to the chain. Reaching a consensus in this way ensures that every miner on the network is in possession of the same valid set of transactions, thereby maintaining the integrity of the balances residing on the chain as a whole.

The winner receives the block reward, some newly minted Bitcoin. After the inception of Bitcoin in 2009 the block reward was 50 BTC. The current block reward is 12.5 BTC. The successful miner also receives a portion of the Bitcoin transaction fees associated with the block.

Finding a nonce that generates a hash that satisfies then mining difficulty can take a lot of attempts. As a result, solving this mathematical puzzle requires considerable computing power, or ‘hash power’.

