pub struct LiquidatorConfig {
pub cross_exposure: f64,
pub scoring_skew: f64,
pub toxicity: f64,
pub urgency_size_fraction: f64,
pub sweep_sds: f64,
pub instruments: Vec<LiquidatorInstrumentConfig>,
}Expand description
Update the signing account’s liquidator configuration
Fields§
§cross_exposure: f64§scoring_skew: f64§toxicity: f64Downscales every instrument’s max exposure. Range 0-100 (0 = off)
urgency_size_fraction: f64§sweep_sds: f64§instruments: Vec<LiquidatorInstrumentConfig>Implementations§
Source§impl LiquidatorConfig
impl LiquidatorConfig
Sourcepub fn new(
cross_exposure: f64,
scoring_skew: f64,
toxicity: f64,
urgency_size_fraction: f64,
sweep_sds: f64,
) -> Self
pub fn new( cross_exposure: f64, scoring_skew: f64, toxicity: f64, urgency_size_fraction: f64, sweep_sds: f64, ) -> Self
Create a config with no instruments
Sourcepub fn with_instrument(self, instrument: LiquidatorInstrumentConfig) -> Self
pub fn with_instrument(self, instrument: LiquidatorInstrumentConfig) -> Self
Add an instrument config, replacing any existing entry for its symbol
Sourcepub fn sorted_instruments(&self) -> Vec<&LiquidatorInstrumentConfig>
pub fn sorted_instruments(&self) -> Vec<&LiquidatorInstrumentConfig>
Instruments in canonical (sorted-symbol) wire order
Trait Implementations§
Source§impl Clone for LiquidatorConfig
impl Clone for LiquidatorConfig
Source§fn clone(&self) -> LiquidatorConfig
fn clone(&self) -> LiquidatorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LiquidatorConfig
impl Debug for LiquidatorConfig
Source§impl Default for LiquidatorConfig
impl Default for LiquidatorConfig
Source§fn default() -> LiquidatorConfig
fn default() -> LiquidatorConfig
Returns the “default value” for a type. Read more
Source§impl From<LiquidatorConfig> for Action
impl From<LiquidatorConfig> for Action
Source§fn from(config: LiquidatorConfig) -> Self
fn from(config: LiquidatorConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LiquidatorConfig
impl PartialEq for LiquidatorConfig
impl StructuralPartialEq for LiquidatorConfig
Auto Trait Implementations§
impl Freeze for LiquidatorConfig
impl RefUnwindSafe for LiquidatorConfig
impl Send for LiquidatorConfig
impl Sync for LiquidatorConfig
impl Unpin for LiquidatorConfig
impl UnsafeUnpin for LiquidatorConfig
impl UnwindSafe for LiquidatorConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more