feat(nns): apply 8 Year Gang 10% bonus to voting power calculation#9896
feat(nns): apply 8 Year Gang 10% bonus to voting power calculation#9896
Conversation
Neurons that had the maximum dissolve delay (8 years) before Mission 70 reduced it to 2 years receive a 10% bonus on their bonus base stake, added to their effective stake before dissolve delay and age multipliers are applied. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Wires the previously-tagged eight_year_gang_bonus_base_e8s into the NNS neuron voting power computation by adding a 10% “8-year gang” bonus (capped to current stake) to the effective stake before dissolve-delay and age multipliers are applied.
Changes:
- Add
eight_year_gang_bonus()helper to compute 10% of the bonus base. - Update
potential_and_deciding_voting_powerto include the bonus and cap the bonus base tostake_e8s. - Add a unit test verifying the bonus base cap behavior when stake is reduced by fees.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rs/nns/governance/src/neuron/voting_power.rs | Adds helper to compute the 8-year gang bonus amount. |
| rs/nns/governance/src/neuron/types.rs | Applies capped 8-year gang bonus into potential/deciding voting power calculation. |
| rs/nns/governance/src/neuron/types/tests.rs | Adds unit test to ensure bonus base is capped to current stake. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):
-
Update
unreleased_changelog.md(if there are behavior changes, even if they are
non-breaking). -
Are there BREAKING changes?
-
Is a data migration needed?
-
Security review?
How to Satisfy This Automatic Review
-
Go to the bottom of the pull request page.
-
Look for where it says this bot is requesting changes.
-
Click the three dots to the right.
-
Select "Dismiss review".
-
In the text entry box, respond to each of the numbered items in the previous
section, declare one of the following:
-
Done.
-
$REASON_WHY_NO_NEED. E.g. for
unreleased_changelog.md, "No
canister behavior changes.", or for item 2, "Existing APIs
behave as before.".
Brief Guide to "Externally Visible" Changes
"Externally visible behavior change" is very often due to some NEW canister API.
Changes to EXISTING APIs are more likely to be "breaking".
If these changes are breaking, make sure that clients know how to migrate, how to
maintain their continuity of operations.
If your changes are behind a feature flag, then, do NOT add entrie(s) to
unreleased_changelog.md in this PR! But rather, add entrie(s) later, in the PR
that enables these changes in production.
Reference(s)
For a more comprehensive checklist, see here.
GOVERNANCE_CHECKLIST_REMINDER_DEDUP
- Rewrite potential_voting_power doc comment to lead with the two main bonuses and mention the 8 Year Gang bonus afterward. - Factor out stake_e8s and boost locals; move the 8 Year Gang bonus into its own += term so the main calculation is not overloaded. - Inline and remove the eight_year_gang_bonus helper from voting_power.rs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The bonus addition in potential_and_deciding_voting_power is now only applied when is_mission_70_voting_rewards_enabled() is true, matching the rest of the Mission 70 voting-rewards logic. Add a unit test that verifies the bonus is not applied when the flag is disabled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
N/A behind feature flag
Why
Neurons that had the maximum dissolve delay (8 years) before Mission 70 reduced it to 2 years
should receive a grandfathered 10% voting power bonus. The bonus base (
eight_year_gang_bonus_base_e8s)was already tagged on qualifying neurons (#9593) and exposed in neuron info (#9687), but was not yet
wired into the actual voting power calculation.
What
eight_year_gang_bonus()helper invoting_power.rsthat returns 10% of the bonus basepotential_and_deciding_voting_power: effective stake becomesstake + eight_year_gang_bonus(bonus_base)before dissolve delay and age multipliers are appliedstake_e8sto prevent rejection fees from inflating the bonusTesting
types/tests.rs