Skip to content
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: Properly handle forfeited incentives during position transfers #7776

Closed
AlpinYukseloglu opened this issue Mar 19, 2024 · 0 comments · Fixed by #7785
Closed

fix: Properly handle forfeited incentives during position transfers #7776

AlpinYukseloglu opened this issue Mar 19, 2024 · 0 comments · Fixed by #7785

Comments

@AlpinYukseloglu
Copy link
Contributor

Background

Due to the way we handle position transfers manually, it seems as though forfeited incentives are trickier to handle under the "redeposit forfeited incentives" design we're switching to. Since the position is not technically being removed, redepositing these incentives directly would be odd (e.g. the original position would still get a pro-rata portion).

Instead, it seems appropriate to simply retain the incentives in the transferred position if we're able to find a way to do it safely.

Suggested Design

At a first glance, it seems as though simply not collecting incentives before the transfer (i.e. removing the code below) should be sufficient:

if _, _, err := k.collectIncentives(ctx, sender, positionId); err != nil {
return err
}

We should double check this to make sure that it does not lead to any unintended behavior. It is technically also possible that we send to community pool here, but this feels inelegant and would reintroduce some of the problems that prompted the change to redepositing forfeited incentives.

Acceptance Criteria

  • Incentive forfeiting for positions transfers are handled properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant