pub fn compute_total_payout<N>(
    yearly_inflation: &PiecewiseLinear<'static>,
    npos_token_staked: N,
    total_tokens: N,
    era_duration: u64
) -> (N, N)where
    N: AtLeast32BitUnsigned + Clone,
Expand description

The total payout to all validators (and their nominators) per era and maximum payout.

Defined as such: staker-payout = yearly_inflation(npos_token_staked / total_tokens) * total_tokens / era_per_year maximum-payout = max_yearly_inflation * total_tokens / era_per_year

era_duration is expressed in millisecond.