Struct levana_perpswap_cosmos_msg::contracts::countertrade::Config
source · pub struct Config {
pub admin: Addr,
pub pending_admin: Option<Addr>,
pub factory: Addr,
pub min_funding: Decimal256,
pub target_funding: Decimal256,
pub max_funding: Decimal256,
pub iterations: u8,
pub take_profit_factor: Decimal256,
pub stop_loss_factor: Decimal256,
pub max_leverage: LeverageToBase,
}
Expand description
Full configuration Updates to configuration values.
Fields§
§admin: Addr
Administrator of the contract, allowed to make config updates
pending_admin: Option<Addr>
Pending administrator, ready to be accepted, if any.
factory: Addr
Factory we are balancing
min_funding: Decimal256
Minimum funding rate for popular side
target_funding: Decimal256
Target funding rate for popular side
max_funding: Decimal256
Maximum funding rate for popular side
iterations: u8
Allowed iterations to compute delta notional
take_profit_factor: Decimal256
Factor used to compute take profit price
stop_loss_factor: Decimal256
Factor used to compute stop loss price
max_leverage: LeverageToBase
Maximum leverage value we’ll use
If a market has lower max leverage, we use that instead
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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<T> QueryResultExt for Twhere
T: Serialize,
impl<T> QueryResultExt for Twhere T: Serialize,
§fn query_result(&self) -> Result<Binary, Error>
fn query_result(&self) -> Result<Binary, Error>
Convert the value to its JSON representation