Skip to content
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

fix(stableswap): Return correct number of shares when joining stableswap pool #1723

Merged
merged 4 commits into from
Jun 9, 2022

Conversation

k-yang
Copy link
Contributor

@k-yang k-yang commented Jun 9, 2022

Closes: #XXX

What is the purpose of the change

The joinPoolSharesInternal method was not taking into account the newShares from single-sided LP joins. I wanted to make sure another Osmosis bug didn't happen related to LP share calculation.

Brief Changelog

  • Fix LP share calculation for stableswap pools.

Testing and Verifying

(Please pick one of the following options)

This change fixes code that doesn't have test coverage yet.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? (yes)
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? (yes / no)
  • How is the feature or change documented? (not applicable / not documented)

The `joinPoolSharesInternal` method was not taking into account the newShares from single-sided LP joins.
@k-yang k-yang requested a review from a team June 9, 2022 03:59
@github-actions github-actions bot added the C:x/gamm Changes, features and bugs related to the gamm module. label Jun 9, 2022
@p0mvn
Copy link
Member

p0mvn commented Jun 9, 2022

We should unit test joinPoolSharesInternal separately

@p0mvn p0mvn removed the A:automerge label Jun 9, 2022
@p0mvn p0mvn merged commit 2d1804b into osmosis-labs:main Jun 9, 2022
@alexanderbez alexanderbez added the A:backport/v10.x backport patches to v10.x branch label Jun 9, 2022
mergify bot pushed a commit that referenced this pull request Jun 9, 2022
…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 <roman@osmosis.team>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 2d1804b)
mattverse pushed a commit that referenced this pull request Jun 9, 2022
…wap pool (#1723) (#1728)

* 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 <roman@osmosis.team>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 2d1804b)

Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com>
@k-yang k-yang deleted the patch-1 branch October 4, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v10.x backport patches to v10.x branch C:x/gamm Changes, features and bugs related to the gamm module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants