Types

pub type RuleId = u32;
pub type AssetId = u32;
pub type MarketRule = Vec<Option<AssetRules>>;
pub type DecimalMultiplier = u128;
pub type InterestRateModel = [u64; 7];

Market Rule

Market Rule defines the rules on which asset's can be used as collateral and can be borrowed. For each asset the rules are defined by the i-th entry of the vector where i is the asset's AssetId. If the entry in None then the asset can not be used as collateral nor borrowed.

Decimal Multiplier

Decimal Multiplier defines the number that represents one token. For example if a PSP22 token has 6 decimals it means that the one token is represented by the number 1_000_000, in such case the Decimal Multiplier is 1_000_000.

Interest Rate Model

Interest Rate Model defines the parameters that are used for calculation of the current borrow rate (which doesn't include fees). It is 7 numbers defining the target rate per millisecond multiplied by 10^18 at utilization rates : 68%, 84%, 92%, 96%, 98%, 99%, 100%.

Last updated