diff --git a/fee_allocator/accounting/chains.py b/fee_allocator/accounting/chains.py index 6051434c..95c6df6d 100644 --- a/fee_allocator/accounting/chains.py +++ b/fee_allocator/accounting/chains.py @@ -31,6 +31,7 @@ FEE_CONSTANTS_URL, ALLIANCE_CONFIG_URL, PARTNER_CONFIG_URL, + EZKL_POOLS_URL, POOL_OVERRIDES_URL ) from fee_allocator.accounting.decorators import round, require_pool_fee_data @@ -69,6 +70,7 @@ def __init__( self.fee_config = GlobalFeeConfig(**requests.get(FEE_CONSTANTS_URL).json()) self.alliance_config = AllianceConfig(**requests.get(ALLIANCE_CONFIG_URL).json()) self.partner_config = PartnerConfig(**requests.get(PARTNER_CONFIG_URL).json()) + self.ezkl_pools = requests.get(EZKL_POOLS_URL).json() pool_overrides_raw = requests.get(POOL_OVERRIDES_URL).json() @@ -288,8 +290,13 @@ def _fetch_partner_pools(self) -> Dict[str, Partner]: if partner.pool_types: for pool_type in partner.pool_types: - pool_ids = self.subgraph.fetch_pools_by_type(pool_type) - logger.info(f"Found {len(pool_ids)} {pool_type} pools for {partner.name} on {self.name}") + if pool_type == "EZKL": + chain_ezkl_data = self.chains.ezkl_pools.get(self.name, {}) + pool_ids = chain_ezkl_data.get(self.chains.protocol_version, []) + logger.info(f"Found {len(pool_ids)} EZKL {self.chains.protocol_version} pools for {partner.name} on {self.name}") + else: + pool_ids = self.subgraph.fetch_pools_by_type(pool_type) + logger.info(f"Found {len(pool_ids)} {pool_type} pools for {partner.name} on {self.name}") for pool_id in pool_ids: # Skip if already added from explicit list @@ -319,7 +326,6 @@ def _get_pool_category(self, has_gauge: bool, is_core: bool) -> Optional[str]: elif not is_core and not has_gauge: return "non_core_without_gauge" elif is_core and not has_gauge: - logger.error("Invalid state: Core pool must have gauge") return None return None diff --git a/fee_allocator/constants.py b/fee_allocator/constants.py index 4747b21c..894b1489 100644 --- a/fee_allocator/constants.py +++ b/fee_allocator/constants.py @@ -1,6 +1,7 @@ FEE_CONSTANTS_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/protocol_fees_constants.json" ALLIANCE_CONFIG_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/alliance_fee_share.json" PARTNER_CONFIG_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/partner_fee_share.json" +EZKL_POOLS_URL = "https://raw.githubusercontent.com/BalancerMaxis/bal_addresses/main/outputs/ezkl_pools.json" POOL_OVERRIDES_URL = "https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/pool_incentives_overrides.json" SNAPSHOT_URL = "https://hub.snapshot.org/graphql?" HH_API_URL = "https://api.hiddenhand.finance/proposal" diff --git a/fee_allocator/fees_collected/v2_fees_2025-10-20_2025-11-03.json b/fee_allocator/fees_collected/v2_fees_2025-10-20_2025-11-03.json new file mode 100644 index 00000000..7b0cdc89 --- /dev/null +++ b/fee_allocator/fees_collected/v2_fees_2025-10-20_2025-11-03.json @@ -0,0 +1,9 @@ +{ + "avalanche": 370149388, + "base": 4726164967, + "arbitrum": 24475711886, + "polygon": 12284347826, + "optimism": 2014172038, + "gnosis": 19296737423, + "mainnet": 190640914196 +} \ No newline at end of file diff --git a/fee_allocator/fees_collected/v3_fees_2025-10-20_2025-11-03.json b/fee_allocator/fees_collected/v3_fees_2025-10-20_2025-11-03.json new file mode 100644 index 00000000..0619529e --- /dev/null +++ b/fee_allocator/fees_collected/v3_fees_2025-10-20_2025-11-03.json @@ -0,0 +1,9 @@ +{ + "avalanche": 17037904970, + "base": 127943496102, + "gnosis": 4869862296, + "arbitrum": 8701144463, + "optimism": 528740192, + "plasma": 74462862951, + "mainnet": 33661436626 +} \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index da60412f..41effd66 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -44,11 +44,20 @@ def chain(run_config, web3): @pytest.fixture def allocator(fee_period): - input_fees = {"mainnet": Decimal("10000000.0"), "optimism": Decimal("10000.0")} + input_fees = { + "mainnet": Decimal("1000000"), + "arbitrum": Decimal("1000000"), + "polygon": Decimal("1000000"), + "optimism": Decimal("1000000"), + "base": Decimal("1000000"), + "gnosis": Decimal("1000000"), + "avalanche": Decimal("1000000"), + "plasma": Decimal("1000000"), + } return FeeAllocator( - input_fees, - fee_period, - cache_dir=Path("tests/cache"), + input_fees, + fee_period, + cache_dir=Path("tests/cache"), use_cache=True )