# Mining

Mining is the term given to Proof-of-work block generation in Peercoin.

Peercoin uses SHA-256. For each 16x increase in the network, the Proof-of-work block reward is halved.

### The mathematical problem behind Peercoin mining

Imagine you have a hat with 100 pieces of paper in it, numbered 1 to 100. You pull out a piece of paper every minute and look at what you got (then put it back and shake up the hat). If it is lower than 20, you win, and you would win on average every five minutes. If you started checking numbers faster than every minute, I could slow down how often you win by making the highest winning number 15 instead of 20.

Peercoin mining is kind of like that, but instead of 1 to 100 numbers, there are 1 to 1.1579E+77 possible numbers that you get when you take the hash of some data, and Peercoin awards you 50 BTC if you find a hash of the current transaction block that is 1.7248E+61 or smaller.

A SHA hash is a complex mathematical formula that original data is put through, and the formula creates a number on the other side, like a 'signature' of the original data. Other hashes you might be familiar with in computers are MD5 or CRC. Since hashing the same transaction block over and over would always give you the same SHA hash, your computer adds some more random data to the end of a transaction block (called a nonce), to change the hash that comes out. SHA is cryptographically secure, in that it is impossible to tell what the hash will be from the nonce you add, so there is no shortcut around just trying billions of different nonces and checking the hash that is generated.