Inspiration
For communities who need to manage common goods, to provide settlements and to agree on many other things, getting everybody to vote on everything all the time doesn't scale well.
Similarly to a branch on a tree which grows progressively, some issues might grow in importance and some not. Maybe nobody wishes to spend more time on a question after a few votes, or maybe some members want to be sure the outcome is final to accept it.
Serial Justice aims to provide an efficient solution by tokenizing justice and getting people to vote only as much as needed. Voting less often enables having a better knowledge of each issue. And each time a voter is designated, there is an opportunity to debate about the issue.
What it does
A democratic token called Justice Token is periodically minted for all members of DAO.
Any member of the DAO can burn one token to submit a new question. This will randomly select a DAO member to answer this question. If the voter does not vote after a given period of time, a new voter will be picked. If anyone disagrees with the new result, he can spend one more Justice Token to request a new vote.
After a certain number of votes, the answer can be considered statistically representative of the DAO members and getting more people to vote won't change the answer. At this point the answer is final.
How we built it
Serial Justice is built as a reusable DAO extension. The MainDAO contract can define the rules for membership and in particular ensure that there are no duplicate members.
The SerialJustice contract manages the question list, submission and answers. Chainlink VRF is used to randomly pick voters while Chainlink Automation allows to automatically pick a different voter if no answer was provided.
The JusticeToken is a derived ERC20 token which uses Chainlink Automation to periodically mint new JT tokens to all its members. Only the SerialJustice contract is allowed to burn tokens when a new voter is requested.
The Foundry development framework is used to deploy the contracts, create a VRF subscription and perform unit/integration tests.
The deployment parameters are then exported to a Python web3 script which performs a simulation on a testnet.
Challenges we ran into
- Separating the complexity into different contracts and define their interactions
- How to handle simultaneous random number requests
- How to efficiently export contract deployments from Foundry to another tool
Accomplishments that we're proud of
- Turning abstract ideas into effective code
- Building a DAO extension which can be easily used on different projects
- Producing a layout which enables communities to more efficiently and reliably produce agreement, manage common goods, settle disputes
What we learned
- How to integrate multiple contracts to build complex projects
- How to use inheritance to create custom ERC20 tokens
- Write awesome tests and simulation
What's next for Serial Justice
- Build a Next.js app to view, submit and answer questions
- Add support for questions with multiple possible answers
- Enhance the algorithm defining when an answer is final
- Engage the community and answer questions together
Log in or sign up for Devpost to join the conversation.