This is a submission for the quadratic funding hackathon.
Use any up-to-date browser with metamask installed.
Import private keys into metamask. There are 3 types of accounts:
- administrators - can start/finish the QF voting round, approve funders and projects
- projects - will receive tokens after funding is completed
- funders - M+C holders who can vote for projects
Open the app, select kovan testnet and connect with metamask. The app has different interfaces for administrators and for any other account, depending on which account is currently open.
- Start QF round.
A QF round can be started by administrator, if the previous round is completed. QF round has a duration.
- Add funds.
Any M+C token holder can add funds to the QF pool. These tokens will be distributed among projects based on the results of voting. During voting, tokens are placed in the contract. Tokens cannot be added after the end of the QF round.
- Add projects.
Anyone can add a new project during the QF round. The entered address will receive tokens after voting.
- Approve projects.
The administrator approve projects.
- Funding.
Any approved address can QF-vote for any approved project utill the end of the QF round. One vote for each project is available. M+C tokens sent for voting are placed in the contract.
- Finish.
Administrator can finish current QF-round at any time. This is the most gas-consuming operation. All funded tokens are distributed between projects using QF math. If there are no voted projects, all tokens remain in the contract for the next QF round. It is possible that some small number of tokens remain in the contract as a result of rounding errors.
I used wtfisqf.com to check the correctness of qf calculations.
Watch or download the demo video.
Contract is deployed in the kovan testnet.
Feel free to communicate.