Skip to content

Commit

Permalink
fix(stableswap): Return correct number of shares when joining stables…
Browse files Browse the repository at this point in the history
…wap pool (#1723)

* Return correct number of shares when joining stableswap pool

The `joinPoolSharesInternal` method was not taking into account the newShares from single-sided LP joins.

* Update changelog

Co-authored-by: Roman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 2d1804b)
  • Loading branch information
k-yang authored and mergify[bot] committed Jun 9, 2022
1 parent 64583ab commit e64ef95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Cosmwasm bindings have been added, to make swapping and creating these new token
* [#1435](https://github.com/osmosis-labs/osmosis/pull/1435) `x/tokenfactory` create denom fee for spam resistance
* [#1253](https://github.com/osmosis-labs/osmosis/pull/1253) Add a message to increase the duration of a bonded lock.
* [#1632](https://github.com/osmosis-labs/osmosis/pull/1632) augment SuperfluidDelegationsByDelegator query, return osmo equivilent is staked via superfluid
* [#1723](https://github.com/osmosis-labs/osmosis/pull/1723) fix number of LP shares returned from stableswap pool

## [v8.0.0 - Emergency proposals upgrade](https://github.com/osmosis-labs/osmosis/releases/tag/v8.0.0)

Expand Down
1 change: 1 addition & 0 deletions x/gamm/pool-models/stableswap/amm.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,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
Expand Down

0 comments on commit e64ef95

Please sign in to comment.