balancer / backend

MIT License
11 stars 8 forks source link

Use API pricing for volume and fee in snapshots #773

Open franzns opened 1 month ago

franzns commented 1 month ago

We should also use API pricing for volume and fees (and any other USD values) in v2 snapshots. https://github.com/balancer/backend/pull/769

We should try to align the v2 snapshot service and v3 snapshot service as much as possible.

franzns commented 1 month ago

It would be great if we could align the v2 snapshots in subgraph to the v3 snapshots in the new subgraph. I think the biggest issue currently is that we dont get non-USD values for volume.

@mendesfabio is that possible or should we not touch the v2 snapshots in subgraph?

mendesfabio commented 1 month ago

I think that makes sense. I prefer if this can be handled in the API so we don't have to worry about pricing assets on SG 😅 the problem maybe will be sync it historically but I will have a look into what's possible

franzns commented 1 month ago

Why would historical sync be a problem?

What I would imagine is that you provide both the USD and the non-USD values. We can then use our own pricing and fall back to subgraph pricing if we must.