BalancerMaxis / bal_tools

1 stars 0 forks source link

Refactor protocol_fee_allocators helper.py into bal_tools #4

Closed Tritium-VLK closed 2 months ago

Tritium-VLK commented 4 months ago

https://github.com/BalancerMaxis/protocol_fee_allocator/blob/main/fee_allocator/helpers.py There's a helpers.py file in this repo. Refactor all of this into bal_tools.

notes:

Consider writing/maintaining an onchain recon.py file (think there is one in old repo too) that does final checks of everything as well as including validation or sense checking when RPCs are available. If no RPC, warn but do not fail.

get_block_by_ts - maybe already there

get_twap_bpt_price - V3 API now has BPT pricing. Talk to Franz about how to use it, build queries into bal_tools/subgraph. Use this to generate a twap without RPC.

def get_balancer_pool_snapshots + fetch_all_pool_info - This looks like it is handled by subgraph.py in bal_tools. Think about pagination maybe if it's not already done.

def aura_vebal_share: Check bal_tools for functions that already exist to use/adapt/feedback on.

hh_bribs - maybe build into ecosystem.py? Maybe move into somewhere else?

jalbrekt85 commented 3 months ago

def get_balancer_pool_snapshots + fetch_all_pool_info - This looks like it is handled by subgraph.py in bal_tools. Think about pagination maybe if it's not already done.

we will have to hold off on transitioning to the v3 api for this as the required data is not currently accessible

I prompted franz, there is now a ticket for implementing a query that would directly get fees from a snapshot.

can track here: https://github.com/balancer/backend/issues/408

Tritium-VLK commented 3 months ago

Chainlink is trying to eventually depricate automation V1. Part of this could be about migratiing old upkeeps.

jalbrekt85 commented 2 months ago

solved in v0.1.0