You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@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.
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.
The text was updated successfully, but these errors were encountered: