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

[WIP] Guilds Multivote offchain #299

Draft
wants to merge 2 commits into
base: v2.0
Choose a base branch
from

Conversation

MiltonTulli
Copy link
Member

Summary

This was part of work done in Infinite hackathon last October. The idea behind this was to extend BaseERC20Guild contract:

  • To have a "multivote" functionality allowing the user to vote in multiple proposals at once.
  • To have a way of executing votes in behalf of someone else with their signature.

Vote batching:

A user can send an array of votes to be executed, allowing the voting of multiple proposals in just one transaction. This mechanism works both for on- and off-chain voting (setMultipleVotes and executeSignedVotesBatches respectively).

Off-chain signature voting:

A user can now sign a vote off-chain that another user can execute.

Security features:

Each vote is part of a Merkle tree, allowing us to verify that the vote to be executed is indeed part of a block of votes. We do this using the MerkleProof smart contract by OpenZeppelin.

The voter must also sign the Merkle tree root hash. By doing this, the voter only needs to sign one message (the tree root) instead of every vote.

The combined mechanisms allow us to verify that a vote is part of a group of votes and that the voter indeed approves the group of votes.

@MiltonTulli MiltonTulli changed the title Implement Multivote onchain [WIP] Guilds Multivote offchain Jan 18, 2023
@MiltonTulli MiltonTulli marked this pull request as draft January 18, 2023 01:41
@AugustoL AugustoL added the v2.1 label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants