[][src]Trait eq_bailsman::Trait

pub trait Trait: Trait {
    type ModuleId: Get<ModuleId>;
    type PriceGetter: PriceGetter;
    type VolatilityGetter: VolatilityGetter;
    type UnixTime: UnixTime;
    type Balance: Member + AtLeast32BitUnsigned + MaybeSerializeDeserialize + Codec + Copy + Parameter + Default + From<u64> + Into<u64>;
    type BalanceGetter: BalanceGetter<Self::AccountId, Self::Balance>;
    type EqCurrency: EqCurrency<Self::AccountId, Self::Balance>;
    type Aggregates: Aggregates<Self::AccountId, Self::Balance>;
    type CriticalLtv: Get<Permill>;
    type MinTempBalanceUsd: Get<Self::Balance>;
    type MinimalCollaterall: Get<Self::Balance>;
    type RiskLoverBound: Get<FixedI64>;
    type RiskUpperBound: Get<FixedI64>;
    type RiskTarget: Get<FixedI64>;
    type RiskNSigma: Get<FixedI64>;
    type RiskRho: Get<FixedI64>;
    type Alpha: Get<FixedI64>;
}

Substrate pallet configuration trait

Associated Types

type ModuleId: Get<ModuleId>

type PriceGetter: PriceGetter

Gets currency prices from oracle

type VolatilityGetter: VolatilityGetter

Receives volatility information for currency prices from other pallet

type UnixTime: UnixTime

Timestamp provider

type Balance: Member + AtLeast32BitUnsigned + MaybeSerializeDeserialize + Codec + Copy + Parameter + Default + From<u64> + Into<u64>

Numerical representation of stored balances

type BalanceGetter: BalanceGetter<Self::AccountId, Self::Balance>

Gets users balances to calculate fees and check margin calls

type EqCurrency: EqCurrency<Self::AccountId, Self::Balance>

Used for currency-related operations and calculations

type Aggregates: Aggregates<Self::AccountId, Self::Balance>

Used to work with TotalAggregates storing aggregated collateral and debt for users and bailsmen

type CriticalLtv: Get<Permill>

Pallet setting indicating at which collateral/debt ratio should occur margin call

type MinTempBalanceUsd: Get<Self::Balance>

Minimal USD value of aggregated bailsman balances

type MinimalCollaterall: Get<Self::Balance>

Minimum amount of non-Eq balances account should have to register as bailsman

type RiskLoverBound: Get<FixedI64>

Lower bound for scaling risk model

type RiskUpperBound: Get<FixedI64>

Upper bound for scaling risk model

type RiskTarget: Get<FixedI64>

Defines the target liquidity with default value set to 1 (bailout pool has to cover stressed collateral losses in full)

type RiskNSigma: Get<FixedI64>

Number of standard deviations to consider when stress testing

type RiskRho: Get<FixedI64>

Power coefficient for scale calculations

type Alpha: Get<FixedI64>

Pricing model scaling factor

Loading content...

Implementors

Loading content...