# Having Trouble Understanding How Bitcoin Mining Works? This Reverse Lottery Analogy Should Help

### Understanding how Bitcoin works is essential.

**Written by Sylvain Saurel - In Bitcoin We Trust**

More and more people are coming to buy Bitcoin since the end of 2020. This influx of new investors has caused the price of Bitcoin to jump from $10K to nearly $65K in April 2021. As I write this, the price of Bitcoin has been stabilizing for several days around $55K.

Among new entrants, and even among those who have been buying Bitcoin for a while now, many have a vague idea of the algorithm at the heart of the Bitcoin protocol.

That algorithm is Proof-of-Work (PoW). Everyone has heard of it, but for most people, Bitcoin mining is equivalent to solving a complex mathematical puzzle. This is how PoW has been presented to the general public since forever.

I have already explained in a theoretical way **how Proof-of-Work works using the power of cryptographic hash functions**. Following feedback from several readers, I realize that it is not always easy for non-technical people to integrate all this.

In this article, I will explain the Proof-of-Work by taking an analogy that should help you to understand things better.

### Let’s use the reverse lottery analogy to explain Bitcoin mining

Let’s imagine a reverse lottery. You have the number associated with the winning ticket. However, to collect the reward associated with this winning ticket, you will have to find the right ticket.

Where things get complicated is that the number is not written directly on the ticket. This number is calculated from different information:

Data that can change very quickly. Among this data are the transactions that are embedded in a block of the Bitcoin Blockchain.

A number called the nonce. Each ticket has a different number. This nonce variable corresponds to the number of tries the miner will have to make before finding the expected cryptographic hash for a block of the Bitcoin Blockchain.

Each time you buy a ticket, you will have to pay. And yes, nothing is free in life!

### Each purchase of a ticket to find the winning number known in advance costs money

So every attempt to get the information to get the winning ticket is costly. For miners, this is the cost of electricity to run their powerful machines.

Of course, you are not alone in your quest for the winning ticket in this great reverse lottery. You will be competing against other people. The other people will do the same thing as you, which is to buy as many tickets as possible to get the ticket with the data to get the winning number.

The Hash Rate of the Bitcoin network, which is the number of tries per second that can be made by miners at any given time, is the number of tickets that can be purchased per second.

The more tickets you can buy, the more likely you are to buy the right winning ticket. However, it will cost you more money.

### The data used to obtain the winning number is only valid for a few minutes

In the data for obtaining the winning ticket numbers, there is public information which is the transactions waiting to be validated. Miners will pick them up from the Bitcoin network’s Mempool. Miners will not necessarily pick the same transactions to try to validate them.

Thus, there are different potential winning tickets at the same time.

However, as soon as someone finds the winning ticket, all the transactions that have just been validated in that ticket make the other tickets containing those transactions invalid.

So, of course, you’d better act fast, because your purchases to get the winning ticket can quickly turn out to be useless. On average, a winning ticket is found every 10 minutes. Given the number of people competing on the Bitcoin network, you need as much power as possible.

### The difficulty of finding the number associated with the winning ticket is increasing over time

The difficulty of the Bitcoin network is that the number associated with the winning ticket will have to start with a certain number of zeros. The larger this number, the more difficult it is to find the winning number from the ticket data and the nonce variable.

This difficulty must be adjusted according to the number of tickets that can be bought per second by the miners. That’s why the difficulty of the Bitcoin network is adjusted every 2,016 blocks mined. That’s an adjustment every two weeks. The goal is to ensure that a new winning ticket is found every 10 minutes.

This ensures the predictability of new BTC issuance over time. In effect, new BTC are issued as a reward to miners who have found the winning ticket and thus added a new block to the Bitcoin blockchain.

This analogy with a reverse lottery in which thousands of people would participate should make you realize that there is no mathematical puzzle involved in the Bitcoin mining process.

Rather, it is a systematic test that must be done millions and millions of times by all the competing miners to find the nonce variable that yields the cryptographic signature beginning with a specific number of zeros defined by the difficulty of mining Bitcoin.

For mining new Bitcoin blocks, there is no better solution than testing all possibilities until one miner gets the right combination of data.

### Final Thoughts

The higher the Hash Rate of the Bitcoin network, the harder it is to be the person who finds the winning ticket data, and the more secure the Bitcoin network is. As an example, here is the evolution of the Hash Rate of Bitcoin since its creation:

As you can see, the Bitcoin network is indeed the most secure decentralized network in the world. And that security is getting stronger all the time. I hope this reverse lottery analogy has given you a better understanding of the Bitcoin mining process.

#### Twitter

**In Bitcoin We Trust**

#### Learn how to earn…

**Become part of our community.**

#### Follow our socials.

**Subscribe to our podcast.**

#### Subscribe to this publication.

It’s free (for now)

I'm showing this article to my grandma. No more calling it magic internet money.

This definitely make my perception of mining more clear !

Also, I think is easy to understand to new people not only in Bitcoin, but in crypto in general