Skip to content

Mining Probabilities

WhoSoup edited this page Aug 12, 2019 · 5 revisions

One Hash

The difficulty is a pseudo-random number between 0 and 2^64-1. The probability p of a hash being exactly X is therefore 1/2^64. This makes the math fairly straightforward.

The probability of one hash being greater than X is X / 2^64

Effective Hash Rate

Since our cutoff is the top 50 difficulties, we can calculate the EHR using the minimum difficulty of the top 50. The formula is: EHR = (50 * 2^64) / (2^64 - min) where min is the minimum difficulty of that block.

This yields the approximate amount of total hashes during the entire block. To get the Hashes/s, divide it by 480.

Expected Minimum Difficulty

The reverse of the previous, we can calculate the expected minimum if we know the overall effective hash rate:

min = \frac{2^{64}(EHR-50)}{EHR}

Expected OPRs in the top 50

If we know our own power (the total number of hashes we can produce during a single block), we can estimate how many OPRs we can enter per block:

If we consider our own power as a percentage of the EHP, we can generate the following chart:

What exactly that number is going to be will depend on your machine, but for example, if you have 1% of the total effective hash power, then your likelihood of getting an OPR into the top 50 is exactly 0.5, meaning on average you will get one OPR in every other block.