pub struct LegacyParams {Show 21 fields
pub leverage_max: String,
pub borrow_interest_rate_max: String,
pub borrow_interest_rate_min: String,
pub borrow_interest_rate_increase: String,
pub borrow_interest_rate_decrease: String,
pub health_gain_factor: String,
pub max_open_positions: i64,
pub pool_open_threshold: String,
pub borrow_interest_payment_fund_percentage: String,
pub borrow_interest_payment_fund_address: String,
pub safety_factor: String,
pub borrow_interest_payment_enabled: bool,
pub whitelisting_enabled: bool,
pub perpetual_swap_fee: String,
pub max_limit_order: i64,
pub fixed_funding_rate: String,
pub minimum_long_take_profit_price_ratio: String,
pub maximum_long_take_profit_price_ratio: String,
pub maximum_short_take_profit_price_ratio: String,
pub enable_take_profit_custody_liabilities: bool,
pub weight_breaking_fee_factor: String,
}
Expand description
Params defines the parameters for the module.
Fields§
§leverage_max: String
§borrow_interest_rate_max: String
§borrow_interest_rate_min: String
§borrow_interest_rate_increase: String
§borrow_interest_rate_decrease: String
§health_gain_factor: String
§max_open_positions: i64
§pool_open_threshold: String
§borrow_interest_payment_fund_percentage: String
§borrow_interest_payment_fund_address: String
§safety_factor: String
§borrow_interest_payment_enabled: bool
§whitelisting_enabled: bool
§perpetual_swap_fee: String
§max_limit_order: i64
§fixed_funding_rate: String
§minimum_long_take_profit_price_ratio: String
minimum value for take_profit_price/current price for long, should be greater than 1
maximum_long_take_profit_price_ratio: String
max value for take_profit_price/current price for long, should be greater than 1
maximum_short_take_profit_price_ratio: String
max value for take_profit_price/current price for short, should be less than 1
enable_take_profit_custody_liabilities: bool
No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in validate message
weight_breaking_fee_factor: String
We create this and send this value to estimate swap ONLY when opening and closing the position Ideally this value is set to half. When trader open a position if they receive a weight balance bonus (which is half of weight breaking fee, ideally) then while closing position they are charged weight breaking fee. So we just directly apply half weight breaking fee on perpetual swaps Question: does each need to have separate value of this because PoolParams.WeightRecoveryFeePortion can be different Also, if trader has no bonus only fee, then overall we are only applying the fee half time
Implementations§
Trait Implementations§
Source§impl Clone for LegacyParams
impl Clone for LegacyParams
Source§fn clone(&self) -> LegacyParams
fn clone(&self) -> LegacyParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LegacyParams
impl Debug for LegacyParams
Source§impl Default for LegacyParams
impl Default for LegacyParams
Source§impl<'de> Deserialize<'de> for LegacyParams
impl<'de> Deserialize<'de> for LegacyParams
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 From<LegacyParams> for Binary
impl From<LegacyParams> for Binary
Source§fn from(msg: LegacyParams) -> Self
fn from(msg: LegacyParams) -> Self
Source§impl<T> From<LegacyParams> for CosmosMsg<T>
impl<T> From<LegacyParams> for CosmosMsg<T>
Source§fn from(msg: LegacyParams) -> Self
fn from(msg: LegacyParams) -> Self
Source§impl JsonSchema for LegacyParams
impl JsonSchema for LegacyParams
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 Message for LegacyParams
impl Message for LegacyParams
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.