2

Can anyone explain the math behind the mining calculators like:

http://www.bitcoinx.com/profit/

I'm trying to build a Google spreadsheet that does the same thing.

6

Suppose your hashrate is H hashes per second.

There are 86400 seconds in a day, so every day you will generate 86400H hashes.

Every hash has roughly 1 in 2^32 chance to be a share, so you'll find 86400 H / 2^32 shares.

Every share has a chance of 1/D to be a block, so you'll find on average 86400 H / (2^32 D) blocks per day (currently D = 267731249).

Every block gives a reward of B, so you'll get on average (86400 H B) / (2^32 D) per day. (Currently B = 25 bitcoins).

Then you can take into account additional factors such as the exchange rate, power costs, difficulty going up over time (requires computing an integral), and so on.

  • Shouldn't you take into account total network hashrate? You are competing against that for each block reward right? And block rewards are throttled towards 1 every ten minutes? – user2130126 Oct 22 '13 at 18:03
  • @user2130126: The network hashrate is manifested in the difficulty D. And yes, D is adjusted so that in equilibrium, a block is found every 10 minutes. – Meni Rosenfeld Oct 22 '13 at 19:34
  • so lets do an experiment. Lets say I have a 100 GHash/s machine. Right now the Difficulty is 609,480,000. – Christopher Rucinski Nov 21 '13 at 1:33
  • Can you explain or reference where the 2^32 number comes from and how it's calculated? – nallenscott May 22 '16 at 13:22
  • @nallenscott: It comes from the definition of MAX_TARGET, which is 0x00000000FFFF0000000000000000000000000000000000000000000000000000, meaning 2^{224}-2^{208}. The number of possible values of a 256-bit number is meaning 2^{256}. The ratio between those is very close to 2^{32}. A share is defined as a hash which is lower than the max_target (where a block needs to be lower than the current target, which is much lower). – Meni Rosenfeld May 22 '16 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.