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

voting center contract #331

Closed
6 of 16 tasks
djudjuu opened this issue Mar 12, 2020 · 2 comments · Fixed by #336
Closed
6 of 16 tasks

voting center contract #331

djudjuu opened this issue Mar 12, 2020 · 2 comments · Fixed by #336
Assignees

Comments

@djudjuu
Copy link
Contributor

djudjuu commented Mar 12, 2020

WHAT

we want new voting based on equity-tokens that upon a threshold notifies all token-holders that they need to vote too: Therefore we want 3 contracts:

Voting-Center,

Vote parameters:
  • a unique resolution_id
  • a name (string)
  • an ipfs hash holding a document what is to be voted on (maybe the resolutionId can serve as all of that? do we really need an extra string?)
  • duration, total amount of time during which tokenholders can vote
  • votes are final
  • campaign-quorum, which when reached should fire an event to notify all tokenholders
  • campaign deadling, until which campaign quorum must be reached
  • data to encode the onchain-consequences of the vote:
  • Snapshottable Token on which voting is based
  • offchainVoteParamters:
    1. percentage of total Votes coming from outside,
    2. address which is allowed to put them in,
    3. duration after end of public-phase during which offchain votes can still be submitted

Mechanics

The Voting Center should

  • be registered as a singleton with the universe contract
  • verify some basic assumptions about the different durations, such that the total period is longer than campaign and count up votes and leave the res to the VotingController (see VotingController #334 )
  • provides way for offchain-votes to be entered, before, but also after end of public voting-period
  • only tracks vote count and provides getVoteFinalCount(inFavor, Against, Total), where total is the total amount of possible votes
  • logs events if the there was a successful campaign phase
  • logs an event to indicate that a vote is final (no more votes can be added)

possibly extensions to keep in mind, would be how to do quadratic voting, (could just be another contract, but maybe we can do some nice inheritance here)

State-diagram

IMG_20200312_172132945

@djudjuu djudjuu self-assigned this Mar 12, 2020
@rudolfix
Copy link

  1. we want our voting to work for any snapshottable token issued on the platform, not just equity-tokens...
  2. let's work on two first contract first (Voting-Center) and Voting Controller
  3. some high level assumptions are missing
  • voting center is a platform singleton and available via Universe
  • it handles many concurrent votes on many differnt tokens
  • votes are identified by resolution id (bytes32)
  • yes/no votes only
  • voting is final (?) per voting address
  1. you could provide a simple state diagram of the voting process
  2. providing offchain votes requires establishing legal representative of the voting process (it's just address) - and is of course optional
  3. Let's specify VotingController in more detail. What it is going to control?
  • which tokens may be used for voting and who can initialize voting for particular vote
  1. What about defining some interface that voting initializer implement and that will return voting result by resolution id
    like
    votingResult(resolutionId) returns (VotingResult: voting pending|yes|no|)

@djudjuu djudjuu changed the title campaign voting contract voting center contract Mar 12, 2020
@djudjuu
Copy link
Contributor Author

djudjuu commented Mar 12, 2020

at voting initializer implement and that will return voting result by resolution id

i dont understand what you mean by voting-initializer? where should that be implemented? the example you gave sounds more like it would be placed in the Voting-contract so that the VoteControlled-Mixin could query it.

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 a pull request may close this issue.

2 participants