Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Total tokens locked" in pools appear to have too high values #49

Open
atiselsts opened this issue Aug 27, 2021 · 2 comments
Open

"Total tokens locked" in pools appear to have too high values #49

atiselsts opened this issue Aug 27, 2021 · 2 comments

Comments

@atiselsts
Copy link

It's not clear what exactly totalValueLockedToken0 and totalValueLockedToken1 are reflecting.

For instance, look at this UI screenshot:
image

The price of 0.9988 DAI per GUSD, and the liquidity distribution in the pool is such that 0.9988 is the upper bound of the liquidity range. If I'm not mistaken, this effectively means that all liquidity in the pool should have been converted to GUSD. Yet the Total Tokens Locked field shows 415.99 DAI (rather than 0.00 DAI) locked, and a subgraph query of totalValueLockedToken1 confirms this.

The total USD value of the tokens (roughly the sames totalValueLockedToken0 + totalValueLockedToken1, as these are stablecoins) is also larger than the value obtained either by querying tick data or position data.
This particular pool was selected because it is very small and simple to analyze, but the same thing happens in other pools. The Total Tokens Locked are more than obtained by summing the ticks or by summing the open positions.

Even if we include uncollected fees in the amount (which I think the subgraph code does not do), the total value is still far too large.

Is this expected? If so, how to interpret the Total Tokens Locked values?

@atiselsts
Copy link
Author

Is #55 expected to fix this?

@ianlapham
Copy link
Member

@atiselsts It was intended - but looks like the change resulted in incorrect data

will need to revisit the handleCollect event and see whats happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants