Trait serp_traits::stp258::SerpMarket[][src]

pub trait SerpMarket<AccountId>: Stp258Currency<AccountId> {
    fn expand_supply(
        native_currency_id: Self::CurrencyId,
        stable_currency_id: Self::CurrencyId,
        expand_by: Self::Balance,
        quote_price: Self::Balance
    ) -> DispatchResult;
fn contract_supply(
        native_currency_id: Self::CurrencyId,
        stable_currency_id: Self::CurrencyId,
        contract_by: Self::Balance,
        quote_price: Self::Balance
    ) -> DispatchResult; }

Abstraction over a serp_market system for the Setheum Elastic Reserve Protocol (SERP) Market for Stp258Currency .

Required methods

fn expand_supply(
    native_currency_id: Self::CurrencyId,
    stable_currency_id: Self::CurrencyId,
    expand_by: Self::Balance,
    quote_price: Self::Balance
) -> DispatchResult
[src]

Called when expand_supply is received from the SERP. Implementation should deposit the amount to serpup_to, then amount will be slashed from serpup_from and update new_supply. quote_price is the price ( relative to the settcurrency) of the native_currency used to expand settcurrency supply.

fn contract_supply(
    native_currency_id: Self::CurrencyId,
    stable_currency_id: Self::CurrencyId,
    contract_by: Self::Balance,
    quote_price: Self::Balance
) -> DispatchResult
[src]

Called when contract_supply is received from the SERP. Implementation should deposit the base_currency_id (The Native Currency) of amount to serpup_to, then amount will be slashed from serpup_from and update new_supply. quote_price is the price ( relative to the settcurrency) of the native_currency used to contract settcurrency supply.

Loading content...

Implementors

Loading content...