@@ -275,6 +275,35 @@ def generate_incentives_csv(
275275
276276 return output_path
277277
278+ def generate_noncore_csv (
279+ self , output_path : Path = Path ("fee_allocator/allocations/noncore" )
280+ ) -> Path :
281+ logger .info ("generating noncore fee allocation csv" )
282+ output = []
283+
284+ for chain in self .run_config .all_chains :
285+ output .append ({
286+ "chain" : chain .name ,
287+ "total_fees_collected" : round (chain .fees_collected , 4 ),
288+ "core_pool_fees" : round (chain .total_earned_fees_usd_twap , 4 ),
289+ "noncore_fees" : round (chain .noncore_fees_collected , 4 ),
290+ "noncore_to_dao" : round (chain .noncore_to_dao_usd , 4 ),
291+ "noncore_to_vebal" : round (chain .noncore_to_vebal_usd , 4 ),
292+ "dao_share_pct" : round (self .run_config .fee_config .noncore_dao_share_pct * 100 , 2 ),
293+ "vebal_share_pct" : round (self .run_config .fee_config .noncore_vebal_share_pct * 100 , 2 )
294+ })
295+
296+ df = pd .DataFrame (output )
297+ start_date = datetime .datetime .fromtimestamp (self .date_range [0 ]).date ()
298+ end_date = datetime .datetime .fromtimestamp (self .date_range [1 ]).date ()
299+ output_path = (
300+ PROJECT_ROOT / output_path / f"{ self .run_config .protocol_version } _noncore_{ start_date } _{ end_date } .csv"
301+ )
302+ output_path .parent .mkdir (exist_ok = True )
303+
304+ df .to_csv (output_path , index = False )
305+ return output_path
306+
278307 def generate_bribe_payload (
279308 self ,
280309 input_csv : str ,
0 commit comments