Feat/tiered staking rewards#321
Open
alexatsejames-alt wants to merge 3 commits intoceejaylaboratory:mainfrom
Open
Feat/tiered staking rewards#321alexatsejames-alt wants to merge 3 commits intoceejaylaboratory:mainfrom
alexatsejames-alt wants to merge 3 commits intoceejaylaboratory:mainfrom
Conversation
|
@alexatsejames-alt 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! 🚀 |
Author
|
"Just checking in to see if there’s any additional context or testing I can provide to help with the review whenever you have a moment. Thanks!" |
Author
|
Hi, I’ve completed the implementation for tiered staking rewards. |
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.
Closes #244
Problem
When a user re-staked with a shorter lock tier, lock_end was always
overwritten with now + tier.lock_seconds, allowing a 1-month re-stake
to shrink an active 12-month lock. rate_multiplier was also updated
independently, so the two fields could drift out of sync.
Fix
lock_end and rate_multiplier now only update together when the new lock
extends further than the current one. This preserves the user's best
lock window and keeps the multiplier consistent with the lock end.