Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion fee_allocator/accounting/chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
"""
Expand Down
9 changes: 1 addition & 8 deletions fee_allocator/accounting/models.py
Original file line number Diff line number Diff line change
@@ -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)]
Expand All @@ -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):
"""
Expand Down
1 change: 0 additions & 1 deletion multisig-ops
Submodule multisig-ops deleted from 5f170f