pub trait StakingRewardHandler<AccountId> {
    // Required methods
    fn staker_and_dapp_reward_pools(
        total_value_staked: Balance
    ) -> (Balance, Balance);
    fn bonus_reward_pool() -> Balance;
    fn payout_reward(beneficiary: &AccountId, reward: Balance) -> Result<(), ()>;
}
Expand description

Interface for staking reward handler.

Provides reward pool values for stakers - normal & bonus rewards, as well as dApp reward pool. Also provides a safe function for paying out rewards.

Required Methods§

source

fn staker_and_dapp_reward_pools( total_value_staked: Balance ) -> (Balance, Balance)

Returns the staker reward pool & dApp reward pool for an era.

The total staker reward pool is dynamic and depends on the total value staked.

source

fn bonus_reward_pool() -> Balance

Returns the bonus reward pool for a period.

source

fn payout_reward(beneficiary: &AccountId, reward: Balance) -> Result<(), ()>

Attempts to pay out the rewards to the beneficiary.

Object Safety§

This trait is not object safe.

Implementors§