## What Value does mining provide?

```After reading the O'Reilly book and perusing online resources, I'm still confused about the value that the actual mathematical mining provides to Network (I understand it does provide value, but not clear how).
It seems like once a miner has verified transactions, the really valuable work for the network has been done. And when it starts hashing to win a competition for 25 btc, it's just playing a game that has the sole purpose of adding currency to the network (which I understand is important, no central govt. etc). I don't see how this hashing to find a value less than the difficulty actually provides a real service to the network such as verifying transactions.
Before I jumped into learning about bitcoin, I just assumed the math problems the miners were solving related to detangling or decrypting transactions, but I see now that's not the case. If the competition was a race to verify transactions, that too would make more sense.
Can anyone explain the value of this mathematical race?
```

As you mentioned, bringing coins into the network is one of the main purposes of mining. But this reward is just an incentive to do the other more important part of mining: ‘processing’ transactions.

## Immutability

As detailed here, when a block has been solved, not a single bit can be changed without invalidating it.

This means that all of the transactions in the block have been processed, and are ‘final’ in the sense that they are in the blockchain and will not change (assuming that block is a part of the best/longest blockchain). Imagine how bad it would be if you could change the transaction ledger to mark someone no longer being paid, or not being paid the amount that you said you paid them.

## Security

Requiring billions of mathematical steps to be taken to solve a block means that it is very hard to accomplish. Honest miners that mine on the tip of the blockchain get rewarded for this in the form of bitcoins. But attackers who try to go back in history and replace old blocks with new blocks are at a disadvantage because doing so requires an enormous amount of hash power.

While the attacker was going back and trying to re-mine old blocks, the rest of the network continued mining on the tip of the blockchain, making it even harder for the attacker to catch up. Hence, for someone to create blocks faster than the rest of the network they have to be in control of >50% of the network hash power. This would take millions of dollars, currently.