-
Notifications
You must be signed in to change notification settings - Fork 608
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
fix: Implement retaining rewards for transfers (backport #7785) #7802
Conversation
* implement retaining rewards for transfers * add changelog * clean up tests * driveby test cleanup * Revert "driveby test cleanup" This reverts commit b1952b9. * update transfer method spec * fix conflicts * lint (cherry picked from commit d28ed22) # Conflicts: # CHANGELOG.md # x/concentrated-liquidity/msg_server_test.go # x/concentrated-liquidity/position.go
Cherry-pick of d28ed22 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Important Auto Review SkippedBot user detected. To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Closes: #7776
What is the purpose of the change
This PR removes reward claiming logic that previously executing prior to position transfers. Since the transfers are done through manual reassignment of ownership over position IDs, handling forfeited incentives become tricky/hacky since the positions do not actually move (see issue for further discussion).
Spread reward claiming is also removed for consistency. This also makes the transfer function run more efficiently, as these claims were not necessary for the correct functioning of the logic.
Testing and Verifying
Tests in
position_test.go
are updated to ensure that claiming of old and new rewards (both incentives and spread rewards) function properly (i.e. go to the new owner and not the old).Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)Summary by CodeRabbit
This is an automatic backport of pull request #7785 done by [Mergify](https://mergify.com).