pub struct InitOrUpdateAssetParams {
pub initial_borrow_rate: Option<Decimal>,
pub reserve_factor: Option<Decimal>,
pub max_loan_to_value: Option<Decimal>,
pub liquidation_threshold: Option<Decimal>,
pub liquidation_bonus: Option<Decimal>,
pub interest_rate_model_params: Option<InterestRateModelParams>,
pub active: Option<bool>,
pub deposit_enabled: Option<bool>,
pub borrow_enabled: Option<bool>,
}
Fields§
§initial_borrow_rate: Option<Decimal>
Initial borrow rate
reserve_factor: Option<Decimal>
Portion of the borrow rate that is kept as protocol rewards
max_loan_to_value: Option<Decimal>
Max uusd that can be borrowed per uusd of collateral when using the asset as collateral
liquidation_threshold: Option<Decimal>
uusd amount in debt position per uusd of asset collateral that if surpassed makes the user’s position liquidatable.
liquidation_bonus: Option<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)
interest_rate_model_params: Option<InterestRateModelParams>
Interest rate strategy to calculate borrow_rate and liquidity_rate
active: Option<bool>
If false cannot do any action (deposit/withdraw/borrow/repay/liquidate)
deposit_enabled: Option<bool>
If false cannot deposit
borrow_enabled: Option<bool>
If false cannot borrow
Trait Implementations§
Source§impl Clone for InitOrUpdateAssetParams
impl Clone for InitOrUpdateAssetParams
Source§fn clone(&self) -> InitOrUpdateAssetParams
fn clone(&self) -> InitOrUpdateAssetParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InitOrUpdateAssetParams
impl Debug for InitOrUpdateAssetParams
Source§impl<'de> Deserialize<'de> for InitOrUpdateAssetParams
impl<'de> Deserialize<'de> for InitOrUpdateAssetParams
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for InitOrUpdateAssetParams
impl JsonSchema for InitOrUpdateAssetParams
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl PartialEq for InitOrUpdateAssetParams
impl PartialEq for InitOrUpdateAssetParams
Source§impl Serialize for InitOrUpdateAssetParams
impl Serialize for InitOrUpdateAssetParams
impl StructuralPartialEq for InitOrUpdateAssetParams
Auto Trait Implementations§
impl Freeze for InitOrUpdateAssetParams
impl RefUnwindSafe for InitOrUpdateAssetParams
impl Send for InitOrUpdateAssetParams
impl Sync for InitOrUpdateAssetParams
impl Unpin for InitOrUpdateAssetParams
impl UnwindSafe for InitOrUpdateAssetParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more