pub struct LiquidationBonus {
pub starting_lb: Decimal,
pub slope: Decimal,
pub min_lb: Decimal,
pub max_lb: Decimal,
}Expand description
The LB will depend on the Health Factor and a couple other parameters as follows: Liquidation Bonus = min( b + (slope * (1 - HF)), max( min(CR - 1, max_lb), min_lb ) )
Fields§
§starting_lb: DecimalMarks the level at which the LB starts when HF drops marginally below 1. If set at 1%, at HF = 0.999 the LB will be 1%. If set at 0%, the LB starts increasing from 0% as the HF drops below 1.
slope: DecimalDefines the slope at which the LB increases as the HF decreases. The higher the slope, the faster the LB increases as the HF decreases.
min_lb: DecimalMinimum LB that will be granted to liquidators even when the position is undercollateralized.
max_lb: DecimalMaximum LB that can be granted to a liquidator; in other words, the maxLB establishes a ceiling to the LB. This is a precautionary parameter to mitigate liquidated users being over-punished.
Implementations§
Source§impl LiquidationBonus
impl LiquidationBonus
pub fn validate(&self) -> Result<(), ValidationError>
Trait Implementations§
Source§impl Clone for LiquidationBonus
impl Clone for LiquidationBonus
Source§fn clone(&self) -> LiquidationBonus
fn clone(&self) -> LiquidationBonus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LiquidationBonus
impl Debug for LiquidationBonus
Source§impl<'de> Deserialize<'de> for LiquidationBonus
impl<'de> Deserialize<'de> for LiquidationBonus
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 LiquidationBonus
impl JsonSchema for LiquidationBonus
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 moreSource§impl PartialEq for LiquidationBonus
impl PartialEq for LiquidationBonus
Source§fn eq(&self, other: &LiquidationBonus) -> bool
fn eq(&self, other: &LiquidationBonus) -> bool
self and other values to be equal, and is used by ==.