src/kernel.cpp
int64_t GetCoinAgeWeight(int64_t nIntervalBeginning, int64_t nIntervalEnd)
{
    if (nIntervalBeginning <= 0) {
        LogPrintf("WARNING *** GetCoinAgeWeight: nIntervalBeginning (%d) <= 0\n", nIntervalBeginning);
        return 0;
    }

    int64_t nSeconds = max((int64_t)0, nIntervalEnd - nIntervalBeginning - Params().StakeMinAge());
    double days = double(nSeconds) / (24 * 60 * 60);
    double weight = 0;

    if (days <= 7) {
        weight = -0.00408163 * pow(days, 3) + 0.05714286 * pow(days, 2) + days;
    } else {
        weight = 8.4 * log(days) - 7.94564525;
    }

    return min((int64_t)(weight * 24 * 60 * 60), (int64_t)Params().StakeMaxAge());
}
/* PoSV: Coin-aging function
 * =================================================
 * WARNING
 * =================================================
 * The parameters used in this function are the
 * solutions to a set of intricate mathematical
 * equations chosen specifically to incentivise
 * owners of Reddcoin to participate in minting.
 * These parameters are also affected by the values
 * assigned to other variables such as expected
 * block confirmation time.
 * If you are merely forking the source code of
 * Reddcoin, it's highly UNLIKELY that this set of
 * parameters work for your purpose. In particular,
 * if you have tweaked the values of other variables,
 * this set of parameters are certainly no longer
 * valid. You should revert back to the linear
 * function above or the security of your network
 * will be significantly impaired.
 * In short, do not use or change this function
 * unless you have spoken to the author.
 * =================================================
 * DO NOT USE OR CHANGE UNLESS YOU ABSOLUTELY
 * KNOW WHAT YOU ARE DOING.
 * =================================================
 */
Coin-aging function

WARNING

The parameters used in this function are the
solutions to a set of intricate mathematical
equations chosen specifically to incentivise
owners of Reddcoin to participate in minting.
These parameters are also affected by the values
assigned to other variables such as expected
block confirmation time.
If you are merely forking the source code of
Reddcoin, it's highly UNLIKELY that this set of
parameters work for your purpose. In particular,
if you have tweaked the values of other variables,
this set of parameters are certainly no longer
valid. You should revert back to the linear
function above or the security of your network
will be significantly impaired.
In short, do not use or change this function
unless you have spoken to the author.


Coin - aging function WARNING The parameters used in this function are the solutions to a set of intricate mathematical equations chosen specifically to incentivise owners of Reddcoin to participate in minting . These parameters are also affected by the values assigned to other variables such as expected block confirmation time . If you are merely forking the source code of Reddcoin it ' s highly UNLIKELY that this set of parameters work for your purpose . In particular if you have tweaked the values of other variables this set of parameters are certainly no longer valid . You should revert back to the linear function above or the security of your network will be significantly impaired . In short do not use or change this function unless you have spoken to the author .
int64_t GetCoinAgeWeight(int64_t nIntervalBeginning, int64_t nIntervalEnd)
{
    if (nIntervalBeginning <= 0) {
        LogPrintf("WARNING *** GetCoinAgeWeight: nIntervalBeginning (%d) <= 0\n", nIntervalBeginning);
        return 0;
    }
    int64_t nSeconds = max((int64_t)0, nIntervalEnd - nIntervalBeginning - Params().StakeMinAge());
    double days = double(nSeconds) / (24 * 60 * 60);
    double weight = 0;
    if (days <= 7) {
        weight = -0.00408163 * pow(days, 3) + 0.05714286 * pow(days, 2) + days;
    } else {
        weight = 8.4 * log(days) - 7.94564525;
    }
    return min((int64_t)(weight * 24 * 60 * 60), (int64_t)Params().StakeMaxAge());
}
int64_t GetCoinAgeWeight ( int64_t nIntervalBeginning , int64_t nIntervalEnd ) { if ( nIntervalBeginning <= 0 ) { LogPrintf ( " \n " , nIntervalBeginning ) ; return 0 ; } int64_t nSeconds = max ( ( int64_t ) 0 , nIntervalEnd - nIntervalBeginning - Params ( ) . StakeMinAge ( ) ) ; double days = double ( nSeconds ) / ( 24 * 60 * 60 ) ; double weight = 0 ; if ( days <= 7 ) { weight = -0.00408163 * pow ( days , 3 ) + 0.05714286 * pow ( days , 2 ) + days ; } else { weight = 8.4 * log ( days ) - 7.94564525 ; } return min ( ( int64_t ) ( weight * 24 * 60 * 60 ) , ( int64_t ) Params ( ) . StakeMaxAge ( ) ) ; }
PoSV: Coin-aging function
PoSV : Coin - aging function