Tuesday 30 July 2013

Going down the mine


Bitcoin Mining: The basics

Trying to explain what Bitcoin is or how it works can be a complicated enough task as it is, but at some point you have to delve into the minefield of – yes, mining.

Mention the word mining and the uninitiated might conjure up an image of a man with a pickaxe digging for precious metal. Although far from the reality, the analogy of mining for gold can be a useful one when applied to the mining of bitcoin, particularly as bitcoin has a finite supply and people are required to release bitcoins into circulation by effectively ‘digging’ them out of a specially encrypted code.
Take those first groups of young men, all heading for the hills to find their fortune in the gold rush and replace them with groups of Gen Y technophiles gearing up their computers to solve complex algorithms for bitcoins and you start to get the picture.

At its most basic, bitcoin mining is a network of computers, crunching numbers to solve mathematical problems. When they have found the answer, new bitcoins are minted.

If you look into mining in more depth, you have to start talking about hash rates and explaining the encryption algorithm, SHA256, which is used for many online security systems (such as internet banking and email) but in this case has been applied specifically to the security of the bitcoin network.

What these computers are actually doing when they mine is unlocking blocks of encrypted data to release bitcoins. These are released into a bitcoin address and the successful miner gets the private key to access it.

This provides a great incentive for people to mine and the more miners out there, the more secure the bitcoin network becomes. This is because not only do miners help issue the currency, they are also required to validate every bitcoin transaction that takes place. These transactions are confirmed with every new block mined.

However, as the number of miners increases and competition grows, the chances of successfully mining a block independently, goes down. This brings us on to the genius behind the coding for the mining of bitcoin, which is in the elastic difficulty of solving the equations, taking into account how many people are mining at any one time. It was built in to help regulate the amount of currency in circulation. So, as more people mine, the difficulty of the algorithm increases to prevent the market being flooded with bitcoins.

There is a predetermined rate of release for the currency, which means as more bitcoins are mined, the chances of finding new ones diminishes exponentially. A block is mined roughly every ten minutes. At the outset from 2009, one block released 50 BTC, but every four years, the amount halves, hence why the current worth of a block is 25 BTC. This value will continue to halve until all 21 million bitcoins have been mined into existence and this is expected to happen some time around 2040.

The New Mining Boom

As it becomes harder for people to successfully mine independently, bitcoin mining pools have established to amalgamate computing power. When someone in the pool mines a block, members of the pool get a share of the bitcoins, which are allocated proportionately to the amount of work a miner has contributed.

To take the gold analogy further, when there was plenty of gold available near the surface, one man and his pickaxe could have done the job and got a good return for his efforts. As more people got involved, competition would have increased and it would have become harder for one man to get the same reward. The miners developed better tools and then formed cooperatives to pool resources and get a share of the gold at the end.

This increased difficulty has prompted a surge of more powerful computing technology to try to increase the likelihood of successfully mining the bitcoins. From one man and his computer graphics card decoding blocks and earning a few bitcoins to an entire network of miners using specifically designed hardware.

It has become a multi-million dollar mining industry all of its own. A couple of years ago the field-programmable gate array (FPGA) became a step towards a custom mining chip. Now the application-specific integrated circuit (ASIC) miner is one of the latest on the market. One small piece of hardware can be plugged into a computer’s USB port and crunch away. One of these things can be purchased for around 1 BTC or approx. $100. 

At the other end of the market, Butterfly Labs have created powerful speed, encryption processors, which can set you back thousands of dollars.

For some, mining is not cost-effective. Apart from the initial outlay for the hardware, operating costs add up in Internet and electricity bills. As bitcoin is a digital currency, a miner must be online for it to work and with some people leaving their miners operating 24/7, electricity prices can create a big dent in finances. The financial incentive depends on the exchange rates and starts to diminish if the difficulty level reaches a point that the cost to run a mining rig exceeds the value of the bitcoins in return.
The chart below from blockchain.info shows how profit margins have fluctuated over the past year.


The constant hardware developments do mean it is advantageous to upgrade regularly otherwise, your more primitive miner could be slogging away trying to mine a block, which a newer, more powerful model can mine in half the time. The winners in the mining game may well be the companies producing the mining technology rather than the miners themselves.

So then comes the question: why bother mining? For some it is still a feasible way of generating some income and while there are still bitcoins out there to be found in the digital ether, there will remain a dedicated network attempting to release them.

The future success of bitcoin relies heavily on people’s willingness to use it. It is backed by the people; the network of miners, the owners and users of bitcoins; the entire bitcoin community. Everyone who uses it has that invested interest in not allowing bitcoin to fail and for this reason there will always be an incentive to mine. When all the bitcoins are mined, we might be looking at small transaction fees as a way to reward miners for keeping the blockchain going and validating transactions. Currently less than 0.8% of mining revenue is from transaction fees. But that is a good twenty to thirty years away and right now there are still more than 9.5 million bitcoins up for grabs. Grab your pickaxe…

By Louise @ Bitscan

No comments:

Post a Comment