@@ -99,7 +99,7 @@ async def process(
9999 checkpoints = await get_finality_checkpoints (self .aiohttp_session )
100100
101101 state_id = str (update_epoch * self .slots_per_epoch )
102- total_rewards : Wei = Wei ( 0 )
102+ total_rewards : Wei = voting_params [ "total_fees" ]
103103 activated_validators = 0
104104 chunk_size = NETWORK_CONFIG ["VALIDATORS_FETCH_CHUNK_SIZE" ]
105105
@@ -115,16 +115,20 @@ async def process(
115115 continue
116116
117117 activated_validators += 1
118- total_rewards += Wei (
118+ validator_reward = (
119119 Web3 .toWei (validator ["balance" ], "gwei" ) - self .deposit_amount
120120 )
121-
122- if NETWORK == GNOSIS_CHAIN :
123- # apply mGNO <-> GNO exchange rate
124- total_rewards = Wei ( int ( total_rewards * WAD // MGNO_RATE ))
121+ if NETWORK == GNOSIS_CHAIN :
122+ # apply mGNO <-> GNO exchange rate
123+ validator_reward = Wei ( int ( validator_reward * WAD // MGNO_RATE ))
124+ total_rewards += validator_reward
125125
126126 pretty_total_rewards = self .format_ether (total_rewards )
127- logger .info (f"Retrieved pool validator rewards: total={ pretty_total_rewards } " )
127+ logger .info (
128+ f"Retrieved pool validator rewards:"
129+ f" total={ pretty_total_rewards } ,"
130+ f" fees={ self .format_ether (voting_params ['total_fees' ])} "
131+ )
128132 if not total_rewards :
129133 logger .info ("No staking rewards, waiting for validators to be activated..." )
130134 return
0 commit comments