8

Why is mining Bitcoins necessary? Is it essentially a distribution mechanism to ensure Bitcoins are not held by a few (wealthy) individuals from the get-go who might just hoard Bitcoins rather than be encouraged to spend them?

Isn't the (growing) expense of mining Bitcoins going to have this effect in any case - specialist Bitcoin mining companies (with racks of expensive hardware) could effectively make it impossible for anyone else to mine Bitcoins - meaning the currency cannot filter down evenly through the network but ends up congealing around power users...

  • Changed 'underpin' to 'support'. I had to Google the word, I thought you mean 'undermine' at first. – ripper234 Sep 12 '11 at 16:24
  • See also this question about hoarding which addresses half of your question. People being encouraged to hoard Bitcoins doesn't matter because in order to hoard them, you first have to get them. So encouraging hoarding also encourages trading. – David Schwartz Sep 12 '11 at 19:44
10

Mining is not just a way to ensure the initial distribution of bitcoins. It happens that coins have been distributed through mining, because it was easy and useful to do it this way, so this might be a bit misleading, but mining will remain essential even after all the bitcoins (~21MBTC) have been distributed.

Mining has not been designed to distribute coins. It's exactly the opposite: coins are distributed to attract miners. The network needs them.

Mining is the core mechanism that makes Bitcoin possible. The bitcoin block chain (i.e. transaction history) needs to be updated continuously. In effect, one block is added to the chain about every 10 minutes. Mining is the little miracle that allows trust in the network as a whole, without trusting any single participant¹. The idea is to add some artificial difficulty to block creation, so that only a few blocks are presented to the network for consideration (and for validity checking). This way, the network can choose which block will be accepted as the next reference, while nobody has full control on block creation.

The hard work of miners that build those blocks must be compensated (hardware equipment and electricity are not cheap). A reward has therefore been included in newly created blocks. For now, the reward is constituted mostly by newly minted coins. But given that the mining process is essential to the bitcoin ecosystem, that reward must (and “hopefully” will) be replaced by fees, paid by transactors, when coin creation is going stop completely, in about 130 years.


1. Assuming no one has access to more than 50% of the total computation power of the network.

  • I guess you mean "trust" instead of "thrust". Can't edit yet myself. – herzmeister Sep 12 '11 at 15:25
3

This answer is copied from my answer on a duplicate question of this one: https://bitcoin.stackexchange.com/a/10351/1307


You should start here: http://www.youtube.com/watch?v=GmOzih6I1zs

As the video mentions, mining is needed to ensure fairness and for keeping th network stable, safe and secure.

Now, let's see what that means. But first a very brief explanation of the principle of mining.

Mining

The Bitcoin network consists of nodes that all store a database with all transactions, called the block chain. This database consists of a long chain of blocks, each holding one or more transactions. What miners basically do is bundling all unconfirmed transaction into a block. The form of the block must satisfy certain conditions before the block is considered valid. This condition is called proof of work and is not trivial to understand. When a miner finds a block that is valid, it can send its block to the network and others will verify it. When it is indeed valid, all clients will add it to their block chain. Every time a miner finds a valid block, it has the right to assign a certain amount of bitcoins to himself, called the block reward. They also get all transaction fees of all transactions included in his block. This way, new bitcoins are added to the network and it can be ensured that transactions can be confirmed.

Fairness

Since Bitcoin is peer-to-peer and there is no central authority to control it, every one can send any kind of transaction to the network, whether or not it is valid. You could simply send a transaction that sends someone else's coins to yourself.

Luckily no one in the network will accept your transaction. When you want to spend bitcoins from a certain address, you will need to sign the transaction with the private key of that address. Other clients in the network can verify that you own that private key because they have the public key. This method is based on public-key cryptography.

So when miners try to bundle unconfirmed transactions into a block, they first need to confirm every transaction to make sure that all transactions in its block are valid. When they are not, other clients will not accept the block they mined when they sends it to the network.

This way, miners ensure that people can only spend bitcoins they own.

Stability

This is the least difficult one to understand. The Bitcoin protocol sets the difficulty of the mining problem so that averagely every 10 minutes a new block can be found by some miner. This way, a transaction takes 10 minutes to be confirmed on average.

However, after a transaction has been included in a block, it still is not irreversible. This is not easy to understand, but when a miners try to mine a new block, they include in that block the number and the ID of the previous one. So let's say someone mined block 100, which follows number 99. It can happen that someone else didn't notice that someone found a valid block to follow on 99 and makes a valid number 100 itself as well, let's call it 100'. In this case, most clients will only accept the first block they received. But it can happen that another miner received 100' first and will find a block following on 100' and not on 100. Then we have following situation:

98 - 99 - 100
      \ _ 100' - 101'

When clients notice such a situation, they will always choose the longest existing chain (that only consists of block they think are valid). This means that block 100 will be discarded and that 100' and 101' or now the two last block of the main chain. This means that a transaction that was confirmed by block 100 is now possibly no longer confirmed. Luckily, the miners that found block 100' or 101' probably also knew of the transaction and most probably they also included it in one of those blocks. But it can happen that they did not and so a transaction can be undone.

For this reason, most clients and merchants require a transaction to be confirmed by at least 6 blocks. This means it must be included in a block that has at least 5 blocks after it.

The fact that a transaction will be able to be considered confirmed after averagely 1 hour, makes it a stable situation. It happens rarely that transactions confirmed for more than 1 hour will ever be reversed again.

Safety and security

The previous part about stability already included some security aspects of mining. It is clear that miners make the Bitcoin block chain trustworthy. When a transaction is included in a block and 5 or more other blocks have passed, you can be sure it is irreversible and safe to accept it as a payment.

It is also clear that the safety and security of Bitcoin as a payment system is in the hands of the miners and that every time one of them solves a block, he has the power to decide what transactions he accepted to the block chain.

Mostly, all miners are fair and they will include as much valid transactions as possible. Whenever a miner is not fair and it selectively excludes some transactions, some other miner will likely include it in the next block.

There is however one flaw. When a miner has more computation power than all other miners combined, it can always create new blocks at a faster rate than the others. This gives him much power over the block chain, and that is to be avoided at all cost. This flaw is named a 51% attack. This answer sums up the consequences of what could happen if someone would have 51% of the network computation power.

But this is a security flaw, what has this to do with why miners should mine? Well, as more people mine, the total computation power rises and it will be much much harder for someone to perform such a 51% attack. Currently, to own hardware capable of performing such an attack would be so enormously expensive that it is economically unfeasible to do, if not completely impossible. So, every miner tht contributes his power to the network ensures that only fair miners will find blocks and that the network will be safe for people to trust upon.

1

For the currency to work, the coins have to get out into the market somehow. For Bitcoin to be decentralized, the distribution mechanism would have to be something besides some organization merely handing out or selling the initial coins. Mining provides a solution to that, although one could argue whether there would be better ways to do this.

Mining does more than just control the initial distribution though; see this question for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.