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

Disable create pool with non exit fee #4767

Merged
merged 8 commits into from
Mar 31, 2023
Merged

Disable create pool with non exit fee #4767

merged 8 commits into from
Mar 31, 2023

Conversation

hieuvubk
Copy link
Contributor

@hieuvubk hieuvubk commented Mar 28, 2023

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

  • add conditions when creating pool
  • updated tests

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:)

  • Added unit test that validates ...
  • Added integration tests for end-to-end deployment with ...
  • Extended integration test for ...
  • Manually verified the change by ...

Documentation and Release Note

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

@github-actions github-actions bot added C:app-wiring Changes to the app folder C:x/gamm Changes, features and bugs related to the gamm module. C:x/poolmanager C:x/superfluid labels Mar 28, 2023
@hieuvubk hieuvubk added the V:state/compatible/backport State machine compatible PR, should be backported label Mar 28, 2023
Copy link
Member

@p0mvn p0mvn left a 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:

  1. Changelog entry
  2. Comment in the proto file for Pools ExitFee` saying:
// 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

@@ -155,6 +166,13 @@ func (suite *KeeperTestSuite) TestCreatePool() {
msg: validConcentratedPoolMsg,
expectedModuleType: concentratedKeeperType,
},
{
name: "pool with non zero exit fee - success",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: "pool with non zero exit fee - success",
name: "pool with non zero exit fee - error",

@@ -19,7 +19,7 @@ import (

var (
defaultSwapFee = sdk.MustNewDecFromStr("0.025")
defaultExitFee = sdk.MustNewDecFromStr("0.025")
defaultExitFee = sdk.ZeroDec()
Copy link
Member

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?

Comment on lines 96 to 103
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,
}, {
Copy link
Member

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

@hieuvubk
Copy link
Contributor Author

All cmts were addressed, thank u so much

@p0mvn p0mvn merged commit 1b71ef6 into main Mar 31, 2023
@p0mvn p0mvn deleted the disable-non-exitfee-pool branch March 31, 2023 03:11
@github-actions github-actions bot mentioned this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:app-wiring Changes to the app folder C:x/gamm Changes, features and bugs related to the gamm module. C:x/poolmanager C:x/superfluid V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Exit Fee parameter from pools
3 participants