Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probability of solo miner mining a block higher than 100% after 5 years #1020

Open
francoisfonteyn opened this issue Sep 2, 2022 · 0 comments

Comments

@francoisfonteyn
Copy link

Hi,

In chapter 10 about mining, there is an example of how long it would take a solo miner to mine one block.

The answer is based on the following probability computation :

P = (14 * 1012 / 3 * 1018) * 210240
  ≈ 98%

Where 210240 is the estimated number of blocks in 4 years.

I was puzzled by the fact that the same computations for 5 years instead of 4 would result in a probability higher than 1 :

P = (14 * 1012 / 3 * 1018) * 6 * 24 * 365 * 5
  ≈ 122.64%

I think a more correct way to compute this probability is as follows. It is easier to compute the probability that the solo miner does not mine any block. The probability that she mines at least one block is just the complementary probability. So the probability that our solo miner does not mine one block is :

P = 1 - (14 * 1012 / 3 * 1018)
  = 1 - (14/3 * 10-6)
  ≈ 99.99953333% (so she basically has no chance to mine one given block)

The probability that she does not mine two blocks is that same probability squared because for this to happen, it must be that she does not mine the first nor the second block. The two blocks being independent, the probability is the product of the probability for each block. For three blocks, that probability is cubed, and so on.

After 4 years, or approximatively 210240 blocks, the probability that our solo miner does not mine any block is :

P = (1 - (14 * 1012 /(3 * 1018))210240
  = (1 - (14/3 * 10-6))210240
  ≈ 37.489%

So she has around 63% (complementary probability of 0.37489) chance of mining at least one block in 4 years.

After 16 years, or approximatively 840960 blocks, the probability that our solo miner does not mine any block is :

P = (1 - (14 * 1012 /(3 * 1018))840960
  = (1 - (14/3 * 10-6))840960
  ≈ 1.975% 

So she has around 98% chance of mining at least one block in 16 years.

From this, we can see that she never has a probability higher than 100% although it tends to 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant