harmony-one / snapshot

Off-chain gasless multi-governance client. Join us on Discord https://discord.snapshot.page
https://snapshot.page
MIT License
4 stars 6 forks source link

Port additional voting mechanisms from snapshot.org #13

Closed givp closed 3 years ago

givp commented 3 years ago

Our modified Snapshot instance currently only supports Single Choice Voting. However, on snapshot.org, when creating a new proposal, you have the option to select several different voting types:

Screen Recording 2021-09-20 at 03 02 11 PM

Single Choice Voting

Each voter may select only one choice.

Approval Voting

Each voter may select any number of choices.

Quadratic Voting

Each voter may spread voting power across any number of choices. Results are calculated quadratically.

Ranked Choice Voting

Each voter may select and rank any number of choices. Results are calculated by instant-runoff counting method.

Weighted voting

Each voter may spread voting power across any number of choices.

This repo is heavily modified and now outdated so the task will not be straight forward. Unfortunately it will require manual customization to integrate.

Voting components: https://github.com/snapshot-labs/snapshot/tree/develop/src/components/Voting Snapshot docs: https://docs.snapshot.org/

victaphu commented 3 years ago

Hi @givp please assign this to me, thanks

victaphu commented 3 years ago

Hi @givp This has been completed and ready for testing https://harmony-snapshot.netlify.app/

I've also created a PR that can be merged once ready https://github.com/harmony-one/snapshot/pull/17

Some tests to perform:

Pending tests:

victaphu commented 3 years ago

Hi @givp Did a comprehensive testing of the solution with some changes. Test cases here: https://docs.google.com/spreadsheets/d/1wNlHXQ98xNqMtMgvk8iR7HdG1XCKRzN8j_OcMqTIxAU/edit#gid=227830316

Website can be tested using https://harmony-snapshot.netlify.app/

Note: added options for restricted votes when selecting Approval added option for using vote by count vs vote by staked tokens