From ce2a70f7f2b6b148b73fa0fb9d0f07376eca64f0 Mon Sep 17 00:00:00 2001 From: alpo Date: Thu, 14 Mar 2024 00:25:09 -0700 Subject: [PATCH 1/2] remove redundant collect incentives from withdraw logic --- x/concentrated-liquidity/lp.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/x/concentrated-liquidity/lp.go b/x/concentrated-liquidity/lp.go index db4caa8980d..30669918ce8 100644 --- a/x/concentrated-liquidity/lp.go +++ b/x/concentrated-liquidity/lp.go @@ -290,17 +290,14 @@ func (k Keeper) WithdrawPosition(ctx sdk.Context, owner sdk.AccAddress, position } // If the requested liquidity amount to withdraw is equal to the available liquidity, delete the position from state. - // Ensure we collect any outstanding spread factors and incentives prior to deleting the position from state. This claiming - // process also clears position records from spread factor and incentive accumulators. + // Ensure we collect any outstanding spread factors prior to deleting the position from state. Outstanding incentives + // should already be fully claimed by this point. This claiming process also clears position records from spread factor + // and incentive accumulators. if requestedLiquidityAmountToWithdraw.Equal(position.Liquidity) { if _, err := k.collectSpreadRewards(ctx, owner, positionId); err != nil { return osmomath.Int{}, osmomath.Int{}, err } - if _, _, err := k.collectIncentives(ctx, owner, positionId); err != nil { - return osmomath.Int{}, osmomath.Int{}, err - } - if err := k.deletePosition(ctx, positionId, owner, position.PoolId); err != nil { return osmomath.Int{}, osmomath.Int{}, err } From eb02101c74d5cb641aa8c6dccc7cf8dd8ea30818 Mon Sep 17 00:00:00 2001 From: alpo Date: Thu, 14 Mar 2024 00:32:30 -0700 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb4c4570bf..593b9852a44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#7685](https://github.com/osmosis-labs/osmosis/pull/7685) Speedup CL actions by only marshalling for CL hooks if they will be used. * [#7503](https://github.com/osmosis-labs/osmosis/pull/7503) Add IBC wasm light clients module * [#7689](https://github.com/osmosis-labs/osmosis/pull/7689) Make CL price estimations not cause state writes (speed and gas improvements) +* [#7747](https://github.com/osmosis-labs/osmosis/pull/7747) Remove redundant call to incentive collection in CL position withdrawal logic ## v23.0.6-iavl-v1 (contains everything in v23.0.6)