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

Getting total claimable tokens in the network #89

Open
davekaj opened this issue Jan 21, 2021 · 1 comment
Open

Getting total claimable tokens in the network #89

davekaj opened this issue Jan 21, 2021 · 1 comment

Comments

@davekaj
Copy link
Contributor

davekaj commented Jan 21, 2021

This is not implemented right now, under graphNetwork.totalClaimableTokens . However, it could be roughly implemented by doing:

  • when a pool gets claimed for the first time, we know all those tokens are claimable, thus we add that total to the total claimable
  • When an indexer claims, then we subtract that small amount
  • When the final indexer claims, we also remove the burnt amount of tokens from that pool. Unfortunately the burnt amount will always be included in the total amount, there is no easy way to avoid this. At least it gets cleared once the final person claims for that pool
@juanmardefago
Copy link
Collaborator

If we do this, we could also track the amount burnt from rebate pools, which is currently not tracked on the subgraph.

I wanted to do this for a while, since it's one of the missing important values missing.

As @davekaj said, it would require us to copy the logic from the contracts (track amount of tokens claimable, amount of indexers that will be claiming, and when the last one claims, count the rest as burnt tokens).

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