How Governance Action Vote Totals are Calculated in GovTool

DRep Vote Total Equation

GovTool aims to show vote total values which help the user gauge likelihood of ratification of an action.

Intro definitions

  • 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

For a governance action

💭 Abstain Total

  • Total voting power of DRep Abstain votes + auto-abstain stake

Yes Total

  • 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 Percentage

  • (Yes Total / Total Active Stake) x 100

No Total

  • 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 Percentage

  • (No Total / Total Active Stake) x 100

🗳️ Not Voted Total (remainder of Total Active Stake)

  • Total Active Stake - Yes Total - No Total

🗳️ Not Voted Percentage (remainder of Total Active Stake Percentage)

  • 100 - yes percentage - no percentage

    • this should equal ((Total Active Stake - Yes Total - No Total) / Total Active Stake ) * 100

DRep Vote Total Implementation

See GovTool's SQL query run on DB-Sync. This pulls all the proposal data, and vote totals.

Example

  • 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

SPO Vote Totals

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

Last updated