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

Commit 3c45245

Browse files
Merge branch 'biweekly-runs' into gha-mimic-fees-1762420409
2 parents 14e186c + c4f6206 commit 3c45245

7 files changed

Lines changed: 45 additions & 11 deletions

File tree

fee_allocator/accounting/chains.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
FEE_CONSTANTS_URL,
3232
ALLIANCE_CONFIG_URL,
3333
PARTNER_CONFIG_URL,
34+
EZKL_POOLS_URL,
3435
POOL_OVERRIDES_URL
3536
)
3637
from fee_allocator.accounting.decorators import round, require_pool_fee_data
@@ -69,6 +70,7 @@ def __init__(
6970
self.fee_config = GlobalFeeConfig(**requests.get(FEE_CONSTANTS_URL).json())
7071
self.alliance_config = AllianceConfig(**requests.get(ALLIANCE_CONFIG_URL).json())
7172
self.partner_config = PartnerConfig(**requests.get(PARTNER_CONFIG_URL).json())
73+
self.ezkl_pools = requests.get(EZKL_POOLS_URL).json()
7274

7375
pool_overrides_raw = requests.get(POOL_OVERRIDES_URL).json()
7476

@@ -288,8 +290,13 @@ def _fetch_partner_pools(self) -> Dict[str, Partner]:
288290

289291
if partner.pool_types:
290292
for pool_type in partner.pool_types:
291-
pool_ids = self.subgraph.fetch_pools_by_type(pool_type)
292-
logger.info(f"Found {len(pool_ids)} {pool_type} pools for {partner.name} on {self.name}")
293+
if pool_type == "EZKL":
294+
chain_ezkl_data = self.chains.ezkl_pools.get(self.name, {})
295+
pool_ids = chain_ezkl_data.get(self.chains.protocol_version, [])
296+
logger.info(f"Found {len(pool_ids)} EZKL {self.chains.protocol_version} pools for {partner.name} on {self.name}")
297+
else:
298+
pool_ids = self.subgraph.fetch_pools_by_type(pool_type)
299+
logger.info(f"Found {len(pool_ids)} {pool_type} pools for {partner.name} on {self.name}")
293300

294301
for pool_id in pool_ids:
295302
# Skip if already added from explicit list
@@ -319,7 +326,6 @@ def _get_pool_category(self, has_gauge: bool, is_core: bool) -> Optional[str]:
319326
elif not is_core and not has_gauge:
320327
return "non_core_without_gauge"
321328
elif is_core and not has_gauge:
322-
logger.error("Invalid state: Core pool must have gauge")
323329
return None
324330
return None
325331

fee_allocator/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FEE_CONSTANTS_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/protocol_fees_constants.json"
22
ALLIANCE_CONFIG_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/alliance_fee_share.json"
33
PARTNER_CONFIG_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/partner_fee_share.json"
4+
EZKL_POOLS_URL = "https://raw.githubusercontent.com/BalancerMaxis/bal_addresses/main/outputs/ezkl_pools.json"
45
POOL_OVERRIDES_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/pool_incentives_overrides.json"
56
SNAPSHOT_URL = "https://hub.snapshot.org/graphql?"
67
HH_API_URL = "https://api.hiddenhand.finance/proposal"

fee_allocator/fee_allocator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def generate_bribe_csv(
305305
noncore_total_to_beets_usd = sum(chain.noncore_to_beets_usd + chain.alliance_noncore_to_beets_usd + chain.partner_noncore_to_beets_usd for chain in self.run_config.all_chains)
306306
output.append(
307307
{
308-
"target": "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f", # DAO msig
308+
"target": "0x16b0056636Fcc85f92C49cD49a24bc519d4A1941", # Balancer Onchain Ltd msig
309309
"platform": "payment",
310310
"amount": self.run_config.total_to_dao_usd + noncore_total_to_dao_usd,
311311
}
@@ -750,4 +750,4 @@ def generate_report(self, payload_path: Path, fee_files: List[Path] = None) -> P
750750
if not gauge_issues_path.exists():
751751
gauge_issues_path = None
752752

753-
return save_markdown_report(payload_path, fee_files, output_path=report_path, gauge_issues_path=gauge_issues_path)
753+
return save_markdown_report(payload_path, fee_files, output_path=report_path, gauge_issues_path=gauge_issues_path)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"avalanche": 370149388,
3+
"base": 4726164967,
4+
"arbitrum": 24475711886,
5+
"polygon": 12284347826,
6+
"optimism": 2014172038,
7+
"gnosis": 19296737423,
8+
"mainnet": 190640914196
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"avalanche": 17037904970,
3+
"base": 127943496102,
4+
"gnosis": 4869862296,
5+
"arbitrum": 8701144463,
6+
"optimism": 528740192,
7+
"plasma": 74462862951,
8+
"mainnet": 33661436626
9+
}

fee_allocator/payload_visualizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def group_transactions(self, transactions: List[Dict]) -> Dict[str, List[Dict]]:
147147
recipient = tx.get("contractInputsValues", {}).get("_to", "").lower()
148148
if recipient == self.book.get("maxiKeepers/veBalFeeInjector", "").lower():
149149
groups["veBAL Transfers"].append(tx)
150-
elif recipient == self.book.get("multisigs/dao", "0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f").lower():
150+
elif recipient == self.book.get("multisigs/balancer_onchain_ltd", "0x16b0056636Fcc85f92C49cD49a24bc519d4A1941").lower():
151151
groups["DAO Transfers"].append(tx)
152152
elif recipient == self.book.get("multisigs/beets_treasury").lower():
153153
groups["Beets Transfers"].append(tx)
@@ -882,4 +882,4 @@ def save_combined_report(payload_path: Path, v2_fees_file: Path = None, v3_fees_
882882
else:
883883
print(markdown_content)
884884
else:
885-
visualize_combined_payload(args.payload_file, args.v2_fees, args.v3_fees, args.gauge_issues)
885+
visualize_combined_payload(args.payload_file, args.v2_fees, args.v3_fees, args.gauge_issues)

tests/conftest.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,20 @@ def chain(run_config, web3):
4444

4545
@pytest.fixture
4646
def allocator(fee_period):
47-
input_fees = {"mainnet": Decimal("10000000.0"), "optimism": Decimal("10000.0")}
47+
input_fees = {
48+
"mainnet": Decimal("1000000"),
49+
"arbitrum": Decimal("1000000"),
50+
"polygon": Decimal("1000000"),
51+
"optimism": Decimal("1000000"),
52+
"base": Decimal("1000000"),
53+
"gnosis": Decimal("1000000"),
54+
"avalanche": Decimal("1000000"),
55+
"plasma": Decimal("1000000"),
56+
}
4857

4958
return FeeAllocator(
50-
input_fees,
51-
fee_period,
52-
cache_dir=Path("tests/cache"),
59+
input_fees,
60+
fee_period,
61+
cache_dir=Path("tests/cache"),
5362
use_cache=True
5463
)

0 commit comments

Comments
 (0)