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

Off-chain voting and SIP-018 #3

Open
radicleart opened this issue Jun 18, 2022 · 0 comments
Open

Off-chain voting and SIP-018 #3

radicleart opened this issue Jun 18, 2022 · 0 comments

Comments

@radicleart
Copy link

Prop for Implementing Off Chain Voting

This is a suggestion for implementing off-chain or batch voting alongside the model for delegate voting see -PR 2.

The solution is based on / mirrors the reference implementation of SIP-018 - see money-order example.

The solution only impacts the EDE001 Proposal Voting extension introducing a new function batch-vote which overrides vote for off-chain voting.

The vote data contains the voter principal and the signature is created by voter - note this is compatible with delegate voting since it makes no difference whether the voter is a delegate (proxy) voter or direct voter.

(batch-vote (signed-votes (list 100 { signature: (buff 65), 
               vote: {
                    amount: uint, 
                    for: bool, 
                    proposal: principal, 
                    governance-token: <governance-token-trait>, 
                    voter: principal}})))
      ...
      (fold batch-vote-iter signed-votes (ok true))

The votes are unfolded and the signatures checked before counting the vote on the proposal.

E.g.

(batch-vote-iter (signed-vote { signature: (buff 65), vote: {
                amount: uint, for: bool, proposal: principal, 
                governance-token: <governance-token-trait>, voter: principal}}))

(verify-signed-structured-data ...
@radicleart radicleart transferred this issue from Clarity-Innovation-Lab/executor-dao Jun 29, 2022
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

No branches or pull requests

1 participant