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

Commit 792ee5b

Browse files
fix: bring back aura vebal share calc
1 parent 5db65f7 commit 792ee5b

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

fee_allocator/accounting/chains.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def __init__(
8383
self.cache_dir.mkdir(exist_ok=True)
8484

8585
self._chains: Union[dict[str, CorePoolChain], None] = None
86+
self.aura_vebal_share: Union[Decimal, None] = None
8687
self.protocol_version = protocol_version
8788

8889

@@ -116,6 +117,15 @@ def set_core_pool_chains_data(self):
116117

117118
self._chains = _chains
118119

120+
def set_aura_vebal_share(self):
121+
if not self.mainnet:
122+
raise ValueError(
123+
"mainnet must be initialized to calculate aura vebal share"
124+
)
125+
self.aura_vebal_share = self.mainnet.subgraph.calculate_aura_vebal_share(
126+
self.mainnet.web3, self.mainnet.block_range[1]
127+
)
128+
119129
def set_initial_pool_allocation(self) -> None:
120130
"""
121131
sets the intial fee allocation for all pools for all chains

fee_allocator/fee_allocator.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def allocate(self, redistribute=True):
7070
Non-core pools: 82.5% veBAL, 17.5% DAO
7171
"""
7272
self.run_config.set_core_pool_chains_data()
73+
self.run_config.set_aura_vebal_share()
7374
self.run_config.set_initial_pool_allocation()
7475
if redistribute:
7576
self.redistribute_fees()
@@ -79,11 +80,13 @@ def redistribute_fees(self):
7980
Redistributes fees among pools based on minimum incentive amounts.
8081
8182
Pools with total incentives below the minimum threshold get their incentives
82-
redistributed to eligible pools above the threshold.
83-
83+
redistributed to eligible pools above the threshold. The threshold is scaled
84+
by Aura's veBAL share to ensure the effective Aura incentive meets the minimum.
8485
"""
85-
min_amount = self.run_config.fee_config.min_aura_incentive
86-
logger.info(f"Redistribution threshold: ${min_amount}")
86+
min_aura = Decimal(self.run_config.fee_config.min_aura_incentive)
87+
aura_share = self.run_config.aura_vebal_share
88+
min_amount = min_aura / aura_share
89+
logger.info(f"Redistribution threshold: ${min_amount:.0f} (${min_aura:.0f} min Aura / {aura_share:.2%} veBAL share)")
8790

8891
for chain in self.run_config.all_chains:
8992
pools_to_redistribute = [p for p in chain.core_pools if p.total_to_incentives_usd < min_amount]
@@ -514,7 +517,9 @@ def recon(self) -> None:
514517
"createdAt": int(datetime.datetime.now().timestamp()),
515518
"periodStart": self.date_range[0],
516519
"periodEnd": self.date_range[1],
517-
"bribeThreshold": self.run_config.fee_config.min_aura_incentive
520+
"minAuraIncentive": self.run_config.fee_config.min_aura_incentive,
521+
"auraVebalShare": float(round(self.run_config.aura_vebal_share, 4)),
522+
"bribeThreshold": int(self.run_config.fee_config.min_aura_incentive / self.run_config.aura_vebal_share)
518523
}
519524

520525
recon_file = Path(PROJECT_ROOT) / "fee_allocator/summaries" / f"{self.run_config.protocol_version}_recon.json"

0 commit comments

Comments
 (0)