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
15 changes: 11 additions & 4 deletions fee_allocator/accounting/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from pydantic import BaseModel, validator
from pydantic import BaseModel, model_validator, validator
from decimal import Decimal
from typing import Dict, NewType, Optional

from bal_tools.ecosystem import HiddenHand


Pools = Dict[NewType("PoolId", str), NewType("Symbol", str)]
InputFees = Dict[NewType("CorePoolChainName", str), NewType("FeesCollected", int)]
Expand All @@ -24,19 +26,24 @@ class GlobalFeeConfig(BaseModel):
min_aura_incentive: int
min_existing_aura_incentive: int
min_vote_incentive_amount: int

# Core pool fee splits
vebal_share_pct: Decimal
dao_share_pct: Decimal
vote_incentive_pct: Decimal

# Non-core pool fee splits
noncore_vebal_share_pct: Decimal
noncore_dao_share_pct: Decimal

# Beets fee split (https://forum.balancer.fi/t/bip-800-deploy-balancer-v3-on-op-mainnet)
beets_share_pct: Decimal

@model_validator(mode="after")
def set_dynamic_min_aura_incentive(self):
self.min_aura_incentive = int(HiddenHand().get_min_aura_incentive())
return self


class AlliancePool(BaseModel):
"""
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ def allocator(fee_period):
input_fees,
fee_period,
cache_dir=Path("tests/cache"),
use_cache=True
use_cache=True,
protocol_version="v3"
)
Loading