gmsol_store/constants/
market.rs1use crate::states::Factor;
2
3const SECONDS_PER_YEAR: Factor = 3600 * 24 * 365;
4
5pub const DEFAULT_RECEIVER_FACTOR: Factor = 70_000_000_000_000_000_000;
7
8pub const DEFAULT_SWAP_IMPACT_EXPONENT: Factor = super::MARKET_USD_UNIT;
10pub const DEFAULT_SWAP_IMPACT_POSITIVE_FACTOR: Factor = 0;
12pub const DEFAULT_SWAP_IMPACT_NEGATIVE_FACTOR: Factor = 0;
14
15pub const DEFAULT_SWAP_FEE_FACTOR_FOR_POSITIVE_IMPACT: Factor = 0;
17pub const DEFAULT_SWAP_FEE_FACTOR_FOR_NEGATIVE_IMPACT: Factor = 0;
19
20pub const DEFAULT_MIN_POSITION_SIZE_USD: Factor = super::MARKET_USD_UNIT;
22pub const DEFAULT_MIN_COLLATERAL_VALUE: Factor = super::MARKET_USD_UNIT;
24pub const DEFAULT_MIN_COLLATERAL_FACTOR: Factor = super::MARKET_USD_UNIT / 100;
26pub const DEFAULT_MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_FOR_LONG: Factor = 380_000_000_000;
28pub const DEFAULT_MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_FOR_SHORT: Factor = 380_000_000_000;
30pub const DEFAULT_MAX_POSITIVE_POSITION_IMPACT_FACTOR: Factor = 500_000_000_000_000_000;
32pub const DEFAULT_MAX_NEGATIVE_POSITION_IMPACT_FACTOR: Factor = 500_000_000_000_000_000;
34pub const DEFAULT_MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS: Factor = 0;
36
37pub const DEFAULT_POSITION_IMPACT_EXPONENT: Factor = 2 * super::MARKET_USD_UNIT;
39pub const DEFAULT_POSITION_IMPACT_POSITIVE_FACTOR: Factor = 10_000_000_000_000;
41pub const DEFAULT_POSITION_IMPACT_NEGATIVE_FACTOR: Factor = 20_000_000_000_000;
43
44pub const DEFAULT_ORDER_FEE_FACTOR_FOR_POSITIVE_IMPACT: Factor = 50_000_000_000_000_000;
46pub const DEFAULT_ORDER_FEE_FACTOR_FOR_NEGATIVE_IMPACT: Factor = 70_000_000_000_000_000;
48
49pub const DEFAULT_LIQUIDATION_FEE_FACTOR: Factor = 20 * super::MARKET_USD_UNIT / 10_000;
51
52pub const DEFAULT_POSITION_IMPACT_DISTRIBUTE_FACTOR: Factor = 230_000_000_000_000_000;
54pub const DEFAULT_MIN_POSITION_IMPACT_POOL_AMOUNT: Factor = 1_500_000_000;
56
57pub const DEFAULT_BORROWING_FEE_FACTOR_FOR_LONG: Factor = 2_780_000_000_000;
59pub const DEFAULT_BORROWING_FEE_FACTOR_FOR_SHORT: Factor = 2_780_000_000_000;
61pub const DEFAULT_BORROWING_FEE_EXPONENT_FOR_LONG: Factor = super::MARKET_USD_UNIT;
63pub const DEFAULT_BORROWING_FEE_EXPONENT_FOR_SHORT: Factor = super::MARKET_USD_UNIT;
65pub const DEFAULT_BORROWING_FEE_OPTIMAL_USAGE_FACTOR_FOR_LONG: Factor =
67 75 * super::MARKET_USD_UNIT / 100;
68pub const DEFAULT_BORROWING_FEE_OPTIMAL_USAGE_FACTOR_FOR_SHORT: Factor =
70 75 * super::MARKET_USD_UNIT / 100;
71pub const DEFAULT_BORROWING_FEE_BASE_FACTOR_FOR_LONG: Factor =
73 60 * super::MARKET_USD_UNIT / 100 / SECONDS_PER_YEAR;
74pub const DEFAULT_BORROWING_FEE_BASE_FACTOR_FOR_SHORT: Factor =
76 60 * super::MARKET_USD_UNIT / 100 / SECONDS_PER_YEAR;
77pub const DEFAULT_BORROWING_FEE_ABOVE_OPTIMAL_USAGE_FACTOR_FOR_LONG: Factor =
79 150 * super::MARKET_USD_UNIT / 100 / SECONDS_PER_YEAR;
80pub const DEFAULT_BORROWING_FEE_ABOVE_OPTIMAL_USAGE_FACTOR_FOR_SHORT: Factor =
82 150 * super::MARKET_USD_UNIT / 100 / SECONDS_PER_YEAR;
83
84pub const DEFAULT_FUNDING_FEE_EXPONENT: Factor = super::MARKET_USD_UNIT;
86pub const DEFAULT_FUNDING_FEE_FACTOR: Factor = 2_000_000_000_000;
88pub const DEFAULT_FUNDING_FEE_MAX_FACTOR_PER_SECOND: Factor = 1_500_000_000_000;
90pub const DEFAULT_FUNDING_FEE_MIN_FACTOR_PER_SECOND: Factor = 30_000_000_000;
92pub const DEFAULT_FUNDING_FEE_INCREASE_FACTOR_PER_SECOND: Factor = 116_000_000;
94pub const DEFAULT_FUNDING_FEE_DECREASE_FACTOR_PER_SECOND: Factor = 0;
96pub const DEFAULT_FUNDING_FEE_THRESHOLD_FOR_STABLE_FUNDING: Factor = 5_000_000_000_000_000_000;
98pub const DEFAULT_FUNDING_FEE_THRESHOLD_FOR_DECREASE_FUNDING: Factor = 0;
100
101pub const DEFAULT_RESERVE_FACTOR: Factor = 50_000_000_000_000_000_000;
103pub const DEFAULT_OPEN_INTEREST_RESERVE_FACTOR: Factor = 45_000_000_000_000_000_000;
105
106pub const DEFAULT_MAX_PNL_FACTOR_FOR_LONG_DEPOSIT: Factor = 60_000_000_000_000_000_000;
108pub const DEFAULT_MAX_PNL_FACTOR_FOR_SHORT_DEPOSIT: Factor = 60_000_000_000_000_000_000;
110pub const DEFAULT_MAX_PNL_FACTOR_FOR_LONG_WITHDRAWAL: Factor = 60_000_000_000_000_000_000;
112pub const DEFAULT_MAX_PNL_FACTOR_FOR_SHORT_WITHDRAWAL: Factor = 60_000_000_000_000_000_000;
114pub const DEFAULT_MAX_PNL_FACTOR_FOR_LONG_TRADER: Factor = 60_000_000_000_000_000_000;
116pub const DEFAULT_MAX_PNL_FACTOR_FOR_SHORT_TRADER: Factor = 60_000_000_000_000_000_000;
118pub const DEFAULT_MAX_PNL_FACTOR_FOR_LONG_ADL: Factor = 55_000_000_000_000_000_000;
120pub const DEFAULT_MAX_PNL_FACTOR_FOR_SHORT_ADL: Factor = 55_000_000_000_000_000_000;
122pub const DEFAULT_MIN_PNL_FACTOR_AFTER_LONG_ADL: Factor = 50_000_000_000_000_000_000;
124pub const DEFAULT_MIN_PNL_FACTOR_AFTER_SHORT_ADL: Factor = 50_000_000_000_000_000_000;
126
127pub const DEFAULT_MAX_POOL_AMOUNT_FOR_LONG_TOKEN: Factor = 900_000_000_000;
129pub const DEFAULT_MAX_POOL_AMOUNT_FOR_SHORT_TOKEN: Factor = 900_000_000_000;
131
132pub const DEFAULT_MAX_POOL_VALUE_FOR_DEPOSIT_LONG_TOKEN: Factor = 750_000 * super::MARKET_USD_UNIT;
134pub const DEFAULT_MAX_POOL_VALUE_FOR_DEPOSIT_SHORT_TOKEN: Factor = 750_000 * super::MARKET_USD_UNIT;
136
137pub const DEFAULT_MAX_OPEN_INTEREST_FOR_LONG: Factor = 450_000 * super::MARKET_USD_UNIT;
139pub const DEFAULT_MAX_OPEN_INTEREST_FOR_SHORT: Factor = 450_000 * super::MARKET_USD_UNIT;
141
142pub const DEFAULT_MIN_TOKENS_FOR_FIRST_DEPOSIT: Factor = 0;
144
145pub const DEFAULT_SKIP_BORROWING_FEE_FOR_SMALLER_SIDE: bool = true;
147
148pub const DEFAULT_IGNORE_OPEN_INTEREST_FOR_USAGE_FACTOR: bool = false;