@@ -489,7 +489,7 @@ fn test_check_withdraw_limits() {
489489 0 ,
490490 )
491491 . unwrap ( ) ;
492- assert_eq ! ( mbt, 642857 ) ;
492+ assert_eq ! ( mbt, 700000 ) ;
493493
494494 let valid_withdraw = check_withdraw_limits ( & spot_market, Some ( & user) , Some ( 0 ) ) . unwrap ( ) ;
495495 assert ! ( valid_withdraw) ;
@@ -578,7 +578,7 @@ fn test_check_withdraw_limits_below_optimal_utilization() {
578578 assert_eq ! ( mdt_dep, 153000000000000 ) ;
579579
580580 assert_eq ! ( max_bor, 142800000000000 ) ;
581- assert_eq ! ( mbt_bor, 151342857142857 ) ;
581+ assert_eq ! ( mbt_bor, 163000000000000 ) ;
582582
583583 let valid_withdraw = check_withdraw_limits ( & sol_spot_market, None , None ) . unwrap ( ) ;
584584 assert_eq ! ( valid_withdraw, true ) ;
@@ -626,17 +626,17 @@ fn test_check_withdraw_limits_above_optimal_utilization() {
626626 initial_liability_weight : 12 * SPOT_WEIGHT_PRECISION / 10 ,
627627 maintenance_liability_weight : 11 * SPOT_WEIGHT_PRECISION / 10 ,
628628 deposit_balance : 200_000 * SPOT_BALANCE_PRECISION , // 200k sol
629- borrow_balance : 155_000 * SPOT_BALANCE_PRECISION ,
629+ borrow_balance : 160_000 * SPOT_BALANCE_PRECISION ,
630630 liquidator_fee : LIQUIDATION_FEE_PRECISION / 1000 ,
631631 deposit_token_twap : 204000000000000_u64 ,
632- borrow_token_twap : 192200000000000_u64 ,
633- utilization_twap : 890000 , // 89 %
632+ borrow_token_twap : 199200000000000_u64 ,
633+ utilization_twap : 929000 , // 92.9 %
634634 status : MarketStatus :: Active ,
635635
636636 ..SpotMarket :: default ( )
637637 } ;
638638
639- assert_eq ! ( sol_spot_market. get_utilization( ) . unwrap( ) , 928480 ) ;
639+ assert_eq ! ( sol_spot_market. get_utilization( ) . unwrap( ) , 958431 ) ;
640640 assert ! (
641641 sol_spot_market. get_utilization( ) . unwrap( ) > sol_spot_market. optimal_utilization as u128
642642 ) ; // below optimal util
@@ -673,14 +673,14 @@ fn test_check_withdraw_limits_above_optimal_utilization() {
673673 . unwrap ( ) ;
674674
675675 assert_eq ! ( deposit_tokens_1, 204000000000000 ) ;
676- assert_eq ! ( borrow_tokens_1, 189410000000000 ) ;
676+ assert_eq ! ( borrow_tokens_1, 195520000000000 ) ;
677677
678678 // utilization bands differ from others
679- assert_eq ! ( min_dep, 200433862433862 ) ;
679+ assert_eq ! ( min_dep, 202716433385173 ) ;
680680 assert_eq ! ( mdt_dep, 153000000000000 ) ;
681681
682- assert_eq ! ( max_bor, 192780000000000 ) ;
683- assert_eq ! ( mbt_bor, 178500000000000 ) ;
682+ assert_eq ! ( max_bor, 196758000000000 ) ;
683+ assert_eq ! ( mbt_bor, 189428571428572 ) ;
684684
685685 // without passing a user, since borrows are above the built in limit of 80% will fail
686686 let valid_withdraw = check_withdraw_limits ( & sol_spot_market, None , None ) . unwrap ( ) ;
0 commit comments