balancer / backend

MIT License
22 stars 9 forks source link

Updates from Fabio #971

Open franzns opened 1 month ago

franzns commented 1 month ago

Hey @mendesfabio , can you please share updates on these points

  1. [ ] #19
  2. [ ] #408
  3. [ ] Adapt v2 subgraph to expose same fields as v3 subgraph (volume, fee per token, not USD)
  4. [ ] #412
  5. [x] Estimate on our monthly spend with the Graph
  6. [ ] #773
franzns commented 1 month ago

The Graph spend is roughly $300/month

mendesfabio commented 1 month ago

speaking of all SG-related topics I'm wrapping up the migration of both gauges and v2 to the subgraphs monorepo - which for v2 includes adapting schema to follow v3's standards, adding fees

https://api.studio.thegraph.com/query/31386/balancer-v2-vault/version/latest

it'd be great if you can just check schema in the playground. If you try to do some queries you'll notice pre-minted BPTs are messing up things but I'm working to fix it.

franzns commented 1 month ago

it'd be great if you can just check schema in the playground. If you try to do some queries you'll notice pre-minted BPTs are messing up things but I'm working to fix it.

I checked the schema for snapshots and pools which look good to me. Best would be to actually integrate the new schema into the API to see how much we can align v2 and v3 transformations. We are working on a big refactor currently, we can do a test integration after that.

Only thing I noticed is that you renamed joinExit to addRemove, right? That would be breaking on our end and I assume for other integrations as well. For us it doesnt matter much as we use deployment IDs and can adapt before moving to the new version. Wonder if we need to support joinExit still for others.

franzns commented 2 weeks ago

@mendesfabio is it possible to add lifetime values to the pool entity?

mendesfabio commented 2 weeks ago

do you mean exposing liquidity, volumes, etc, as array in the pool entity? if that's much better for you, happy to make the change, but note the cumulative/lifetime values (volume, total protocol fee, etc) are currently exposed in the pool tokens. btw i've deployed v2 pools and vault subgraph to base for testing of one the production chains.

franzns commented 2 weeks ago

do you mean exposing liquidity, volumes, etc, as array in the pool entity? if that's much better for you, happy to make the change, but note the cumulative/lifetime values (volume, total protocol fee, etc) are currently exposed in the pool tokens.

Its different on the snapshot. Would be great to align it. Not sure which way is better tbh. I dont think it changes much for us.

btw i've deployed v2 pools and vault subgraph to base for testing of one the production chains.

Nice! We'll check this out!