subgraphs icon indicating copy to clipboard operation
subgraphs copied to clipboard

#bug; Curve Finance (Ethereum) inaccurate pool outputTokenPriceUSD and totalValueLockedUSD?

Open TKYAngus opened this issue 2 years ago • 1 comments

Subgraph: https://api.thegraph.com/subgraphs/name/messari/curve-finance-ethereum Pool: 3pool (0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7)

At the time of writing the official website shows USD total reserve is $515,742,026.11 image

DefiLlama shows $516.01m image

While in Messari subgraph totalValueLockedUSD of the liquidity pool hourly snapshot shows it's only $503,268,334.596, which seems off to me image

If I look into utils, looks like we are using the LP token amount * LP token price in getPoolTVL() to calculate the TVL in USD. LP token address is 0x6c3f90f043a72fa612cbac8115ee7e52bde6e490

Yet the LP token price is always 1, which is different from the "virtual price" 1.0238 shown in the pool contract (get_virtual_price) or other oracle price. image

Can we have a check if there is such issue? Thanks!

TKYAngus avatar Feb 21 '23 16:02 TKYAngus

@TKYAngus Sorry for the late response on this. We were having pricing issues with 0x6c3f90f043a72fa612cbac8115ee7e52bde6e490so it was hardcoded to 1. We are currently making fixes to the price library that should address this issue and other DEX related pricing things. Will keep you updated on this here!

bye43 avatar Mar 06 '23 19:03 bye43