-
Notifications
You must be signed in to change notification settings - Fork 381
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
feat(dapp-staking): Rework bonus rewards mechanism (#1379) #1385
feat(dapp-staking): Rework bonus rewards mechanism (#1379) #1385
Conversation
Hi, I tried to make this pull request more complete than the last one but it is missing documentation in case this needs to be reworked. Still working on the benchmarking. |
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.
Thanks you for the effort, but you should have checked if issue is available before starting to work on it.
I did a quick glance, and there are lots of either minor issues or breaking bugs. E.g. the way decoding was done before and now would completely break dApp staking without proper migration.
We don't have capacity to support comments/improvements now, thank you for understanding.
Thank you for reviewing. I realize I should have asked first and completed all aspects, including benchmarking and proper storage migration, before submitting the PR. Given this issue is part of the Kudos Carnival initiative, I'd appreciate completing these remaining components properly if you're willing to provide guidance or not. I'm committed to delivering a comprehensive implementation. |
fad04c4
to
0e070a7
Compare
- Introduced move extrinsic for stake reallocation - Implemented bonus status tracking with SafeMovesRemaining - Configured logic for max bonus moves and forfeiture - Added unit tests to validate bonus rewards functionality - Added benchmarking and V8 to V9 migration logic - Added comprehensive documentation for stake movement - Updated bonus reward documentation with move conditions Part of dApp Staking bonus rewards mechanism rework AstarNetwork#1379
22c081b
to
c3d5e0d
Compare
I have completed a full implementation of the bonus rewards mechanism rework, addressing all major components: Core Implementation:
Technical Requirements:
Documentation:
All tests are passing and the code is up to date with master. Ready for review. |
Hey @sylvaincormier, sorry but it's not possible at the moment. Out of interest, I just took a glance at the migration you implemented - it would brick the chain because of extensive resource usage. |
Context
This pull request addresses issue #1379, reworking the dAppStaking bonus rewards mechanism to improve user flexibility and align with community feedback.
Features Implemented
move
extrinsic for reallocating stake while preserving bonuses.MaxBonusMovesPerPeriod
,TempBonusMovesForOngoingPeriod
).SingularStakingInfo
to includeBonusStatus
:SafeMovesRemaining(u8)
tracks remaining moves.BonusForfeited
indicates forfeited bonuses.Notes
unstake
andstake
logic for minimal code duplication.Tests
All related tests pass:
References
nomination_transfer
logic for reference.