osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

[x/gamm][stableswap]: Add tests for single-asset joins (`calcSingleAssetJoinShares`)

Open AlpinYukseloglu opened this issue 2 years ago • 3 comments

Background

Our current implementation of calcSingleAssetJoinShares is untested. We should make tests that cover similar cases to what we have in balancer.

Suggested Design

  • Create single-asset pool join tests that mirror what we have in balancer but with our stableswap CFMM

Acceptance Criteria

  • All tests pass and removing updatePoolForJoin through mutation testing doesn't break calcSingleAssetJoinShares

AlpinYukseloglu avatar Aug 10 '22 08:08 AlpinYukseloglu

Is this issue available to work on?

pysel avatar Sep 30 '22 08:09 pysel

@RusAkh Yes, please

You can get inspiration from the existing test cases in balancer. However, they might not be exhaustive so if you think of any extra, please add them

p0mvn avatar Sep 30 '22 19:09 p0mvn

I actually covered a significant portion of this issue in #2905, so it might not be a great one to pick up if you don't have context (properly testing this functionality is actually a relatively complicated process)

AlpinYukseloglu avatar Oct 01 '22 07:10 AlpinYukseloglu

Update: single-asset joins are now tested (#2905) and can be further tested as part of #2900 and #2346

AlpinYukseloglu avatar Oct 16 '22 03:10 AlpinYukseloglu