-
Notifications
You must be signed in to change notification settings - Fork 743
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
Optimistic Project Funding #5162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind writing briefly how the voting would work? I feel this is quite a big deviation from what I had in mind
The Voting Logic would be managed in a different pallet ( |
Just to be clear here - "whitelisting" a project is done via OpenGov and creates a list of "projects" (addresses) that can be funded via OPF. "Voting" as part of OPF implementation is users locking their DOT at some conviction to allocate funding to projects that are on the whitelist - this is not done through OpenGov and should be handled through the implementation of OPF. Is this what you are implementing? |
simple pallet that locks DOT & distributes to nominated projects based on locked amount from the pot What I did/understood: |
@lolmcshizz and @marcuspang , I added a bare-bone |
@kianenigma , I added Benchmarking for the Distribution Pallet, but I get the following error when trying to run the benchmark:
I need your help please. |
The CI is showing a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I gave this a really brief review. Sorry if I will now talk a little bit bullshit, but I did not read all the comments, nor I'm aware of the entire history of this project.
So, I would change the structure of this project:
- Use
conviction-voting
for doing the voting. This pallet is already battletested, audited and provides all the required functionality. - For the project registration (which is not yet supported as far as I have seen?) I would propose that you take
pallet-referenda
and change it in the way we need it here. (Cloning it into a new pallet) We would need the functionality for registering projects via a special origin. Then we would need the this period functionality that removes all the votes after X amount of time. The handling of the pot (not sure why we need extra locking of the pot, as the pallet is the only one controlling this account). The payout logic.
All of that should not be that complicated to implement and parts of it already exists in pallet-referenda
.
If we do the period for the user votes, we probably also want some period for the projects? Maybe longer like 1 year, but they should also not stay there forever.
Description
This PR is related to this issue .
Through the introduction of the OPF pallet and the DISTRIBUTION pallet, we are handling the Optimistic Project Funding.
It allows users to nominate projects (whitelisted in OpenGov) with their DOT. This mechanism will be funded with a constant stream of DOT taken directly from inflation and distributed to projects based on the proportion of DOT that has nominated them. The nominations are handled by the OPF Pallet, while the project rewards distribution is handled by the Distribution Pallet.
The Distribution Pallet receives the list of Whitelisted/Nominated Projects with their respective calculated rewards. For each project, it will create a corresponding Spend that will be stored until the project reward can be claimed. At the moment, the reward claim period start corresponds to: [beginning of an Epoch_Block + BufferPeriod] (The BufferPeriod can be configured in the runtime).
User’s conviction has been implemented.
The voting round timeline is described below for someone voting for a project with no conviction round_0 and
for another project with a conviction of 1x in round_1:
Integration
Review Notes
Terminology
The constants available in the runtime for the OPF Pallet:
The constants available in the runtime for the Distribution Pallet:
Checklist
pallet-distribution
pallet-opf