From c9f27b2685bbd7841a9831fbe90950b24781a1e7 Mon Sep 17 00:00:00 2001 From: jalbrekt85 Date: Sun, 25 Jan 2026 17:09:13 -0600 Subject: [PATCH 1/3] increase amount of rounds threshold calc considers, add block num param --- bal_tools/ecosystem.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bal_tools/ecosystem.py b/bal_tools/ecosystem.py index 248b68f..8b36db7 100644 --- a/bal_tools/ecosystem.py +++ b/bal_tools/ecosystem.py @@ -200,7 +200,7 @@ class StakeDAO: def __init__(self): self.subgraph = Subgraph() - def get_aura_max_votes_from_snapshot(self, n_rounds: int = 2) -> int: + def get_aura_max_votes_from_snapshot(self, n_rounds: int = 5) -> int: data = self.subgraph.fetch_graphql_data( subgraph="snapshot", query="get_aura_gauge_proposals", @@ -211,7 +211,7 @@ def get_aura_max_votes_from_snapshot(self, n_rounds: int = 2) -> int: raise ValueError("No Aura gauge weight proposals found on Snapshot") return int(max(p["scores_total"] for p in proposals if p.get("scores_total"))) - def get_cpv_from_analytics(self, n_rounds: int = 2) -> float: + def get_cpv_from_analytics(self, n_rounds: int = 4) -> float: metadata_url = f"{self.ANALYTICS_BASE_URL}/rounds-metadata.json" response = requests.get(metadata_url, timeout=30) response.raise_for_status() @@ -233,14 +233,15 @@ def get_cpv_from_analytics(self, n_rounds: int = 2) -> float: return statistics.mean(cpv_values) def calculate_dynamic_min_incentive( - self, n_rounds: int = 2, buffer_pct: float = 0.5 + self, n_rounds: int = 4, buffer_pct: float = 0.5, block_number: int = None ) -> int: max_votes = self.get_aura_max_votes_from_snapshot(n_rounds) avg_cpv = self.get_cpv_from_analytics(n_rounds) web3 = Web3RpcByChain(os.getenv("DRPC_KEY"))["mainnet"] + block = block_number if block_number else web3.eth.block_number aura_vebal_share = float( - self.subgraph.calculate_aura_vebal_share(web3, web3.eth.block_number) + self.subgraph.calculate_aura_vebal_share(web3, block) ) min_aura_portion = max_votes * 0.001 * (1 + buffer_pct) * avg_cpv From a01e4c34f2213a9706f5337147d6bf80e36c76ea Mon Sep 17 00:00:00 2001 From: jalbrekt85 <33009898+jalbrekt85@users.noreply.github.com> Date: Sun, 25 Jan 2026 23:11:05 +0000 Subject: [PATCH 2/3] style: ci lint with `black` --- bal_tools/ecosystem.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bal_tools/ecosystem.py b/bal_tools/ecosystem.py index 8b36db7..007170c 100644 --- a/bal_tools/ecosystem.py +++ b/bal_tools/ecosystem.py @@ -240,9 +240,7 @@ def calculate_dynamic_min_incentive( web3 = Web3RpcByChain(os.getenv("DRPC_KEY"))["mainnet"] block = block_number if block_number else web3.eth.block_number - aura_vebal_share = float( - self.subgraph.calculate_aura_vebal_share(web3, block) - ) + aura_vebal_share = float(self.subgraph.calculate_aura_vebal_share(web3, block)) min_aura_portion = max_votes * 0.001 * (1 + buffer_pct) * avg_cpv min_total_bribe = min_aura_portion / aura_vebal_share From 174c0a8e56c051fd5bd3c48be9f0af22d7dc33f2 Mon Sep 17 00:00:00 2001 From: jalbrekt85 Date: Sun, 25 Jan 2026 17:19:26 -0600 Subject: [PATCH 3/3] skip monad in tests --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index c450b07..d8b22d6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,7 +14,7 @@ load_dotenv() -exempt_chains = ["fantom", "goerli", "sonic"] +exempt_chains = ["fantom", "goerli", "sonic", "monad"] chains = [chain for chain in list(chain_ids_by_name()) if chain not in exempt_chains]