pub struct Market {Show 17 fields
pub index: u32,
pub ma_token_address: Addr,
pub asset_type: AssetType,
pub max_loan_to_value: Decimal,
pub liquidation_threshold: Decimal,
pub liquidation_bonus: Decimal,
pub reserve_factor: Decimal,
pub interest_rate_model: InterestRateModel,
pub borrow_index: Decimal,
pub liquidity_index: Decimal,
pub borrow_rate: Decimal,
pub liquidity_rate: Decimal,
pub indexes_last_updated: u64,
pub debt_total_scaled: Uint128,
pub active: bool,
pub deposit_enabled: bool,
pub borrow_enabled: bool,
}
Expand description
Asset markets
Fields§
§index: u32
Market index (Bit position on data)
ma_token_address: Addr
maToken contract address
asset_type: AssetType
Indicated whether the asset is native or a cw20 token
max_loan_to_value: Decimal
Max uusd that can be borrowed per uusd collateral when using the asset as collateral
liquidation_threshold: Decimal
uusd amount in debt position per uusd of asset collateral that if surpassed makes the user’s position liquidatable.
liquidation_bonus: Decimal
Bonus amount of collateral liquidator get when repaying user’s debt (Will get collateral from user in an amount equal to debt repayed + bonus)
reserve_factor: Decimal
Portion of the borrow rate that is kept as protocol rewards
interest_rate_model: InterestRateModel
model (params + internal state) that defines how interest rate behaves
borrow_index: Decimal
Borrow index (Used to compute borrow interest)
liquidity_index: Decimal
Liquidity index (Used to compute deposit interest)
borrow_rate: Decimal
Rate charged to borrowers
liquidity_rate: Decimal
Rate paid to depositors
indexes_last_updated: u64
Timestamp (seconds) where indexes and where last updated
debt_total_scaled: Uint128
Total debt scaled for the market’s currency
active: bool
If false cannot do any action (deposit/withdraw/borrow/repay/liquidate)
deposit_enabled: bool
If false cannot deposit
borrow_enabled: bool
If false cannot borrow
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Market
impl<'de> Deserialize<'de> for Market
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Market
impl JsonSchema for Market
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more