-
Notifications
You must be signed in to change notification settings - Fork 608
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
Generalize gamm Inverse relationship test , add Inverse relationship test for stableswap #1456
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1456 +/- ##
==========================================
- Coverage 19.82% 19.31% -0.52%
==========================================
Files 202 229 +27
Lines 27685 31452 +3767
==========================================
+ Hits 5489 6075 +586
- Misses 21175 24269 +3094
- Partials 1021 1108 +87
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @xBalbinus @mattverse ! Left some comments, please take a look
Co-authored-by: Roman <[email protected]>
Closes #1349? |
I didn't notice this PR was open for so long, just made the changes you've requested per last review can you review the updates? tysm! |
"github.com/osmosis-labs/osmosis/v7/x/gamm/types" | ||
) | ||
|
||
type CfmmCommonTestSuite struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a small godoc to what CFMM abbreviation is?
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
// CfmmCommonTestSuite is the common test suite struct of Constant Function Market Maker, | ||
// that pool-models can inherit from. | ||
type CfmmCommonTestSuite struct { | ||
suite.Suite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't we just using apptesting here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also delete the CreateTestContext if we used apptesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because we have import cycle problems when we do that since the apptesting package imports gamm module and the balancer module
uhh, could you take a stab at solving the merge conflict here @mattverse , then we can get it merged in? |
np! Thanks for getting this reviewed! Merging once final CI checks have passed upon approval |
Closes: #1371
What is the purpose of the change
Upon adding invariant test for inverse relationship on
CalculateAmountOutAndIn
(https://github.com/osmosis-labs/osmosis/blob/main/x/gamm/pool-models/balancer/amm_test.go#L89-L216) the goal of this PR is to generalize the test case, and also add the same test for stableswap using the generalized test case.*Add a description of the overall background and high level changes that this PR introduces *
(E.g.: This pull request improves documation of area A by adding ....
Testing and Verifying
No testings changed in
balancer
package, inverse relationship test added forstableswap
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no