Repository navigation
Conversation
|
@Helfff Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds conviction voting to the protocol governance and community poll modules, so support for a proposal accumulates over time with exponential decay instead of being decided by a single one-shot vote. A proposal executes once its conviction crosses a threshold that scales with the requested share of the treasury.
Related Issue
Changes
🗳️ Conviction Voting
[MODIFY]
creator-keys/src/protocol_governance.rsstake_on(holder, proposal_id, amount)andwithdraw_stake(holder, proposal_id, amount)with per-holder stake tracking.conviction = conviction * decay + stakeusing fixed-point math.conviction_of(proposal_id)andthreshold_for(requested_amount)views; the threshold scales with the requested treasury share.execute(proposal_id), which transfers the requested amount once conviction exceeds the threshold and reverts on double execution.[MODIFY]
creator-keys/src/community_polls.rs[MODIFY]
creator-keys/src/events.rsstaked,unstaked, andproposal_executedevents.Verification Results
Not run as part of this PR's changed-file list; no test files were modified.
executechecks thresholdCloses #1252