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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.