graph-network-subgraph icon indicating copy to clipboard operation
graph-network-subgraph copied to clipboard

Getting total claimable tokens in the network

Open davekay100 opened this issue 4 years ago • 1 comments

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

davekay100 avatar Jan 21 '21 21:01 davekay100

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).

juanmardefago avatar Jul 28 '21 14:07 juanmardefago