Giter Site home page Giter Site logo

Voting and Staking about contracts HOT 1 CLOSED

alcueca avatar alcueca commented on May 22, 2024
Voting and Staking

from contracts.

Comments (1)

alcueca avatar alcueca commented on May 22, 2024

@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.

from contracts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.