Skip to content

Commit

Permalink
Adjusted values
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Mar 4, 2024
1 parent 9b3a0ee commit 5042984
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/driver/src/tests/cases/protocol_fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async fn volume_protocol_fee_sell_order() {
#[ignore]
async fn price_improvement_fee_buy_out_market_order() {
let quote_sell_amount = 21000000000000000000u128;
let quote_buy_amount = 18000000000000000000u128;
let quote_buy_amount = 16000000000000000000u128;
let fee_policy = FeePolicy::PriceImprovement {
factor: 0.5,
// high enough so we don't get capped by volume fee
Expand All @@ -204,7 +204,7 @@ async fn price_improvement_fee_buy_out_market_order() {
fee: 1000000000000000000u128.into(),
},
};
let executed_buy = 17143028023069342830u128;
let executed_buy = 15238247131617193626u128;
let test_case = TestCase {
order_side: order::Side::Buy,
fee_policy,
Expand All @@ -213,7 +213,7 @@ async fn price_improvement_fee_buy_out_market_order() {
quote_sell_amount: quote_sell_amount.into(),
quote_buy_amount: quote_buy_amount.into(),
executed: executed_buy.into(),
executed_sell_amount: 20476294902986820618u128.into(),
executed_sell_amount: 20476294902986820617u128.into(),
// executed buy amount should match order buy amount
executed_buy_amount: executed_buy.into(),
};
Expand All @@ -225,7 +225,7 @@ async fn price_improvement_fee_buy_out_market_order() {
#[ignore]
async fn price_improvement_fee_sell_out_market_order() {
let quote_sell_amount = 21000000000000000000u128;
let quote_buy_amount = 18000000000000000000u128;
let quote_buy_amount = 16000000000000000000u128;
let fee_policy = FeePolicy::PriceImprovement {
factor: 0.5,
// high enough so we don't get capped by volume fee
Expand All @@ -247,7 +247,7 @@ async fn price_improvement_fee_sell_out_market_order() {
executed: 10000000000000000000u128.into(),
// executed sell amount should match order sell amount
executed_sell_amount: order_sell_amount.into(),
executed_buy_amount: 16753332193352853234u128.into(),
executed_buy_amount: 14891850838535869541u128.into(),
};

protocol_fee_test_case(test_case).await;
Expand Down

0 comments on commit 5042984

Please sign in to comment.