Abax Documentation
  • 🧮Meet Abax!
    • Overview
    • Glossary
  • Lending
    • Collateral & Borrowing
    • Health Factor
    • Market Rules
    • Interest Rate Model
    • Liquidation
      • Liquidation Formula
    • Protocol Fee
  • Tokenomics
    • Abax Token
    • Public Contribution
    • Promotional Campaigns
  • How to Use Abax
    • How to Start Using Abax?
    • How Can I Make a Deposit?
    • How Do I Withdraw?
    • How Can I Borrow?
    • How Do I Repay Debt?
  • Governance
    • Governance System
  • Contracts
    • Lending Protocol
      • Lending Pool
        • Messages
          • Lending Pool Actions
          • Lending Pool Flash
          • Lending Pool Maintain
          • Lending Pool Manage
          • Lending Pool View
          • A Token Interface
          • V Token Interface
        • Storage
          • Types
          • Structs
        • Calculations
          • Interest Accumulation
          • Account Interest Accumulation
          • Rate Recalculation
          • Calculate Lending Power
        • Errors
    • Abax DAO
Powered by GitBook
On this page
  • Market Rule
  • Decimal Multiplier
  • Interest Rate Model
  1. Contracts
  2. Lending Protocol
  3. Lending Pool
  4. Storage

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%.

PreviousStorageNextStructs

Last updated 1 year ago