diff --git a/src/sql/orderbook/barn_batch_rewards.sql b/src/sql/orderbook/barn_batch_rewards.sql index c0194b05..c91450b6 100644 --- a/src/sql/orderbook/barn_batch_rewards.sql +++ b/src/sql/orderbook/barn_batch_rewards.sql @@ -207,7 +207,7 @@ reward_per_auction as ( surplus, protocol_fee, -- the protocol fee fee - network_fee_correction as network_fee, -- the network fee - surplus + protocol_fee - reference_score as uncapped_payment, + surplus + protocol_fee - reference_score as uncapped_payment_eth, -- Capped Reward = CLAMP_[-E, E + exec_cost](uncapped_reward_eth) LEAST( GREATEST( @@ -234,7 +234,7 @@ SELECT surplus :: text as surplus, protocol_fee :: text as protocol_fee, network_fee :: text as network_fee, - uncapped_payment :: text as uncapped_payment, + uncapped_payment_eth :: text as uncapped_payment_eth, capped_payment :: text as capped_payment, winning_score :: text as winning_score, reference_score :: text as reference_score, diff --git a/src/sql/orderbook/prod_batch_rewards.sql b/src/sql/orderbook/prod_batch_rewards.sql index d079ccbc..8eb1ae38 100644 --- a/src/sql/orderbook/prod_batch_rewards.sql +++ b/src/sql/orderbook/prod_batch_rewards.sql @@ -207,7 +207,7 @@ reward_per_auction as ( surplus, protocol_fee, -- the protocol fee fee - network_fee_correction as network_fee, -- the network fee - surplus + protocol_fee - reference_score as uncapped_payment, + surplus + protocol_fee - reference_score as uncapped_payment_eth, -- Capped Reward = CLAMP_[-E, E + exec_cost](uncapped_reward_eth) LEAST( GREATEST( @@ -234,7 +234,7 @@ SELECT surplus :: text as surplus, protocol_fee :: text as protocol_fee, network_fee :: text as network_fee, - uncapped_payment :: text as uncapped_payment, + uncapped_payment_eth :: text as uncapped_payment_eth, capped_payment :: text as capped_payment, winning_score :: text as winning_score, reference_score :: text as reference_score,