Skip to content
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 #6994

Draft
wants to merge 150 commits into
base: master
Choose a base branch
from
Draft

Optimistic Project Funding #6994

wants to merge 150 commits into from

Conversation

ndkazu
Copy link
Contributor

@ndkazu ndkazu commented Dec 24, 2024

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.

Integration

Review Notes

Terminology

The constants available in the runtime for the OPF Pallet:

  • MaxProjects: Maximum number of Whitelisted projects that can be handled by the pallet.
  • VotingPeriod: Period in which people can vote. After the period has ended, the votes are counted (STOP THE COUNT) and then the funds are distributed into Spends.
  • ClaimingPeriod: Time for claiming a Spend. After the period has passed, a spend is thrown away and the funds are available again for distribution in the pot.
  • VoteValidityPeriod: Period after which all the votes are reset.

Functions

  • - register_project: Register by OpenGov, should take AccountId and project Purpose.
  • - unregister_project: Unregister by OpenGov
  • - claim: To claim a spend

Checklist

pallet-opf

  • Pallet Config
  • Helper functions
  • Extrinsics
  • Events & Tests
  • Benchmarking & weights
  • Remove Dev-mode
  • Proper documentation

@ndkazu ndkazu requested a review from a team as a code owner December 24, 2024 12:34
Copy link
Contributor

@gui1117 gui1117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can open the PR as a draft until it is ready.

Or ping when it is ready.

@gui1117 gui1117 marked this pull request as draft December 29, 2024 10:13
Comment on lines +345 to +346
let call = Call::<T>::on_registration { project_id: project_id.clone() };
let proposal = Self::create_proposal(who.clone(), call);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You really only should use conviction-voting, then you don't need to create a proposal etc.

@paritytech-review-bot paritytech-review-bot bot requested a review from a team February 15, 2025 13:34
@ndkazu ndkazu requested a review from bkchr February 17, 2025 08:15
@ndkazu ndkazu marked this pull request as draft February 19, 2025 14:04
@ndkazu
Copy link
Contributor Author

ndkazu commented Feb 20, 2025

@bkchr & @pandres95, I am trying to understand how to use conviction-voting, and for that I looked into Open-Gov, and all the terminology. My reference point is the democracy pallet as I have experience with it.
My question: by using the Polling trait, doesn't it mean by definition that we have non-bidding votes that do not necessary lead_to/trigger anything happening on-chain? if so, instead of creating a poll with T::Polls::create_ongoing() (which seems to be for benchmarking only, so how do you actually create a poll?) in conviction-voting, shouldn't we use the referenda pallet to create a referendum (submit extrinsic) that will trigger the desired action on-chain. Or am I misunderstanding the difference between a poll creation and a referenda creation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants