cardano-graphql icon indicating copy to clipboard operation
cardano-graphql copied to clipboard

"Live Stake" calculation

Open CyberCyclone opened this issue 4 years ago • 5 comments

I've been looking into a way to calculated the "live stake" for a while now and I can't seem to find an obvious way to do it. Having the "Active Stake" is awesome, but lacks real time tracking of stake. This makes it difficult to track a pools real-time saturation level.

I've tried looking into db-sync and while there's a "stake_address" table, I can't see an easy way to lookup the amount against the stake address AND whether that stake address is still delegated to a particular pool (in real-time).

Can you please let me know if you know this is currently possible with the current schema (db-sync) or if this is something that will be implemented in the future?

Thanks!

CyberCyclone avatar Nov 17 '20 10:11 CyberCyclone

Agree this is a useful query to make, and one that the client should not need to calculate.

rhyslbw avatar Nov 27 '20 12:11 rhyslbw

Bump

xray-robot avatar Apr 03 '21 21:04 xray-robot

Quick update: I have an upcoming body of work that is a prerequisite to facilitate this feature. It's an overall improvement in both capabilities and quality when interfacing with cardano-node

rhyslbw avatar Apr 21 '21 09:04 rhyslbw

Would be very useful to have live stake available from a postgres table in cardano-db-sync...

3cogito avatar Apr 29 '21 06:04 3cogito

Here is a query that Smaug pool use with pool.pm: https://gist.github.com/SmaugPool/892f5bc18bf5c6e52245e1b7bd0bed84

longngn avatar Aug 19 '21 13:08 longngn