How does Bitcoin mining works?

Bitcoin was quite a blow to the traditional money systems, which countered the problems faced by traditional money transactions, making them less complex, safer, much more private and peer to peer. Bitcoin is a digital currency which runs on a peer to peer network, this decreases any form of tax which would have been imposed on the transaction and works with no or minimum charges. This not only makes the transactions cheaper (especially international), but also easier for the two parties which is generally untraceable towards the personal identity of the individuals. This however doesn’t mean that the transactions cannot be seen; quite contrarily this transaction is uploaded on the world ledger which can be seen by thousands of people on the network making sure no transaction is forged.

However the question is who controls such complicated system, the flow of currency, the transaction security and authentication, issuing of the bitcoins etc. You would be surprised to know that the bitcoins are not controlled by any government or bank as such. The demand and supply in the market of bitcoins would determine the price of bitcoins in the market in terms of currency like Euros or Dollars, or commodities like gold or silver.

The supply of Bitcoins in the market is done by the mining of Bitcoins. As already discussed above, any transaction that happens is added to the ledger by the miners who confirm the transaction and a blockchain is thus created of the digitally stored information about all the transactions which ever took place on the network.  Miners make sure that the transactions are legit and the network hasn’t been tampered. Miners put the particular transaction in a process and mathematical formula is applied to it, creating a sequence of random letters and numbers which is totally unique. This sequence which is easily producible from blockchain is known as Hash. Hash of each new transaction has a relationship with that of previous transactions. As the coding of one transaction is based on the previous one, any tampering will lead to change in whole block and everyone would come to know. The wrong transaction in a particular block can be spotted easily by a hash function looking at the changed hash; hence the fake can be spotted.

These are the responsibilities of the miners, Give Us Life but what is the reward of doing such things as sealing off the blocks and creating hash? Each miner is rewarded bitcoins for doing such functions. But creating hash is very easy, the computers and hardwares made specifically for bitcoin mining can make hashes within minutes and this would result in emptying up of the bitcoin treasury. The supply thus is controlled by making the mathematical equations much more difficult to solve for computers when the supply has to be decreased and to increase the supply the equations are made much easier. This is known as proof of work.  As already mentioned, the hash should be new and hence no older hash formats would work.

The bitcoin software demands that the hash should be in a particular format and same data cannot generally be used. Here is what a nonce comes into picture. The nonce is a random data used so that the hash fit the format which is required. Nonce is changed again and again to break the code and seal the data. Multiple attempts are done to succeed.

The next question is how can we mine these bitcoins and what are the requirements? As you read above, the mining seems a pretty complex job for miners like mathematical equations, nonce, conventions and creating a hash. But all this is automated in software which uses the processors power to solve these equations. Initially the bitcoins were mined through a normal computer. The more there was processing power the faster the coins were mined. It was further found out that the gaming processors used were more powerful and could better mine the bitcoins.

But the basic disadvantage was, that bitcoin mining demanded a lot from the computer and more the equations toughened, more it became tougher for the normal computers. The other major cost included that of electricity. Now there are specialized hardware to mine these coins which does it more efficiently  and consuming less power keeping the cost low.