GetProofOfStakeReward function

From Peercoin Wiki
Jump to: navigation, search

Description

Minter's coin stake is rewarded based on coin age spent (coin-days)

Peercoin code

The GetProofOfStakeReward function code can be found in the main.cpp file (v0.4.0ppc).

int64 GetProofOfStakeReward(int64 nCoinAge)
{
    static int64 nRewardCoinYear = CENT;  // creation amount per coin-year
    int64 nSubsidy = nCoinAge * 33 / (365 * 33 + 8) * nRewardCoinYear;
    if (fDebug && GetBoolArg("-printcreation"))
        printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRI64d"\n", FormatMoney(nSubsidy).c_str(), nCoinAge);
    return nSubsidy;
}

Signature

Parameters

Name Type Description
int64 nCoinAge The stake coin age

Return value

Type Description
int64 The calculated proof-of-stake reward

FAQ

<TODO>
<TODO>

Feel free to add your own questions in this FAQ

Links