From 5bccefea012358fbe168792f0f50cb252c5d81a1 Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 14 Mar 2024 14:36:23 +0200 Subject: [PATCH] fix merge bug --- src/sql/orderbook/barn_batch_rewards.sql | 2 +- src/sql/orderbook/prod_batch_rewards.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/orderbook/barn_batch_rewards.sql b/src/sql/orderbook/barn_batch_rewards.sql index d2219471..06a76562 100644 --- a/src/sql/orderbook/barn_batch_rewards.sql +++ b/src/sql/orderbook/barn_batch_rewards.sql @@ -90,7 +90,7 @@ order_protocol_fee AS ( -- impossible anyways. This query will return a division by -- zero error in that case. LEAST( - fp.surplus_max_volume_factor / (1 - fp.surplus_max_volume_factor) * os.sell_amount, -- at most charge a fraction of volume + fp.surplus_max_volume_factor / (1 - fp.surplus_max_volume_factor) * os.buy_amount, -- at most charge a fraction of volume fp.surplus_factor / (1 - fp.surplus_factor) * surplus -- charge a fraction of surplus ) WHEN os.kind = 'buy' THEN LEAST( diff --git a/src/sql/orderbook/prod_batch_rewards.sql b/src/sql/orderbook/prod_batch_rewards.sql index d2219471..06a76562 100644 --- a/src/sql/orderbook/prod_batch_rewards.sql +++ b/src/sql/orderbook/prod_batch_rewards.sql @@ -90,7 +90,7 @@ order_protocol_fee AS ( -- impossible anyways. This query will return a division by -- zero error in that case. LEAST( - fp.surplus_max_volume_factor / (1 - fp.surplus_max_volume_factor) * os.sell_amount, -- at most charge a fraction of volume + fp.surplus_max_volume_factor / (1 - fp.surplus_max_volume_factor) * os.buy_amount, -- at most charge a fraction of volume fp.surplus_factor / (1 - fp.surplus_factor) * surplus -- charge a fraction of surplus ) WHEN os.kind = 'buy' THEN LEAST(