Trait stp258_traits::serp_market::SerpMarket [−][src]
Abstraction over a serping market system for the Setheum Elastic Reserve Protocol (SERP) Market.
Associated Types
type Balance: AtLeast32Bit + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default
[src]
The price to trade.
type CurrencyId: FullCodec + Eq + PartialEq + Copy + MaybeSerializeDeserialize + Debug
[src]
The currency type in trade.
type AccountId: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + Ord + Default
[src]
The currency type in trade.
Required methods
fn pay_serpup_by_quoted(
currency_id: Self::CurrencyId,
expand_by: Self::Balance,
quote_price: Self::Balance
) -> Self::Balance
[src]
currency_id: Self::CurrencyId,
expand_by: Self::Balance,
quote_price: Self::Balance
) -> Self::Balance
Quote the amount of currency price quoted as serping fee (serp quoting) for Serpers during serpdown,
the Serp Quote is quotation + new_base_price
, base_unit - new_base_price = fractioned
, fractioned * serp_quote_multiple = quotation
,
and serp_quoted_price
is the price the SERP will pay for serping in full including the serp_quote,
the fraction for serp_quoted_price
is same as (market_price + (burn_rate * 2))
- where market-price = new_base_price / quote_price
,
(burn_rate * 2) = serp_quote_multiple
as in price balance, burn_rate = supply/new_supply
that is the ratio of burning/contracting the supply.
Therefore buying the stable currency for more than market price.
The quoted amount to pay serpers for serping down supply.
fn pay_serpdown_by_quoted(
currency_id: Self::CurrencyId,
contract_by: Self::Balance,
quote_price: Self::Balance
) -> Self::Balance
[src]
currency_id: Self::CurrencyId,
contract_by: Self::Balance,
quote_price: Self::Balance
) -> Self::Balance
Quote the amount of currency price quoted as serping fee (serp quoting) for Serpers during serpdown,
the Serp Quote is quotation + new_base_price
, base_unit - new_base_price = fractioned
, fractioned * serp_quote_multiple = quotation
,
and serp_quoted_price
is the price the SERP will pay for serping in full including the serp_quote,
the fraction for serp_quoted_price
is same as (market_price + (burn_rate * 2))
- where market-price = new_base_price / quote_price
,
(burn_rate * 2) = serp_quote_multiple
as in price balance, burn_rate = supply/new_supply
that is the ratio of burning/contracting the supply.
Therefore buying the stable currency for more than market price.
The quoted amount to pay serpers for serping down supply.