Add beets fee split on Optimism#125
Conversation
|
@franzns is this ready for review? can you solve conflict and remove draft status? |
This is not yet a finished implementation but serves as a POC to assess the needed code-changes in the fee-allocator-v2 and decide whether it is feasible to integrate the fee-split into the process. If we decide to move forward and integrate the fee split, I'll put up all needed PRs, resolve any conflicts and mark them as ready for review. |
|
This PR depends on
and can only be reviewed/merged after the above have been merged. |
|
@franzns you can point to the specific branches for the dependencies to be able to do test runs and evaluate the code changes |
I can, but wouldnt it make more sense to merge the dependent PRs first and then have a proper PR here that points to prod branches? |
|
@franzns it would help us evaluate everything and you could then do test runs. Makes it easier for us to review, usually how we operate with such feature changes. Thanks |
Everything is updated to use the specific branches. What would be the best way to trigger a test fee run? |
gosuto-inzasheru
left a comment
There was a problem hiding this comment.
i used gha-biweekly-fees-1749217417...gha-biweekly-fees-1750258817#diff-6a8606c6cac86f715f1c824a9782d0a1b0383bd24f290860ad8b5ba8bc500df6R65 for a diff between the artifacts of the test fee run for this pr and the respective prod run
fee_allocator/fees_collected/v2_fees_2025-05-22_2025-06-05.json
Outdated
Show resolved
Hide resolved
| "base": 16742345432, | ||
| "mainnet": 17707104378 | ||
| "mainnet": 17707104378, | ||
| "optimism": 1856000000 |
|
i still need to compare artifacts! |
|
@franzns i was able to let the ci test suite run, but |
|
new PR with allocation: #159 Still need to check tests EDIT: test worked it seems 😅 |
Biweekly Fee Report ending 2025-07-03
Biweekly Fee Report ending 2025-07-03
jalbrekt85
left a comment
There was a problem hiding this comment.
can you add a test that checks the beets fee share? i think you should be able to just add optimism to the input fees in the allocator pytest fixture and then have a test_beets_split or something that makes sure the new fee split is working as intended
fee_allocator/accounting/chains.py
Outdated
| try: | ||
| chain = CorePoolChain(self, chain_name, fees, self.w3_by_chain[chain_name]) | ||
| except ConnectionError as e: | ||
| print(f"Failed to initialize chain {chain_name} with fees {fees}. trying again after 10s...") | ||
| # retry with delay | ||
| time.sleep(10) | ||
| chain = CorePoolChain(self, chain_name, fees, self.w3_by_chain[chain_name]) | ||
| print(f"Successfully initialized chain {chain_name} with fees {fees}.") |
There was a problem hiding this comment.
Do you want to keep this or remove @jalbrekt85 ?
There was a problem hiding this comment.
i think it should be removed, gosuto added retry logic to the w3 class here already: BalancerMaxis/bal_tools#112
Beets Fee split as per BIP here: https://forum.balancer.fi/t/bip-800-deploy-balancer-v3-on-op-mainnet/6415
This is not yet a finished implementation but serves as a POC to assess the needed code-changes in the fee-allocator-v2 and decide whether it is feasible to integrate the fee-split into the process.
TLDR of the split:
I have added this split to the allocator, the recon, as well as any output files and the resulting payloads.
The fee-allocator-v2 pulls some data from package dependencies (bal_tools or bal_addresses) as well as fetching it from github raw URLs. Currently in this PR, these are either hard-coded in the allocator code, or adapted in the local dependency tree for testing. I have not yet PR'ed these changes as I want to align on this POC first. Here is a list of changes in the dependencies that would be needed if we decide to move forward:
add optimism here to production chains so the action builds core-pools cache:
https://github.com/BalancerMaxis/bal_addresses/blob/main/extras/chains.json#L48
add ECLP core pools here:
https://raw.githubusercontent.com/BalancerMaxis/bal_addresses/main/config/core_pools_whitelist.json
add optimism here: https://github.com/BalancerMaxis/bal_tools/blob/main/bal_tools/pools_gauges.py#L300
add beets_share_pct here: https://raw.githubusercontent.com/BalancerMaxis/multisig-ops/main/config/protocol_fees_constants.json