Bitcoin Block Reward value

1

How can someone calculate the current/real-time value of a Bitcoin block?

What is the equation/algorithm used to determine this?

I've found a few resource online, but I'm a little confused

Mark

Posted 2015-04-09T17:43:02.227

Reputation: 113

By value, are you asking about the size of the reward, or the rules about whether it's valid? Or are you talking about the value of Bitcoin?Nick ODell 2015-04-09T18:03:00.707

Reward for valid blockMark 2015-04-09T18:33:24.953

Answers

1

How can someone calculate the current/real-time value of a Bitcoin block?

Steps:

  1. run bitcoin-cli getblockcount to get current block_height
  2. current_block_reward = 50 / [(block_height MOD 210000) + 1]

What is the equation/algorithm used to determine this?

Value the of a Bitcoin block defined here. The default value is 50 * 100,000,000 Satoshis.

After every "SubsidyHalvingInterval" blocks, the reward of each block halved. The SubsidyHalvingInterval is defined here

CAmount GetBlockValue(int nHeight, const CAmount& nFees)
{
    CAmount nSubsidy = 50 * COIN;
    int halvings = nHeight / Params().SubsidyHalvingInterval();

    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;

    return nSubsidy + nFees;
}

moshaholo

Posted 2015-04-09T17:43:02.227

Reputation: 575

1

You can also use the BlockExplorer API totalbc query: http://blockexplorer.com/q/totalbc/####, where #### can be a past or future block number, and the return value is the total BTC in circulation. bcperblock may also be helpful.

See BlockExplorer.com/q/ for a full list of queries.

Wizard Of Ozzie

Posted 2015-04-09T17:43:02.227

Reputation: 4 535