From 2d76f553302a287b262498e14550976074625a56 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Wed, 8 Jun 2022 20:56:08 -0700 Subject: [PATCH] Return correct number of shares when joining stableswap pool The `joinPoolSharesInternal` method was not taking into account the newShares from single-sided LP joins. --- x/gamm/pool-models/stableswap/amm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/gamm/pool-models/stableswap/amm.go b/x/gamm/pool-models/stableswap/amm.go index 7d3fc477c7e..6193444faa6 100644 --- a/x/gamm/pool-models/stableswap/amm.go +++ b/x/gamm/pool-models/stableswap/amm.go @@ -399,6 +399,7 @@ func (pa *Pool) joinPoolSharesInternal(ctx sdk.Context, tokensIn sdk.Coins, swap return sdk.ZeroInt(), sdk.NewCoins(), err } pa.updatePoolForJoin(sdk.NewCoins(coin), newShare) + numShares = numShares.Add(newShare) } return numShares, tokensIn, nil