[][src]Module eq_bailsman::rate

Module for Bailsman pallet interest rate calculations

Structs

Cdb

Struct for storing and transferring associated collateral, debt and bail values

InterestRateSettings

Pallet settings object. Settings are stored in pallet's Trait

TotalBalance

Struct for storing total collateral and debt values for account or accounts group

Enums

LtvError

LTV calculation errors

Traits

InterestRateDataSource

Interface for receiving data required for Bailsman pallet fee calculations

Functions

aggregate_portfolio_volatilities

Calculates bailsman and collateral pools volatilities

balances

Gets account TotalBalance for given currencies as a tuple (vec of issuances, vec of debts)

borrower_volatility

Calculates volatility for positive_balances - given set of collateral values

interest_rate

Calculates Bailsman fee interest rate for account_id

ltv

Calculates LTV for given vectors of collaterals and debts

scale

System risk model calculations

total_interim

Service function for volatility calculations

total_usd

Returns total USD value of some balances (represented as FixedI64 vector xs) using their corresponding prices vector prices

total_weights

Service function for volatility calculations