-
Notifications
You must be signed in to change notification settings - Fork 607
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
test(CL): rewards logic to work on the extended price range #6328
Merged
Conversation
This file contains 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
p0mvn
added
V:state/compatible/no_backport
State machine compatible PR, depends on prior breaks
A:no-changelog
labels
Sep 6, 2023
p0mvn
commented
Sep 6, 2023
// There are 3 positions setup over the swapped range (see setupPositionsForMinSpotPriceMigration for details). | ||
// Additionally, spread factor and incentive rewards are configurable as parameters. | ||
// Returns pool id position data and actual tokens swapped in (in zero for one direction and back). | ||
func (s *KeeperTestSuite) swapToMinTickAndBack(spreadFactor osmomath.Dec, incentiveRewards sdk.Coins) (poolId uint64, positions []cl.CreatePositionData, actualAmountsSwappedIn sdk.Coins) { |
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.
Note to reviewer: the majority of the setup is extracted from TestSwap_MinSpotPriceMigration
Please do not merge before #6327 |
AlpinYukseloglu
approved these changes
Sep 7, 2023
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.
Nice work, LGTM
p0mvn
force-pushed
the
roman/min-spot-price-swap-tests
branch
from
September 8, 2023 16:33
a2dbf41
to
7bd6801
Compare
Closed
czarcas7ic
added a commit
that referenced
this pull request
Oct 13, 2023
* revert 6b3273f * Revert "refactor/test(CL): LP methods with lower min spot price (#6323)" This reverts commit 013cd96. * Revert "test(CL): rewards logic to work on the extended price range (#6328)" This reverts commit 3b5d993. * adds check back to fuzzer * Revert "test(CL): swap to new min tick and back (#6327)" This reverts commit e2ef44f. * remove unused imports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A:no-changelog
C:x/concentrated-liquidity
V:state/compatible/no_backport
State machine compatible PR, depends on prior breaks
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: #6320
What is the purpose of the change
Adds tests for collecting spread and incentive rewards. The test structure is similar to #6327
We attempt to swap to new min tick and back. Then, for positions defined over that range, we collect spread and incentive rewards and assert that the total is as expected
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)