diff --git a/fee_allocator/accounting/chains.py b/fee_allocator/accounting/chains.py index 5637f99..de5d684 100644 --- a/fee_allocator/accounting/chains.py +++ b/fee_allocator/accounting/chains.py @@ -7,7 +7,7 @@ from web3 import Web3 import requests -from bal_tools import Subgraph, BalPoolsGauges, Web3RpcByChain +from bal_tools import Subgraph, BalPoolsGauges, Web3RpcByChain, StakeDAO import joblib from bal_tools.subgraph import DateRange from bal_tools.models import PoolSnapshot, Pool @@ -115,6 +115,14 @@ def set_core_pool_chains_data(self): _chains[chain_name] = chain self._chains = _chains + self._set_bribe_threshold() + + def _set_bribe_threshold(self) -> None: + end_block = self._chains["mainnet"].block_range[1] + self.fee_config.min_total_bribe_threshold = StakeDAO().calculate_dynamic_min_incentive( + block_number=end_block + ) + logger.info(f"min_total_bribe_threshold: ${self.fee_config.min_total_bribe_threshold} (block {end_block})") def set_initial_pool_allocation(self) -> None: """ diff --git a/fee_allocator/accounting/models.py b/fee_allocator/accounting/models.py index ba6c39d..e82cefb 100644 --- a/fee_allocator/accounting/models.py +++ b/fee_allocator/accounting/models.py @@ -1,9 +1,7 @@ -from pydantic import BaseModel, model_validator, validator +from pydantic import BaseModel, validator from decimal import Decimal from typing import Dict, NewType, Optional -from bal_tools import StakeDAO - Pools = Dict[NewType("PoolId", str), NewType("Symbol", str)] InputFees = Dict[NewType("CorePoolChainName", str), NewType("FeesCollected", int)] @@ -26,11 +24,6 @@ class GlobalFeeConfig(BaseModel): beets_share_pct: Decimal - @model_validator(mode="after") - def set_dynamic_min_total_bribe_threshold(self): - self.min_total_bribe_threshold = StakeDAO().calculate_dynamic_min_incentive() - return self - class AlliancePool(BaseModel): """ diff --git a/multisig-ops b/multisig-ops deleted file mode 160000 index 5f170f8..0000000 --- a/multisig-ops +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5f170f855edd45a12bd5906353662c35f3c853db