-
Notifications
You must be signed in to change notification settings - Fork 607
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
Disable create pool with non exit fee #4767
Conversation
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.
LGTM. Thanks.
Would like to request 2 items prior to merge:
- Changelog entry
- Comment in the proto file for
Pool
s
// N.B.: exit fee is disabled during pool creation in x/poolmanager. While old pools
// can maintain a non-zero fee. No new pool can be created with non-zero fee anymore
x/poolmanager/create_pool_test.go
Outdated
@@ -155,6 +166,13 @@ func (suite *KeeperTestSuite) TestCreatePool() { | |||
msg: validConcentratedPoolMsg, | |||
expectedModuleType: concentratedKeeperType, | |||
}, | |||
{ | |||
name: "pool with non zero exit fee - success", |
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.
name: "pool with non zero exit fee - success", | |
name: "pool with non zero exit fee - error", |
x/gamm/keeper/pool_service_test.go
Outdated
@@ -19,7 +19,7 @@ import ( | |||
|
|||
var ( | |||
defaultSwapFee = sdk.MustNewDecFromStr("0.025") | |||
defaultExitFee = sdk.MustNewDecFromStr("0.025") | |||
defaultExitFee = sdk.ZeroDec() |
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.
nit: can we just define a defaultZeroExitFee
in the keeper_test file as a global var and use it everywhere?
x/gamm/keeper/pool_service_test.go
Outdated
name: "create a pool with non zero exit fee", | ||
msg: balancer.NewMsgCreateBalancerPool(testAccount, balancer.PoolParams{ | ||
SwapFee: sdk.NewDecWithPrec(1, 2), | ||
ExitFee: sdk.NewDecWithPrec(-1, 2), | ||
ExitFee: sdk.NewDecWithPrec(1, 2), | ||
}, defaultPoolAssets, defaultFutureGovernor), | ||
emptySender: false, | ||
expectPass: false, | ||
}, { |
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.
imo we should test both a negative and a non zero exit fee
All cmts were addressed, thank u so much |
Closes: #4371
What is the purpose of the change
After discussing with @p0mvn, we decided to keep the current proto struct, and just not allow the creation of pools with non zero exit fees in the future.
Brief Changelog
Testing and Verifying
(Please pick one of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)