Post
Topic
Board Announcements (Altcoins)
Re: [ANN] [CPU mining] WAVI [YescryptR32] [NO Pre-mine] [Masternode]
by
EmoHP
on 25/04/2018, 19:26:57 UTC
Here's the part of the code that governs the amount of the block reward:

Code:

CAmount GetBlockSubsidy(int nPrevBits, int nPrevHeight, const Consensus::Params& consensusParams, bool fSuperblockPartOnly)
{
    double dDiff;
    CAmount nSubsidyBase;

//    if (nPrevHeight <= 4500 && Params().NetworkIDString() == CBaseChainParams::MAIN) {
        /* a bug which caused diff to not be correctly calculated */
//        dDiff = (double)0x0000ffff / (double)(nPrevBits & 0x00ffffff);
//    } else {
        dDiff = ConvertBitsToDouble(nPrevBits);
//    }

    if (nPrevHeight < 5465) {
        // Early ages...
        // 1111/((x+1)^2)
        nSubsidyBase = (1111.0 / (pow((dDiff+1.0),2.0)));
        if(nSubsidyBase > 50) nSubsidyBase = 50;
        else if(nSubsidyBase < 1) nSubsidyBase = 1;
    } else if (nPrevHeight < 17000 || (dDiff <= 75 && nPrevHeight < 24000)) {
        // CPU mining era
        // 11111/(((x+51)/6)^2)
        nSubsidyBase = (11111.0 / (pow((dDiff+51.0)/6.0,2.0)));
        if(nSubsidyBase > 50) nSubsidyBase = 50;
        else if(nSubsidyBase < 25) nSubsidyBase = 25;
    } else {
        // GPU/ASIC mining era
        // 2222222/(((x+2600)/9)^2)
        nSubsidyBase = (2222222.0 / (pow((dDiff+2600.0)/9.0,2.0)));
        if(nSubsidyBase > 25) nSubsidyBase = 25;
        else if(nSubsidyBase < 5) nSubsidyBase = 5;
    }

    // LogPrintf("height %u diff %4.2f reward %d\n", nPrevHeight, dDiff, nSubsidyBase);
    CAmount nSubsidy = nSubsidyBase * COIN;

    // yearly decline of production by ~7.1% per year, projected ~18M coins max by year 2050+.
    for (int i = consensusParams.nSubsidyHalvingInterval; i <= nPrevHeight; i += consensusParams.nSubsidyHalvingInterval) {
        nSubsidy -= nSubsidy/14;
    }

    // Hard fork to reduce the block reward by 10 extra percent (allowing budget/superblocks)
    CAmount nSuperblockPart = (nPrevHeight > consensusParams.nBudgetPaymentsStartBlock) ? nSubsidy/10 : 0;

    return fSuperblockPartOnly ? nSuperblockPart : nSubsidy - nSuperblockPart;
}


We appear to be in what the developer labeled in comments as the "GPU/ASIC mining era".
The exact amount is governed by current difficulty level, but at the current block height it cannot be more than 25, and can go as low as 5.
Thank you a lot for this research.
Effectively, there is a condition on the reward before the bloc 24001 ("else if (nPrevHeight < 17000 || (dDiff <= 75 && nPrevHeight < 24000)) ").
Some others surprises like that ?
It's Dev's hidden advantage. I bet only he knew about it and he knew what to monitor to be able predict when it's going to happen. It's good for the coin, bad for us, as I expect more surprises like this. At the current moment the price will not double. The coin in real meaning is not "open source" project as we do not see roadmap, table of rewards and conditions. Less than 1% can read all the code and discover these surprises. Anyone doing that will keep the secrets for his own advantage.