From 994b7731c9c5144fa8d2dd60784f12a3e9ae4ceb Mon Sep 17 00:00:00 2001 From: alpo Date: Tue, 19 Mar 2024 20:04:27 -0700 Subject: [PATCH 1/8] implement retaining rewards for transfers --- x/concentrated-liquidity/msg_server_test.go | 10 ++++---- x/concentrated-liquidity/position.go | 8 ------ x/concentrated-liquidity/position_test.go | 27 ++++++++++++--------- 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a/x/concentrated-liquidity/msg_server_test.go b/x/concentrated-liquidity/msg_server_test.go index 10d5b5b1a2d..45104ea6357 100644 --- a/x/concentrated-liquidity/msg_server_test.go +++ b/x/concentrated-liquidity/msg_server_test.go @@ -558,7 +558,7 @@ func (s *KeeperTestSuite) TestTransferPositions_Events() { hasIncentivesToClaim bool hasSpreadRewardsToClaim bool expectedTransferPositionsEvent int - expectedMessageEvents int + expectedMessageEvents int // We expect these to always be 0 because no additional events are being triggered isLastPositionInPool bool expectedError error }{ @@ -572,14 +572,14 @@ func (s *KeeperTestSuite) TestTransferPositions_Events() { hasIncentivesToClaim: true, numPositionsToCreate: 1, expectedTransferPositionsEvent: 1, - expectedMessageEvents: 2, // 1 for collect incentives claim send, 1 for collect incentives forfeit send + expectedMessageEvents: 0, }, "single position ID with claimable spread rewards": { positionIds: []uint64{DefaultPositionId}, hasSpreadRewardsToClaim: true, numPositionsToCreate: 1, expectedTransferPositionsEvent: 1, - expectedMessageEvents: 1, // 1 for collect spread rewards claim send + expectedMessageEvents: 0, }, "single position ID with claimable incentives and spread rewards": { positionIds: []uint64{DefaultPositionId}, @@ -587,7 +587,7 @@ func (s *KeeperTestSuite) TestTransferPositions_Events() { hasSpreadRewardsToClaim: true, numPositionsToCreate: 1, expectedTransferPositionsEvent: 1, - expectedMessageEvents: 3, // 1 for collect incentives claim send, 1 for collect incentives forfeit send, 1 for collect spread rewards claim send + expectedMessageEvents: 0, }, "two position IDs": { positionIds: []uint64{DefaultPositionId, DefaultPositionId + 1}, @@ -605,7 +605,7 @@ func (s *KeeperTestSuite) TestTransferPositions_Events() { hasSpreadRewardsToClaim: true, numPositionsToCreate: 3, expectedTransferPositionsEvent: 1, - expectedMessageEvents: 9, // 3 for collect incentives claim send, 3 for collect incentives forfeit send, 3 for collect spread rewards claim send + expectedMessageEvents: 0, }, "two position IDs, second ID does not exist": { positionIds: []uint64{DefaultPositionId, DefaultPositionId + 1}, diff --git a/x/concentrated-liquidity/position.go b/x/concentrated-liquidity/position.go index efc7abcf467..7a1a3ddb7b6 100644 --- a/x/concentrated-liquidity/position.go +++ b/x/concentrated-liquidity/position.go @@ -704,14 +704,6 @@ func (k Keeper) transferPositions(ctx sdk.Context, positionIds []uint64, sender return types.LockNotMatureError{PositionId: position.PositionId, LockId: lockId} } - // Collect any outstanding incentives and rewards for the position. - if _, err := k.collectSpreadRewards(ctx, sender, positionId); err != nil { - return err - } - if _, _, err := k.collectIncentives(ctx, sender, positionId); err != nil { - return err - } - // Delete the KVStore entries for the position. err = k.deletePosition(ctx, positionId, sender, position.PoolId) if err != nil { diff --git a/x/concentrated-liquidity/position_test.go b/x/concentrated-liquidity/position_test.go index 0a8d52eb1bc..d8d8e6e45aa 100644 --- a/x/concentrated-liquidity/position_test.go +++ b/x/concentrated-liquidity/position_test.go @@ -2440,31 +2440,34 @@ func (s *KeeperTestSuite) TestTransferPositions() { s.Require().Equal(oldPosition, newPosition) } - // Check that the incentives and spread rewards went to the old owner + // Check that the old owner's balance did not change due to the transfer postTransferOriginalOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, oldOwner) - expectedTransferOriginalOwnerFunds := preTransferOwnerFunds.Add(totalExpectedRewards...) - s.Require().Equal(expectedTransferOriginalOwnerFunds.String(), postTransferOriginalOwnerFunds.String()) + s.Require().Equal(preTransferOwnerFunds.String(), postTransferOriginalOwnerFunds.String()) - // Check that the new owner does not have any new funds + // Check that the new owner's balance did not change due to the transfer postTransferNewOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, newOwner) s.Require().Equal(preTransferNewOwnerFunds, postTransferNewOwnerFunds) - // Test that claiming incentives/spread rewards with the new owner returns nothing + // Claim rewards and ensure that previously accrued incentives and spread rewards go to the new owner for _, positionId := range tc.positionsToTransfer { - fundsToClaim, fundsToForefeit, err := s.App.ConcentratedLiquidityKeeper.GetClaimableIncentives(s.Ctx, positionId) + _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionId) s.Require().NoError(err) - s.Require().Equal(sdk.Coins{}, fundsToClaim) - s.Require().Equal(sdk.Coins{}, fundsToForefeit) - - spreadRewards, err := s.App.ConcentratedLiquidityKeeper.GetClaimableSpreadRewards(s.Ctx, positionId) + _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionId) s.Require().NoError(err) - s.Require().Equal(sdk.Coins(nil), spreadRewards) } + // Ensure all rewards went to the new owner + postClaimRewardsNewOwnerBalance := s.App.BankKeeper.GetAllBalances(s.Ctx, newOwner) + s.Require().Equal(totalExpectedRewards, postClaimRewardsNewOwnerBalance) + + // Ensure no rewards went to the old owner + postClaimRewardsOldOwnerBalance := s.App.BankKeeper.GetAllBalances(s.Ctx, oldOwner) + s.Require().Equal(preTransferOwnerFunds.String(), postClaimRewardsOldOwnerBalance.String()) + // Test that adding incentives/spread rewards and then claiming returns it to the new owner, and the old owner does not get anything totalSpreadRewards := s.fundSpreadRewardsAddr(s.Ctx, pool.GetSpreadRewardsAddress(), tc.inRangePositions) totalIncentives := s.fundIncentiveAddr(pool.GetIncentivesAddress(), tc.inRangePositions) - totalExpectedRewards := totalSpreadRewards.Add(totalIncentives...) + totalExpectedRewards := totalSpreadRewards.Add(totalIncentives...).Add(totalExpectedRewards...) s.addUptimeGrowthInsideRange(s.Ctx, pool.GetId(), apptesting.DefaultLowerTick+1, DefaultLowerTick, DefaultUpperTick, expectedUptimes.hundredTokensMultiDenom) s.AddToSpreadRewardAccumulator(pool.GetId(), sdk.NewDecCoin(ETH, osmomath.NewInt(10))) for _, positionId := range tc.positionsToTransfer { From 4a13cfcb0265599abdddd8bec58d4732bfa187db Mon Sep 17 00:00:00 2001 From: alpo Date: Tue, 19 Mar 2024 20:08:54 -0700 Subject: [PATCH 2/8] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f802d8f0c00..9a6f83dd706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#7689](https://github.com/osmosis-labs/osmosis/pull/7689) Make CL price estimations not cause state writes (speed and gas improvements) * [#7745](https://github.com/osmosis-labs/osmosis/pull/7745) Add gauge id query to stargate whitelist * [#7747](https://github.com/osmosis-labs/osmosis/pull/7747) Remove redundant call to incentive collection in CL position withdrawal logic +* [#7785](https://github.com/osmosis-labs/osmosis/pull/7785) Remove reward claiming during position transfers ## v23.0.8-iavl-v1 & v23.0.8 From 01e266e11406eb971b416876a9c42320c9699f04 Mon Sep 17 00:00:00 2001 From: alpo Date: Tue, 19 Mar 2024 20:12:04 -0700 Subject: [PATCH 3/8] clean up tests --- x/concentrated-liquidity/position_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/concentrated-liquidity/position_test.go b/x/concentrated-liquidity/position_test.go index d8d8e6e45aa..1a8840e72e9 100644 --- a/x/concentrated-liquidity/position_test.go +++ b/x/concentrated-liquidity/position_test.go @@ -2449,10 +2449,10 @@ func (s *KeeperTestSuite) TestTransferPositions() { s.Require().Equal(preTransferNewOwnerFunds, postTransferNewOwnerFunds) // Claim rewards and ensure that previously accrued incentives and spread rewards go to the new owner - for _, positionId := range tc.positionsToTransfer { - _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionId) + for _, positionID := range tc.positionsToTransfer { + _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionID) s.Require().NoError(err) - _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionId) + _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionID) s.Require().NoError(err) } @@ -2467,7 +2467,7 @@ func (s *KeeperTestSuite) TestTransferPositions() { // Test that adding incentives/spread rewards and then claiming returns it to the new owner, and the old owner does not get anything totalSpreadRewards := s.fundSpreadRewardsAddr(s.Ctx, pool.GetSpreadRewardsAddress(), tc.inRangePositions) totalIncentives := s.fundIncentiveAddr(pool.GetIncentivesAddress(), tc.inRangePositions) - totalExpectedRewards := totalSpreadRewards.Add(totalIncentives...).Add(totalExpectedRewards...) + totalExpectedRewards := totalExpectedRewards.Add(totalSpreadRewards...).Add(totalIncentives...) s.addUptimeGrowthInsideRange(s.Ctx, pool.GetId(), apptesting.DefaultLowerTick+1, DefaultLowerTick, DefaultUpperTick, expectedUptimes.hundredTokensMultiDenom) s.AddToSpreadRewardAccumulator(pool.GetId(), sdk.NewDecCoin(ETH, osmomath.NewInt(10))) for _, positionId := range tc.positionsToTransfer { From b1952b9558adf73c6f732eea966af565026a698b Mon Sep 17 00:00:00 2001 From: alpo Date: Tue, 19 Mar 2024 20:16:20 -0700 Subject: [PATCH 4/8] driveby test cleanup --- x/concentrated-liquidity/position_test.go | 91 +++++++++++------------ 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/x/concentrated-liquidity/position_test.go b/x/concentrated-liquidity/position_test.go index 1a8840e72e9..3d880db1b40 100644 --- a/x/concentrated-liquidity/position_test.go +++ b/x/concentrated-liquidity/position_test.go @@ -2393,66 +2393,65 @@ func (s *KeeperTestSuite) TestTransferPositions() { if tc.expectedError != nil { s.Require().Error(err) s.Require().ErrorIs(err, tc.expectedError) - } else { - s.Require().NoError(err) + } + s.Require().NoError(err) - // Check that the positions we wanted transferred were modified appropriately - for _, positionId := range tc.positionsToTransfer { - newPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) - s.Require().NoError(err) + // Check that the old owner's balance did not change due to the transfer + postTransferOriginalOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, oldOwner) + s.Require().Equal(preTransferOwnerFunds.String(), postTransferOriginalOwnerFunds.String()) - oldPosition := model.Position{} - for _, initialPosition := range initialUserPositions { - if initialPosition.PositionId == newPosition.PositionId { - oldPosition = initialPosition - break - } - } + // Check that the new owner's balance did not change due to the transfer + postTransferNewOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, newOwner) + s.Require().Equal(preTransferNewOwnerFunds, postTransferNewOwnerFunds) - // All position values except the owner should be the same in the new position as it was in the old one. - s.Require().Equal(oldPosition.UpperTick, newPosition.UpperTick) - s.Require().Equal(oldPosition.LowerTick, newPosition.LowerTick) - s.Require().Equal(oldPosition.PoolId, newPosition.PoolId) - s.Require().Equal(oldPosition.JoinTime, newPosition.JoinTime) - s.Require().Equal(oldPosition.Liquidity, newPosition.Liquidity) + // Check that the positions we wanted transferred were modified appropriately + for _, positionId := range tc.positionsToTransfer { + newPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) + s.Require().NoError(err) - // The new position should have the new owner - s.Require().Equal(newOwner.String(), newPosition.Address) + oldPosition := model.Position{} + for _, initialPosition := range initialUserPositions { + if initialPosition.PositionId == newPosition.PositionId { + oldPosition = initialPosition + break + } } - allPositions := append(tc.inRangePositions, tc.outOfRangePositions...) - positionsNotTransfered := osmoutils.DisjointArrays(allPositions, tc.positionsToTransfer) + // All position values except the owner should be the same in the new position as it was in the old one. + s.Require().Equal(oldPosition.UpperTick, newPosition.UpperTick) + s.Require().Equal(oldPosition.LowerTick, newPosition.LowerTick) + s.Require().Equal(oldPosition.PoolId, newPosition.PoolId) + s.Require().Equal(oldPosition.JoinTime, newPosition.JoinTime) + s.Require().Equal(oldPosition.Liquidity, newPosition.Liquidity) - // Check that the positions not transferred were not modified - for _, positionId := range positionsNotTransfered { - oldPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) - s.Require().NoError(err) + // The new position should have the new owner + s.Require().Equal(newOwner.String(), newPosition.Address) + } - newPosition := model.Position{} - for _, initialPosition := range initialUserPositions { - if initialPosition.PositionId == oldPosition.PositionId { - newPosition = initialPosition - break - } - } + allPositions := append(tc.inRangePositions, tc.outOfRangePositions...) + positionsNotTransfered := osmoutils.DisjointArrays(allPositions, tc.positionsToTransfer) - // All position values should be the same in the new position as it was in the old one. - s.Require().Equal(oldPosition, newPosition) - } + // Check that the positions not transferred were not modified + for _, positionId := range positionsNotTransfered { + oldPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) + s.Require().NoError(err) - // Check that the old owner's balance did not change due to the transfer - postTransferOriginalOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, oldOwner) - s.Require().Equal(preTransferOwnerFunds.String(), postTransferOriginalOwnerFunds.String()) + newPosition := model.Position{} + for _, initialPosition := range initialUserPositions { + if initialPosition.PositionId == oldPosition.PositionId { + newPosition = initialPosition + break + } + } - // Check that the new owner's balance did not change due to the transfer - postTransferNewOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, newOwner) - s.Require().Equal(preTransferNewOwnerFunds, postTransferNewOwnerFunds) + // All position values should be the same in the new position as it was in the old one. + s.Require().Equal(oldPosition, newPosition) // Claim rewards and ensure that previously accrued incentives and spread rewards go to the new owner - for _, positionID := range tc.positionsToTransfer { - _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionID) + for _, positionId := range tc.positionsToTransfer { + _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionId) s.Require().NoError(err) - _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionID) + _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionId) s.Require().NoError(err) } From e3a43407e132043ed11f9b6bf5005f76a57b9484 Mon Sep 17 00:00:00 2001 From: alpo Date: Tue, 19 Mar 2024 20:18:56 -0700 Subject: [PATCH 5/8] Revert "driveby test cleanup" This reverts commit b1952b9558adf73c6f732eea966af565026a698b. --- x/concentrated-liquidity/position_test.go | 91 ++++++++++++----------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/x/concentrated-liquidity/position_test.go b/x/concentrated-liquidity/position_test.go index 3d880db1b40..1a8840e72e9 100644 --- a/x/concentrated-liquidity/position_test.go +++ b/x/concentrated-liquidity/position_test.go @@ -2393,65 +2393,66 @@ func (s *KeeperTestSuite) TestTransferPositions() { if tc.expectedError != nil { s.Require().Error(err) s.Require().ErrorIs(err, tc.expectedError) - } - s.Require().NoError(err) - - // Check that the old owner's balance did not change due to the transfer - postTransferOriginalOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, oldOwner) - s.Require().Equal(preTransferOwnerFunds.String(), postTransferOriginalOwnerFunds.String()) - - // Check that the new owner's balance did not change due to the transfer - postTransferNewOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, newOwner) - s.Require().Equal(preTransferNewOwnerFunds, postTransferNewOwnerFunds) - - // Check that the positions we wanted transferred were modified appropriately - for _, positionId := range tc.positionsToTransfer { - newPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) + } else { s.Require().NoError(err) - oldPosition := model.Position{} - for _, initialPosition := range initialUserPositions { - if initialPosition.PositionId == newPosition.PositionId { - oldPosition = initialPosition - break + // Check that the positions we wanted transferred were modified appropriately + for _, positionId := range tc.positionsToTransfer { + newPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) + s.Require().NoError(err) + + oldPosition := model.Position{} + for _, initialPosition := range initialUserPositions { + if initialPosition.PositionId == newPosition.PositionId { + oldPosition = initialPosition + break + } } - } - // All position values except the owner should be the same in the new position as it was in the old one. - s.Require().Equal(oldPosition.UpperTick, newPosition.UpperTick) - s.Require().Equal(oldPosition.LowerTick, newPosition.LowerTick) - s.Require().Equal(oldPosition.PoolId, newPosition.PoolId) - s.Require().Equal(oldPosition.JoinTime, newPosition.JoinTime) - s.Require().Equal(oldPosition.Liquidity, newPosition.Liquidity) + // All position values except the owner should be the same in the new position as it was in the old one. + s.Require().Equal(oldPosition.UpperTick, newPosition.UpperTick) + s.Require().Equal(oldPosition.LowerTick, newPosition.LowerTick) + s.Require().Equal(oldPosition.PoolId, newPosition.PoolId) + s.Require().Equal(oldPosition.JoinTime, newPosition.JoinTime) + s.Require().Equal(oldPosition.Liquidity, newPosition.Liquidity) - // The new position should have the new owner - s.Require().Equal(newOwner.String(), newPosition.Address) - } + // The new position should have the new owner + s.Require().Equal(newOwner.String(), newPosition.Address) + } - allPositions := append(tc.inRangePositions, tc.outOfRangePositions...) - positionsNotTransfered := osmoutils.DisjointArrays(allPositions, tc.positionsToTransfer) + allPositions := append(tc.inRangePositions, tc.outOfRangePositions...) + positionsNotTransfered := osmoutils.DisjointArrays(allPositions, tc.positionsToTransfer) - // Check that the positions not transferred were not modified - for _, positionId := range positionsNotTransfered { - oldPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) - s.Require().NoError(err) + // Check that the positions not transferred were not modified + for _, positionId := range positionsNotTransfered { + oldPosition, err := s.App.ConcentratedLiquidityKeeper.GetPosition(s.Ctx, positionId) + s.Require().NoError(err) - newPosition := model.Position{} - for _, initialPosition := range initialUserPositions { - if initialPosition.PositionId == oldPosition.PositionId { - newPosition = initialPosition - break + newPosition := model.Position{} + for _, initialPosition := range initialUserPositions { + if initialPosition.PositionId == oldPosition.PositionId { + newPosition = initialPosition + break + } } + + // All position values should be the same in the new position as it was in the old one. + s.Require().Equal(oldPosition, newPosition) } - // All position values should be the same in the new position as it was in the old one. - s.Require().Equal(oldPosition, newPosition) + // Check that the old owner's balance did not change due to the transfer + postTransferOriginalOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, oldOwner) + s.Require().Equal(preTransferOwnerFunds.String(), postTransferOriginalOwnerFunds.String()) + + // Check that the new owner's balance did not change due to the transfer + postTransferNewOwnerFunds := s.App.BankKeeper.GetAllBalances(s.Ctx, newOwner) + s.Require().Equal(preTransferNewOwnerFunds, postTransferNewOwnerFunds) // Claim rewards and ensure that previously accrued incentives and spread rewards go to the new owner - for _, positionId := range tc.positionsToTransfer { - _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionId) + for _, positionID := range tc.positionsToTransfer { + _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionID) s.Require().NoError(err) - _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionId) + _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionID) s.Require().NoError(err) } From 8b0977fed54641554dcef683174d03d163fcccfe Mon Sep 17 00:00:00 2001 From: alpo Date: Wed, 20 Mar 2024 22:50:21 -0700 Subject: [PATCH 6/8] update transfer method spec --- x/concentrated-liquidity/position.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/concentrated-liquidity/position.go b/x/concentrated-liquidity/position.go index 7a1a3ddb7b6..39a28529721 100644 --- a/x/concentrated-liquidity/position.go +++ b/x/concentrated-liquidity/position.go @@ -671,8 +671,7 @@ func (k Keeper) updateFullRangeLiquidityInPool(ctx sdk.Context, poolId uint64, l // For each position ID, it retrieves the corresponding position and checks if the sender is the owner of the position. // If the sender is not the owner, it returns an error. // It then checks if the position has an active underlying lock, and if so, returns an error. -// It then collects any outstanding incentives and rewards for the position, deletes the KVStore entries for the position, -// and restores the position under the recipient's account. +// It then deletes the KVStore entries for the position, and restores the position under the recipient's account. // If any of these operations fail, it returns the corresponding error. // If all operations succeed, it returns nil. func (k Keeper) transferPositions(ctx sdk.Context, positionIds []uint64, sender sdk.AccAddress, recipient sdk.AccAddress) error { From 1855916ead012fd9819ba9b1cf7b6a18a528eee9 Mon Sep 17 00:00:00 2001 From: alpo Date: Thu, 21 Mar 2024 08:47:10 -0700 Subject: [PATCH 7/8] fix conflicts --- x/concentrated-liquidity/position_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/concentrated-liquidity/position_test.go b/x/concentrated-liquidity/position_test.go index b70af04f4b4..450babdf06f 100644 --- a/x/concentrated-liquidity/position_test.go +++ b/x/concentrated-liquidity/position_test.go @@ -2453,7 +2453,7 @@ func (s *KeeperTestSuite) TestTransferPositions() { for _, positionID := range tc.positionsToTransfer { _, err = s.App.ConcentratedLiquidityKeeper.CollectSpreadRewards(s.Ctx, newOwner, positionID) s.Require().NoError(err) - _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionID) + _, _, _, err := s.App.ConcentratedLiquidityKeeper.CollectIncentives(s.Ctx, newOwner, positionID) s.Require().NoError(err) } From e191dea845c940a12d0859addb369e3d6634ec57 Mon Sep 17 00:00:00 2001 From: alpo Date: Thu, 21 Mar 2024 08:56:12 -0700 Subject: [PATCH 8/8] lint --- x/concentrated-liquidity/position.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/concentrated-liquidity/position.go b/x/concentrated-liquidity/position.go index ef980e39240..39a28529721 100644 --- a/x/concentrated-liquidity/position.go +++ b/x/concentrated-liquidity/position.go @@ -702,7 +702,7 @@ func (k Keeper) transferPositions(ctx sdk.Context, positionIds []uint64, sender if positionHasActiveUnderlyingLock { return types.LockNotMatureError{PositionId: position.PositionId, LockId: lockId} } - + // Delete the KVStore entries for the position. err = k.deletePosition(ctx, positionId, sender, position.PoolId) if err != nil {