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

feat(poolmanager): taker fee reduction whitelist #6632

Merged
merged 10 commits into from
Oct 7, 2023

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Oct 4, 2023

Closes: #XXX

What is the purpose of the change

Implements functionality for bypassing taker fee via whitelist.

The whitelist is to be controlled by governance. It is expected that stakeholders that meet certain governance-defined qualifications, may bypass the taker fee.

This is useful for client protocols that rely on frequent rebalancing via swaps.

Testing and Verifying

  • Added unit test for chargeTakerFee method that returns the tokenIn without taker fee charged if the sender is in the whitelist

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

Important Notice

This PR modifies an in-repo Go module. It is one of:

  • osmomath
  • osmoutils
  • x/ibc-hooks
  • x/epochs

The dependent Go modules, especially the root one, will have to be
updated to reflect the changes. Failing to do so might cause e2e to fail.

Please follow the instructions below:

  1. Open https://github.com/osmosis-labs/osmosis/actions/workflows/go-mod-auto-bump.yml
  2. Provide the current branch name
  3. On success, confirm if an automated commit corretly updated the go.mod and go.sum files

Please let us know if you need any help.

@p0mvn p0mvn added A:backport/v16.x backport patches to v16.x branch V:state/breaking State machine breaking PR and removed A:backport/v16.x backport patches to v16.x branch labels Oct 4, 2023
//
// Returns:
// - An error if any of the strings are not addresses
func ValidateAddressList(i interface{}) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: copied from the x/concentrated-liquidity to reduce code duplication

@p0mvn p0mvn marked this pull request as ready for review October 4, 2023 19:27
Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

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

Looks good, would like the name change in order to make the next step of adding a percent reduction more seamless (and just thinking of the current implementation as a 100 percent reduction)

app/upgrades/v20/upgrades.go Outdated Show resolved Hide resolved
proto/osmosis/poolmanager/v1beta1/genesis.proto Outdated Show resolved Hide resolved
x/poolmanager/taker_fee_test.go Show resolved Hide resolved
@p0mvn p0mvn changed the title feat(poolmanager): taker fee bypass whitelist feat(poolmanager): taker fee reduction whitelist Oct 7, 2023
@p0mvn p0mvn merged commit 4663c7a into main Oct 7, 2023
1 check passed
@p0mvn p0mvn deleted the roman/taker-fee-bypass-whitelist branch October 7, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants