Open
Conversation
27ead09 to
b932148
Compare
b932148 to
bdffde8
Compare
|
|
||
| self.inner.actual_partner_locked_lp = actual_lock_amount | ||
| .safe_mul(self.inner.partner_locked_lp)? | ||
| .safe_div(total_lp_to_lock)?; |
Contributor
There was a problem hiding this comment.
can total_lp_to_lock be zero?
| self.inner | ||
| .common_validate_self_partnered_creator_claim_lp_action()?; | ||
|
|
||
| // Must lock first to know actual locked lp amount |
Contributor
There was a problem hiding this comment.
What happen if percentage of locked lp is zero? they actually they dont need to lock, just claim directly
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.
Context
After DAMM pool migrated, if lock LP action was delayed a lot, a lot of the trading fees will be locked into the pool and become non claimable.
Solution
During lock LP action, we attempt to separate fee LP from lock LP amount based on virtual price increased and do not lock the fee lp amount.
Breaking change
If migrator doesn't
lockbeforeclaimaction after this PR deployment, theclaimwill fail.