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

Snapshot proposal breakdown and votes fixes #2350

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

mudrila
Copy link
Contributor

@mudrila mudrila commented Sep 13, 2024

  • Fix Snapshot proposals visualization with multiple strategies
  • Providing info about voting weight per strategy for the vote
  • Fix NaN in the breakdown when there're no votes on snapshot proposal

Note problem with the breakdown:
Screenshot 2024-09-13 at 17 19 16

Note how we weren't showing all the voting strategies that are applicable for the proposal and voting weight per strategy on the specific vote entry:
Screenshot 2024-09-13 at 17 18 05

Updated implementation:
Screenshot 2024-09-13 at 17 10 18

…viding info about voting weight per strategy for the vote
@mudrila mudrila added bug Something isn't working enhancement New feature or request labels Sep 13, 2024
@mudrila mudrila self-assigned this Sep 13, 2024
Copy link

netlify bot commented Sep 13, 2024

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 0b2f25d
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/66e831fcefd1b200080d6a82
😎 Deploy Preview https://deploy-preview-2350.app.dev.decentdao.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@nicolaus-sherrill nicolaus-sherrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mudrila, the multiple voting options in the results looks good.

I'm afraid I don't know enough about the multiple voting strategies to be able to provide and concrete review or direction here. I'm guessing multiple strategies = multiple NFTs? Is voting happening in our UI or in Snapshot? How can I test this all out myself?

The UI showing what I am guessing are multiple NFTs being used to vote is a bit confusing to me — idk how the different NFTs affect the vote here. But beyond that, I can't give this any further formal review.

@mudrila
Copy link
Contributor Author

mudrila commented Sep 16, 2024

Thanks @mudrila, the multiple voting options in the results looks good.

I'm afraid I don't know enough about the multiple voting strategies to be able to provide and concrete review or direction here. I'm guessing multiple strategies = multiple NFTs? Is voting happening in our UI or in Snapshot? How can I test this all out myself?

The UI showing what I am guessing are multiple NFTs being used to vote is a bit confusing to me — idk how the different NFTs affect the vote here. But beyond that, I can't give this any further formal review.

Not only NFTs - these "symbols" are representing different voting strategies (better to say different voting power calculation strategies) within Snapshot. You can use multiple snapshot voting strategies - like let's say you wanna enable voting power for multiple ERC-20s, or multiple ERC-721, or even both ERC-20 and ERC-721 and ERC-1155 and special voting power to council members - but also provide different voting weight for holders of different tokens / members of different groups.

What you see on the screen is proposal that represents setup of ERC-1155 voting strategy, where each token ID within that ERC-1155 has different voting weight. Those users who are holding "Beer" token and "Wine" token are having 1 vote weight per 1 Beer/Wine token.
Whoever holds Vodka or Whisky has 100 voting power points per 1 Vodka / Whisky bottle token.
And finally - whoever holds "Grandpa Samohon" has 1000000000000 points of voting weight - truly super power.
And best of all - all of these bottles tokens are coming from the same ERC-1155 contract.

So now, ALCLOW represents voting strategy symbol(internal for Snapshot, it doesn't exist on ERC-1155 contract) for holders of Beer / Wine
ALCHIGH - strategy for Vodka / Whisky holders
ALCULTRA - strategy for brave samohon drinkers

The row with Total votes 221000 [ALCLOW] [ALCHIGH] [ALCULTRA] should say to user "This proposal has following voting strategies used for calculating user's voting power"
And the row with vote should say "This user voted with following weight. He has voting weight based on following voting strategies" - normally, when there's weighted voting involved - 1 user rarely holds tokens from all the voting strategies. So usually this will be just one box with one of the options. But could be all of them :)

The goal of this PR, mostly - to slightly enhance representation comparing to the old one. Previously it was just a string with first strategy - and that is simply wrong, since more strategies could be used for the specific proposal. Also this PR outlines which voting strategies are counted towards certain user's voting weight - aka "why da heck this user has such high voting power".

Hope this Snapshot Alcoholic explanation makes sense 🤣

Copy link

@nicolaus-sherrill nicolaus-sherrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the breakdown @mudrila
I'm approving but I honestly still don't fully grasp what needs to be communicated to the user effectively here. Everything you described makes sense, and I see all the pieces on the UI here but I need to understand the context more to make any further suggestions.

IDK where this voting setup work lives in our priorities after MCon, but this is something I'd like to revisit with a clearer scope of work down the road :-)

Copy link
Contributor

@DarksightKellar DarksightKellar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha funny that I just fixed the NaN bug on the typechain branch. Thought is was something I did. We can just "accept all" from the PR during merge conflict resolution

@mudrila mudrila merged commit 2c49a9b into develop Sep 18, 2024
7 checks passed
@mudrila mudrila deleted the fix/snapshot-proposal-ui-fixes branch September 18, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants