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 and Staking #92

Closed
alcueca opened this issue Dec 20, 2019 · 1 comment · Fixed by #192
Closed

Voting and Staking #92

alcueca opened this issue Dec 20, 2019 · 1 comment · Fixed by #192
Assignees
Labels
new New feature or request reusable Contract to be reused in other implementations
Projects

Comments

@alcueca
Copy link
Contributor

alcueca commented Dec 20, 2019

Consider how a voting library could be built for DAO.sol.

The idea is that there are several actions that can be voted. The actions are known at coding time (for example, investing in a new venture, distributing dividends and raising funds).

Voting is the same for all actions. There is a staking token and each token is one vote. Each token cannot be used for more than one voting simultaneously.

I would like the logic to be reused between voting actions, only changing the resulting action if the vote is successful.

We might have to mess with function signatures and things like that, no idea really.

@alcueca alcueca added new New feature or request reusable Contract to be reused in other implementations labels Dec 20, 2019
@alcueca alcueca added this to To do in v0.0.1 via automation Dec 20, 2019
@uivlis uivlis mentioned this issue Feb 10, 2020
@alcueca
Copy link
Contributor Author

alcueca commented Feb 12, 2020

@uivlis, thinking on this contract, it could be coded with a very similar structure to Issuance.sol.

Each Voting.sol contract that is deployed represents one voting process towards a single proposal.

Voting.sol takes in the constructor the address for an ERC20 contract to use as voting token, the quorum and the majority.

Voting in the proposal actually means transferring those ERC20 tokens as a "yes" or a "no" to the voting contract.

Votes can be withdrawn at any time, meaning that the ERC20 tokens go back to the voter.

If at any time the quorum (% of ERC20 totalSupply) and majority (% of yes vs no) are met anyone can move the Voting to the "PASSED" status. Votes can be now withdrawn, the Voting remains as "PASSED".

Not sure how to move a vote to "FAILED" status, we can think of that later.

Executing the proposal that results of the Voting would be done by a different contract. Let's do this one and then discuss proposal execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new New feature or request reusable Contract to be reused in other implementations
Projects
No open projects
v0.0.1
  
To do
Development

Successfully merging a pull request may close this issue.

2 participants