2

According to Polkadot's events description page, the Staking.EraPaid event means the following:

The era payout has been set; the first balance is the validator-payout; the second is the remainder from the maximum amount of reward. [era_index, validator_payout, remainder].

However, I'd like to know for sure if this event means any balance change has just happened.

More specifically, would I be correct if I said that the validator of the current block would receive validator_payout as a reward? Or do I have to do some math with remainder?

1 Answer 1

2

validator_payout is the amount that will be paid to all the validators (and their nominators) after an era (not the payment for one validator for the current block).

The EraPaid event is deposited after computing the payout for a particular era with the end_era function: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs (this payout is for all validators/their nominators)

the remainder is got by substracting the validator_payout from max_payout in the era_payout function:

   fn era_payout(
        total_staked: Balance,
        total_issuance: Balance,
        era_duration_millis: u64,
    ) -> (Balance, Balance) {
        let (validator_payout, max_payout) = 
        inflation::compute_total_payout(
            &T::get(),
            total_staked,
            total_issuance,
            // Duration of era; more than u64::MAX is rewarded as u64::MAX.
            era_duration_millis,
        );
        let rest = max_payout.saturating_sub(validator_payout.clone());
        (validator_payout, rest)
    }
2
  • 1
    so the Staking.EraPaid event doesn't mean that a payment is happening, but that it will happen to all validators during this era, correct? Would you know if the payment for each validator can be traced by any event? For example, Staking.Reward? Commented Mar 8, 2022 at 18:23
  • Correct. the Staking.EraPaid event only signifies that the payout for that era has been set. On the other hand, the Staking.PayoutStarted event signifies that the payout has started, while the Staking.Rewarded event signifies that a nominator has been rewarded with a specific amount.
    – Abdulbee
    Commented Mar 9, 2022 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.