Expand description
Storage fee distribution into epochs
Data is stored in Platform “forever” currently, which is 50 eras (50 years by default). To incentivise masternodes to continue store and serve this data, payments are distributed for entire period split into epochs. Every epoch, new aggregated storage fees are distributed among epochs and masternodes receive payouts for previous epoch.
Constants§
- FEE_
DISTRIBUTION_ TABLE - The amount of the perpetual storage fee to be paid out to masternodes per era. Adds up to 1.
Functions§
- calculate_
storage_ fee_ refund_ amount_ and_ leftovers - Calculates leftovers and amount of credits by distributing storage fees to epochs
- distribute_
storage_ fee_ to_ epochs_ collection - Distributes storage fees to epochs into
SignedCreditsPerEpochand returns leftovers - subtract_
refunds_ from_ epoch_ credits_ collection - Distributes refunds to epochs into
SignedCreditsPerEpochand returns leftovers It skips epochs up to specifiedskip_until_epoch_index