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

feat: take into account hideAbstain when computing results #1091

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jan 13, 2025

Summary

Closes: https://github.com/snapshot-labs/workflow/issues/380

This PR uses the hideAbstain property in the space settings, when computing results.

When hideAbstain is enabled, abstain in basic voting is ignored from the quorum and results

// when hide_abstain = false
total_score = for_score + against_score + abstain_score

// when hide_abstain = true
total_score = for_score + against_score 

How to test

  1. Go to a space with hideAbstain enabled: http://localhost:8080/#/s:safe.eth/proposal/0x5cf64434792565591b005460db0460e9314753178d4aa5475dfc0ce4d45638a2
  2. The results should exclude abstain choice from the results list, and quorum should not take abstain scores into account. Results should be same as v1 https://v1.snapshot.box/#/safe.eth/proposal/0x5cf64434792565591b005460db0460e9314753178d4aa5475dfc0ce4d45638a2

Notes

Excluding ABSTAIN from all scores results in lower quorum, and is marking a proposal that have passed before this PR as rejected (see the example proposal above)

Since the hide_abstain option can change proposal outcome depending on its setting, it should not be a global option, and each proposal should have its own local copy (like privacy)

@wa0x6e wa0x6e changed the title feat: take into account hide abstain when computing results feat: take into account hideAbstain when computing results Jan 13, 2025
@wa0x6e wa0x6e force-pushed the feat-implement-hide-abstain-into-quorum-calculation branch from e5b2df9 to 92edb6d Compare January 13, 2025 22:48
@wa0x6e wa0x6e marked this pull request as ready for review January 13, 2025 22:53
@wa0x6e wa0x6e requested a review from bonustrack January 13, 2025 22:53
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

Successfully merging this pull request may close these issues.

1 participant