Trait astar_primitives::dapp_staking::TierSlots
source · pub trait TierSlots {
// Required method
fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16;
}
Expand description
Trait for calculating the total number of tier slots for the given price.
Required Methods§
sourcefn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16
fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16
Returns the total number of tier slots for the given price.
§Arguments
price
- price (e.g. moving average over some time period) of the native currency.args
- arguments,a
&b
, for the linear equationnumber_of_slots = a * price + b
.
Returns the total number of tier slots.
Object Safety§
This trait is not object safe.