How Governance Action Vote Totals are Calculated in GovTool
Last updated
Last updated
GovTool aims to show vote total values which help the user gauge likelihood of ratification of an action.
Active DRep stake = all the voting power of DReps within the active state
(This does not include any in-active DReps OR retired DReps)
Total Active Stake = Active DRep stake + auto no confidence stake
We do not include any abstain within this, as they are not part of ratification equation
Total voting power of DRep Abstain votes + auto-abstain stake
IF governance action type != 'NoConfidence'
Total of voting power of DReps Yes votes
IF governance action type == 'NoConfidence'
Total of voting power of DReps Yes votes + auto no confidence stake
(Yes Total / Total Active Stake) x 100
IF governance action type != 'NoConfidence'
Total of voting power of DReps No votes + auto no confidence stake
IF governance action type == 'NoConfidence'
Total of voting power of DReps No votes
(No Total / Total Active Stake) x 100
Total Active Stake - Yes Total - No Total
100 - yes percentage - no percentage
this should equal ((Total Active Stake - Yes Total - No Total) / Total Active Stake ) * 100
See GovTool's SQL query run on DB-Sync. This pulls all the proposal data, and vote totals.
GovTool takes DRep voting power from drep_distr
table of DB-Sync for the registered DReps and the "predefined voting option DReps", this data is only updated once per epoch.
GovTool takes the newest vote from DReps for that governance action, filtering out votes from DReps who have recently retired.
So we have some DRep John Doe, who voted yes
on X governance action
John Doe has 100k Voting power coming from his own stake and all delegators (we are taking that value directly from db-sync (no calculations on GovTool side))
We have another DRep - Andre, who has 200k Voting power!
Andre also likes the governance action and votes yes
As a result - we display the sum of their voting powers, so it would be 300k for yes
votes
Important note - John Doe and Andre can change their votes
For SPOs logic is completely the same as the DReps one - the difference is that we are taking the voting power from a different table - dedicated to SPOs (pool_stat
)