diff --git a/src/config.py b/src/config.py index f0faeb71..b0796709 100644 --- a/src/config.py +++ b/src/config.py @@ -138,10 +138,8 @@ class BufferAccountingConfig: def from_network(network: Network) -> BufferAccountingConfig: """Initialize buffer accounting config for a given network.""" match network: - case Network.MAINNET: + case Network.MAINNET | Network.GNOSIS | Network.ARBITRUM_ONE: include_slippage = True - case Network.GNOSIS | Network.ARBITRUM_ONE: - include_slippage = False case _: raise ValueError( f"No buffer accounting config set up for network {network}." diff --git a/src/fetch/dune.py b/src/fetch/dune.py index 880c2de8..c68e0d1f 100644 --- a/src/fetch/dune.py +++ b/src/fetch/dune.py @@ -115,7 +115,7 @@ def get_period_slippage(self, job_id: Optional[str] = None) -> list[DuneRecord]: return self._get_query_results( self._parameterized_query( - QUERIES["PERIOD_SLIPPAGE"], params=self._period_params() + QUERIES["PERIOD_SLIPPAGE"], params=self._network_and_period_params() ), job_id, ) diff --git a/src/fetch/payouts.py b/src/fetch/payouts.py index d83874f4..1d5ca753 100644 --- a/src/fetch/payouts.py +++ b/src/fetch/payouts.py @@ -586,6 +586,9 @@ def construct_payouts( for _, payment in complete_payout_df.iterrows() ) + total_slippage = slippage_df["eth_slippage_wei"].sum() + total_network_fees = batch_rewards_df["network_fee_eth"].sum() + log_saver.print( "Payment breakdown (ignoring service fees):\n" f"Performance Reward: {performance_reward / 10 ** 18:.4f}\n" @@ -594,6 +597,8 @@ def construct_payouts( f"Partner Fees Tax: {partner_fee_tax_wei / 10 ** 18:.4f}\n" f"Partner Fees: {total_partner_fee_wei_taxed / 10 ** 18:.4f}\n" f"COW DAO Service Fees: {service_fee / 10 ** 18:.4f}\n\n" + f"Network Fees: {total_network_fees / 10**18:.4f}\n" + f"Slippage: {total_slippage / 10**18:.4f}\n\n" f"Exchange rate native token to COW: {exchange_rate_native_to_cow:.4f} COW/native token\n" f"Exchange rate native token to ETH: {exchange_rate_native_to_eth:.4f} ETH/native token\n", category=Category.TOTALS,