balancer-subgraph-v2 icon indicating copy to clipboard operation
balancer-subgraph-v2 copied to clipboard

fix: `totalLiquidity` reported as 0

Open gosuto-inzasheru opened this issue 1 year ago • 3 comments

the ANKR/ankrETH pool on arbitrum comes back with a totalLiquidity of 0, even though official ui says different.

not sure if this is a fluke for this particular pool or if it is a chain/system wide bug

{
  pools(
    where: {id: "0x9f8ed1acfe0c863381b9081aff2144fc867aa7730002000000000000000004d4"}
  ) {
    symbol
    totalLiquidity
  }
}

https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2/graphql?query=%7B%0A++pools%28%0A++++where%3A+%7Bid%3A+%220x9f8ed1acfe0c863381b9081aff2144fc867aa7730002000000000000000004d4%22%7D%0A++%29+%7B%0A++++symbol%0A++++totalLiquidity%0A++%7D%0A%7D

gosuto-inzasheru avatar Mar 29 '24 14:03 gosuto-inzasheru

in addition, totalLiquidity for PYUSD/sDOLA comes back as $118k versus $276k in the ui

is there a more reliable attribute to query than totalLiquidity? or is the subgraph just lagging/bugged?

gosuto-inzasheru avatar Mar 29 '24 14:03 gosuto-inzasheru

thanks for reporting, I'm going to investigate this. do you need daily TVL or just the latest one? if just the latest then you could use the API instead of the Subgraph, it's more reliable for USD figures.

mendesfabio avatar Apr 01 '24 13:04 mendesfabio

this is part of a query that we eventually want to integrate into the api, so the more it is based on subgraph data the better (for now)

gosuto-inzasheru avatar Apr 01 '24 14:04 gosuto-inzasheru