Skip to content

Commit

Permalink
feat: protorev no taker fee (#6861)
Browse files Browse the repository at this point in the history
* add protorev to whitelist

* changelog
  • Loading branch information
czarcas7ic authored Nov 13, 2023
1 parent d72968c commit 3e8f73a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* [#6788](https://github.com/osmosis-labs/osmosis/pull/6788) Improve error message when CL LP fails due to slippage bound hit.
* [#6858](https://github.com/osmosis-labs/osmosis/pull/6858) Merge mempool improvements from v20
* [#6861](https://github.com/osmosis-labs/osmosis/pull/6861) Protorev address added to reduced taker fee whitelist

### API Breaks

Expand Down
6 changes: 6 additions & 0 deletions app/upgrades/v21/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ func CreateUpgradeHandler(
// Set CL param:
keepers.ConcentratedLiquidityKeeper.SetParam(ctx, concentratedliquiditytypes.KeyHookGasLimit, concentratedliquiditytypes.DefaultContractHookGasLimit)

// Add protorev to the taker fee exclusion list:
protorevModuleAccount := keepers.AccountKeeper.GetModuleAccount(ctx, protorevtypes.ModuleName)
poolManagerParams := keepers.PoolManagerKeeper.GetParams(ctx)
poolManagerParams.TakerFeeParams.ReducedFeeWhitelist = append(poolManagerParams.TakerFeeParams.ReducedFeeWhitelist, protorevModuleAccount.GetAddress().String())
keepers.PoolManagerKeeper.SetParams(ctx, poolManagerParams)

// Since we are now tracking all protocol rev, we set the accounting height to the current block height for each module
// that generates protocol rev.
keepers.PoolManagerKeeper.SetTakerFeeTrackerStartHeight(ctx, ctx.BlockHeight())
Expand Down

0 comments on commit 3e8f73a

Please sign in to comment.