Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit a766735

Browse files
committed
skip deposits with 0 amount
1 parent 4946bc2 commit a766735

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

fee_allocator/fee_allocator.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ def generate_bribe_payload(
302302
usdc.approve(self.book["hidden_hand2/bribe_vault"], total_bribe_usdc)
303303

304304
for _, row in bribe_df.iterrows():
305+
if int(row["amount"]) == 0:
306+
continue
305307
prop_hash = self._get_prop_hash(row["platform"], row["target"])
306308
mantissa = int(row["amount"] * 1e6)
307309

@@ -310,25 +312,28 @@ def generate_bribe_payload(
310312
elif row["platform"] == "aura":
311313
aura_bribe_market.depositBribe(prop_hash, self.book["tokens/USDC"], mantissa, 0, 1)
312314

313-
vebal_usdc_amount = (
315+
"""
316+
transfer txs
317+
"""
318+
usdc.transfer(payment_df["target"], payment_df["amount"])
319+
320+
spent_usdc = int(total_bribe_usdc + (payment_df["amount"] * 1e6))
321+
vebal_usdc_amount = int(
314322
self.run_config.mainnet.web3.eth.contract(usdc.address, abi=get_abi("ERC20"))
315323
.functions.balanceOf(builder.safe_address)
316324
.call()
317-
- sum(df["amount"])
325+
- spent_usdc
318326
- 1
319327
)
328+
320329
vebal_bal_amount = (
321330
self.run_config.mainnet.web3.eth.contract(bal.address, abi=get_abi("ERC20"))
322331
.functions.balanceOf(builder.safe_address)
323332
.call()
324333
)
325334

326-
"""
327-
transfer txs
328-
"""
329-
usdc.transfer(payment_df["target"], payment_df["amount"])
330-
usdc.transfer(self.book["maxiKeepers/veBalFeeInjector"], vebal_usdc_amount * 1e6)
331-
bal.transfer(self.book["maxiKeepers/veBalFeeInjector"], vebal_bal_amount * 1e18)
335+
usdc.transfer(self.book["maxiKeepers/veBalFeeInjector"], vebal_usdc_amount)
336+
bal.transfer(self.book["maxiKeepers/veBalFeeInjector"], vebal_bal_amount)
332337

333338
datetime_file_header = datetime.datetime.fromtimestamp(
334339
self.date_range[1]

0 commit comments

Comments
 (0)