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: u32Market index (Bit position on data)
ma_token_address: AddrmaToken contract address
asset_type: AssetTypeIndicated whether the asset is native or a cw20 token
max_loan_to_value: DecimalMax uusd that can be borrowed per uusd collateral when using the asset as collateral
liquidation_threshold: Decimaluusd amount in debt position per uusd of asset collateral that if surpassed makes the user’s position liquidatable.
liquidation_bonus: DecimalBonus 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: DecimalPortion of the borrow rate that is kept as protocol rewards
interest_rate_model: InterestRateModelmodel (params + internal state) that defines how interest rate behaves
borrow_index: DecimalBorrow index (Used to compute borrow interest)
liquidity_index: DecimalLiquidity index (Used to compute deposit interest)
borrow_rate: DecimalRate charged to borrowers
liquidity_rate: DecimalRate paid to depositors
indexes_last_updated: u64Timestamp (seconds) where indexes and where last updated
debt_total_scaled: Uint128Total debt scaled for the market’s currency
active: boolIf false cannot do any action (deposit/withdraw/borrow/repay/liquidate)
deposit_enabled: boolIf false cannot deposit
borrow_enabled: boolIf 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