Trait serp_traits::stp258::SerpTes [−][src]
Abstraction over a fungible multi-stable-currency Token Elasticity of Supply system.
Associated Types
type BlockNumber: Decode + Encode + EncodeLike + Clone + Default
[src]
Required methods
fn on_serp_block(
now: Self::BlockNumber,
stable_currency_id: Self::CurrencyId,
stable_currency_price: Self::Balance,
native_currency_id: Self::CurrencyId,
native_currency_price: Self::Balance
) -> DispatchResult
[src]
now: Self::BlockNumber,
stable_currency_id: Self::CurrencyId,
stable_currency_price: Self::Balance,
native_currency_id: Self::CurrencyId,
native_currency_price: Self::Balance
) -> DispatchResult
Contracts or expands the currency supply based on conditions. Filters through the conditions to see whether it’s time to adjust supply or not.
fn supply_change(
currency_id: Self::CurrencyId,
new_price: Self::Balance
) -> Self::Balance
[src]
currency_id: Self::CurrencyId,
new_price: Self::Balance
) -> Self::Balance
Calculate the amount of supply change from a fraction given as numerator
and denominator
.
fn serp_elast(
stable_currency_id: Self::CurrencyId,
stable_currency_price: Self::Balance,
native_currency_id: Self::CurrencyId,
native_currency_price: Self::Balance
) -> DispatchResult
[src]
stable_currency_id: Self::CurrencyId,
stable_currency_price: Self::Balance,
native_currency_id: Self::CurrencyId,
native_currency_price: Self::Balance
) -> DispatchResult