File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ pub fn calculate_size_premium_liability_weight(
4545 imf_factor : u32 ,
4646 liability_weight : u32 ,
4747 precision : u128 ,
48- is_capped : bool ,
48+ is_bounded : bool ,
4949) -> DriftResult < u32 > {
5050 if imf_factor == 0 {
5151 return Ok ( liability_weight) ;
@@ -67,7 +67,7 @@ pub fn calculate_size_premium_liability_weight(
6767 ) ?
6868 . cast :: < u32 > ( ) ?;
6969
70- if is_capped {
70+ if is_bounded {
7171 let max_liability_weight = max ( liability_weight, size_premium_liability_weight) ;
7272 return Ok ( max_liability_weight) ;
7373 }
Original file line number Diff line number Diff line change @@ -506,14 +506,14 @@ impl PerpMarket {
506506 MarginRequirementType :: Maintenance => margin_ratio_maintenance,
507507 } ;
508508
509- let cap_size_premium = margin_type == MarginRequirementType :: Maintenance ;
509+ let bound_liability_weight = margin_type == MarginRequirementType :: Maintenance ;
510510
511511 let size_adj_margin_ratio = calculate_size_premium_liability_weight (
512512 size,
513513 self . imf_factor ,
514514 pre_size_adj_margin_ratio,
515515 MARGIN_PRECISION_U128 ,
516- cap_size_premium ,
516+ bound_liability_weight ,
517517 ) ?;
518518
519519 _calc_high_leverage_mode_initial_margin_ratio_from_size (
You can’t perform that action at this time.
0 commit comments