pub trait ProviderBoostRewardsProvider<T: Config> {
type Balance;
// Required methods
fn reward_pool_size(
total_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance;
fn era_staking_reward(
era_amount_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance,
era_total_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance,
era_reward_pool_size: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance;
fn capacity_boost(
amount: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance;
}
Expand description
A trait that provides the Economic Model for Provider Boosting.
Required Associated Types§
Required Methods§
sourcefn reward_pool_size(
total_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
fn reward_pool_size( total_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance ) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
Return the size of the reward pool using the current economic model
sourcefn era_staking_reward(
era_amount_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance,
era_total_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance,
era_reward_pool_size: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
fn era_staking_reward( era_amount_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance, era_total_staked: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance, era_reward_pool_size: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance ) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
Calculate the reward for a single era. We don’t care about the era number, just the values.
sourcefn capacity_boost(
amount: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
fn capacity_boost( amount: <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance ) -> <<T as Config>::Currency as InspectFungible<<T as Config>::AccountId>>::Balance
Return the effective amount when staked for a Provider Boost The amount is multiplied by a factor > 0 and < 1.
Object Safety§
This trait is not object safe.