You are viewing a single comment's thread from:

RE: Gridcoin StakeV8 in effect for 4000 blocks: stats and analysis

in #gridcoin7 years ago

Mag unit also (wrongly) depends on the total magnitude in superblock. I think the rest of the function is not right as well.

    //7-12-2015 - Calculate GRCMagnitudeUnit (Amount paid per magnitude per day)
    StructCPID network = GetInitializedStructCPID2("NETWORK",mvNetwork);
    double TotalNetworkMagnitude = network.NetworkMagnitude;
    if (TotalNetworkMagnitude < 1000) TotalNetworkMagnitude=1000;
    double MaximumEmission = BLOCKS_PER_DAY*GetMaximumBoincSubsidy(locktime);
    double Kitty = MaximumEmission - (network.payments/14);
    if (Kitty < 1) Kitty = 1;
    double MagnitudeUnit = 0;
    if (AreBinarySuperblocksEnabled(nBestHeight))
    {
        MagnitudeUnit = (Kitty/TotalNetworkMagnitude)*1.25;
    }
    else
    {
        MagnitudeUnit = Kitty/TotalNetworkMagnitude;
    }
    if (MagnitudeUnit > 5) MagnitudeUnit = 5; //Just in case we lose a superblock or something strange happens.
    MagnitudeUnit = SnapToGrid(MagnitudeUnit); //Snaps the value into .025 increments
    return MagnitudeUnit;

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 60023.73
ETH 3191.15
USDT 1.00
SBD 2.45