Function FeeManager.getCommonsBudgetPayout
Calculate the Amount
of fees that should be paid to
CommonsBudgetAddress
Amount getCommonsBudgetPayout(Payouts)
(
in Height height,
in BlockRewards rewards,
Payouts validator_payouts
) @safe;
First we sum up all the rewards and fees to be made to both Validators
and Commons Budget
. Next we subtract the payouts to each Validator
.
Finally we return what ever if left. This means any change due to
divisions is donated to the Commons Budget
to prevent loss of coins.
Parameters
Name | Description |
---|---|
height | reward and fees are for this block height |
rewards | block rewards for Commons Budget and Validators |
validator_payouts | payouts to Validators for given height |
Return
Amount
of fees that should be paid to CommonsBudgetAddress