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(spike): taker fee (backport #6034) #6212

Merged
merged 8 commits into from
Aug 29, 2023
Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 28, 2023

This is an automatic backport of pull request #6034 done by Mergify.
Cherry-pick of 5c8fd80 has failed:

On branch mergify/bp/v19.x/pr-6034
Your branch is up to date with 'origin/v19.x'.

You are currently cherry-picking commit 5c8fd80f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .github/workflows/test.yml
	modified:   app/apptesting/concentrated_liquidity.go
	modified:   app/modules.go
	modified:   app/upgrades/v15/upgrades.go
	modified:   app/upgrades/v19/upgrades.go
	modified:   proto/osmosis/poolmanager/v1beta1/genesis.proto
	modified:   proto/osmosis/poolmanager/v1beta1/tx.proto
	modified:   tests/cl-genesis-positions/go.mod
	modified:   tests/cl-genesis-positions/go.sum
	modified:   tests/e2e/helpers_e2e_test.go
	modified:   x/concentrated-liquidity/keeper.go
	modified:   x/concentrated-liquidity/pool.go
	modified:   x/concentrated-liquidity/pool_test.go
	modified:   x/concentrated-liquidity/simulation/sim_msgs.go
	modified:   x/concentrated-liquidity/types/expected_keepers.go
	modified:   x/gamm/keeper/msg_server_test.go
	modified:   x/gamm/keeper/pool.go
	modified:   x/gamm/simulation/sim_msgs.go
	modified:   x/gamm/types/expected_keepers.go
	modified:   x/poolmanager/README.md
	modified:   x/poolmanager/client/cli/tx.go
	modified:   x/poolmanager/client/cli/tx_test.go
	modified:   x/poolmanager/create_pool.go
	modified:   x/poolmanager/create_pool_test.go
	modified:   x/poolmanager/gov.go
	modified:   x/poolmanager/keeper_test.go
	modified:   x/poolmanager/msg_server.go
	modified:   x/poolmanager/msg_server_test.go
	modified:   x/poolmanager/router_test.go
	new file:   x/poolmanager/taker_fee.go
	modified:   x/poolmanager/types/events.go
	modified:   x/poolmanager/types/genesis.pb.go
	modified:   x/poolmanager/types/gov.go
	new file:   x/poolmanager/types/gov_test.go
	new file:   x/poolmanager/types/keys_test.go
	modified:   x/poolmanager/types/msgs.go
	modified:   x/poolmanager/types/msgs_test.go
	modified:   x/poolmanager/types/params.go
	modified:   x/poolmanager/types/tx.pb.go
	modified:   x/protorev/keeper/keeper_test.go
	modified:   x/protorev/keeper/rebalance_test.go
	modified:   x/superfluid/keeper/stake_test.go
	modified:   x/twap/keeper_test.go
	modified:   x/twap/store.go
	modified:   x/txfees/README.md
	new file:   x/txfees/keeper/export_test.go
	modified:   x/txfees/keeper/feedecorator.go
	modified:   x/txfees/keeper/feedecorator_test.go
	modified:   x/txfees/keeper/hooks.go
	modified:   x/txfees/keeper/hooks_test.go
	modified:   x/txfees/keeper/keeper_test.go
	modified:   x/txfees/types/expected_keepers.go
	modified:   x/txfees/types/keys.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   tests/e2e/e2e_test.go
	both modified:   x/poolmanager/export_test.go
	both modified:   x/poolmanager/router.go
	both modified:   x/poolmanager/types/keys.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* add taker fee determination and extraction

* remove osmo multi hop logic

* route to both community pool and staking rewards

* fix a handfull of tests

* assign taker fee to pool at time of creation

* pull taker fee direct from pool struct

* fix more tests

* fix tests, set back up osmo multi hop discount

* correct taker fee extraction

* regen mocks

* abstract taker fee to pool manager (highest lvl)

* fix extract cmd

* update changelog

* tidy

* remove param that no longer exists

* add extra params to genesis logic

* add back osmo multihop tests

* add comment

* fix e2e keeping prints

* fixes

* more test fixes

* remove prints

* more naive approach to determining taker fee

* fix e2e

* re-enable disabled test

* minor cleaning

* simplify params

* not nullable

* clean up

* add whitelist set message denom pair taker fees

* use real addresses

* add gov prop for denom pair taker fee update

* clean

* move logic to its own taker_fee.go file

* add CLI for gov prop for denomPairTakerFee

* add admin address denomPairTakerFee cli msg

* clean and simplifications

* use authorized quote denoms from poolmanger

* remove stableswap taker fee

* sim msg change

* add test for CLI

* msg server tests

* add route_test test

* add gov_test.go

* add msgs_test.go

* remove print line

* change from v18 to v19

* Update upgrades.go

* set default taker fee to zero in upgrade handler

* conflicts

* Update proto/osmosis/poolmanager/v1beta1/genesis.proto

* Update proto/osmosis/poolmanager/v1beta1/genesis.proto

* Update x/poolmanager/taker_fee.go

* Generated protofile changes

* rename extractTakerFeeAndDistribute to chargeTakerFee

* clean up

* comment

* rename

* godoc for NonNativeFeeCollectorForCommunityPoolName

* baseDenom to defaultFeesDenom name change

* fix upgrade handler

* fix AfterEpochEnd order of denoms when getting pools; reduce code dupl; tests

* fix track volume

* add key separator for pool manager

* add comment to denom pair route

* add basic lexicographical key test

* update chargeTakerFee godoc

* set the default taker fee back to non zero for e2e

* change PoolMangerGetParams API to  GetAuthorizedQuoteDenoms (same for setters)

* update txfees & poolmanager READMEs with takerFee

* fix merge main

* add comment to denom pair taker fee

* de-dup taker fee param validation

* Update x/poolmanager/types/msgs.go

* Apply suggestions from code review

* Update x/poolmanager/taker_fee.go

* remove unneeded setup test

* get pool creation free from previous

* take non native out of name

* undo param pull instead of default

* use current pool creation fee

* use default

* e2e

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Roman <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: alpo <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
(cherry picked from commit 5c8fd80)

# Conflicts:
#	CHANGELOG.md
#	tests/e2e/e2e_test.go
#	x/poolmanager/export_test.go
#	x/poolmanager/router.go
#	x/poolmanager/types/keys.go
@mergify mergify bot added the conflicts label Aug 28, 2023
@github-actions github-actions bot added C:docs Improvements or additions to documentation C:CLI C:x/gamm Changes, features and bugs related to the gamm module. T:CI C:x/superfluid C:x/txfees C:app-wiring Changes to the app folder C:simulator Edits simulator or simulations C:x/twap Changes to the twap module C:x/concentrated-liquidity C:x/poolmanager labels Aug 28, 2023
@czarcas7ic czarcas7ic merged commit 908b279 into v19.x Aug 29, 2023
@czarcas7ic czarcas7ic deleted the mergify/bp/v19.x/pr-6034 branch August 29, 2023 04:03
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:CLI C:docs Improvements or additions to documentation C:simulator Edits simulator or simulations C:x/concentrated-liquidity C:x/gamm Changes, features and bugs related to the gamm module. C:x/poolmanager C:x/superfluid C:x/twap Changes to the twap module C:x/txfees conflicts T:CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants