From 5d034e97e5474d02865efba6fa85b5ed98cc952e Mon Sep 17 00:00:00 2001 From: davidterpay Date: Mon, 9 Jan 2023 14:32:38 -0600 Subject: [PATCH] rebase --- x/protorev/keeper/epoch_hook.go | 4 +- x/protorev/keeper/posthandler.go | 6 +-- x/protorev/keeper/posthandler_test.go | 30 +++++++-------- x/protorev/keeper/rebalance.go | 2 +- x/protorev/keeper/routes.go | 54 +++++++++++++-------------- x/protorev/keeper/statistics.go | 2 +- x/protorev/keeper/statistics_test.go | 6 +-- x/protorev/types/expected_keepers.go | 4 +- 8 files changed, 54 insertions(+), 54 deletions(-) diff --git a/x/protorev/keeper/epoch_hook.go b/x/protorev/keeper/epoch_hook.go index bd9a91315af..02aad88bd3b 100644 --- a/x/protorev/keeper/epoch_hook.go +++ b/x/protorev/keeper/epoch_hook.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" epochstypes "github.com/osmosis-labs/osmosis/v13/x/epochs/types" + poolmanagertypes "github.com/osmosis-labs/osmosis/v13/x/poolmanager/types" "github.com/osmosis-labs/osmosis/v13/x/protorev/types" - swaproutertypes "github.com/osmosis-labs/osmosis/v13/x/swaprouter/types" ) type EpochHooks struct { @@ -95,7 +95,7 @@ func (k Keeper) GetHighestLiquidityPools(ctx sdk.Context) (map[string]LiquidityP // Pool must be a non-stableswap pool pooltype, err := k.gammKeeper.GetPoolType(ctx, pool.GetId()) - if err != nil || pooltype == swaproutertypes.Stableswap { + if err != nil || pooltype == poolmanagertypes.Stableswap { continue } diff --git a/x/protorev/keeper/posthandler.go b/x/protorev/keeper/posthandler.go index 4a4f8e32556..c6cecd0599b 100644 --- a/x/protorev/keeper/posthandler.go +++ b/x/protorev/keeper/posthandler.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - gammtypes "github.com/osmosis-labs/osmosis/v13/x/gamm/types" + poolmanagertypes "github.com/osmosis-labs/osmosis/v13/x/poolmanager/types" ) type SwapToBackrun struct { @@ -131,14 +131,14 @@ func ExtractSwappedPools(tx sdk.Tx) []SwapToBackrun { // Extract only swaps types and the swapped pools from the tx for _, msg := range tx.GetMsgs() { - if swap, ok := msg.(*gammtypes.MsgSwapExactAmountIn); ok { + if swap, ok := msg.(*poolmanagertypes.MsgSwapExactAmountIn); ok { for _, route := range swap.Routes { swappedPools = append(swappedPools, SwapToBackrun{ PoolId: route.PoolId, TokenOutDenom: route.TokenOutDenom, TokenInDenom: swap.TokenIn.Denom}) } - } else if swap, ok := msg.(*gammtypes.MsgSwapExactAmountOut); ok { + } else if swap, ok := msg.(*poolmanagertypes.MsgSwapExactAmountOut); ok { for _, route := range swap.Routes { swappedPools = append(swappedPools, SwapToBackrun{ PoolId: route.PoolId, diff --git a/x/protorev/keeper/posthandler_test.go b/x/protorev/keeper/posthandler_test.go index b60f123182a..a7fa5543c8c 100644 --- a/x/protorev/keeper/posthandler_test.go +++ b/x/protorev/keeper/posthandler_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - gammtypes "github.com/osmosis-labs/osmosis/v13/x/gamm/types" + poolmanagertypes "github.com/osmosis-labs/osmosis/v13/x/poolmanager/types" "github.com/osmosis-labs/osmosis/v13/x/protorev/keeper" "github.com/osmosis-labs/osmosis/v13/x/protorev/types" ) @@ -59,9 +59,9 @@ func (suite *KeeperTestSuite) TestAnteHandle() { name: "No Arb", params: param{ msgs: []sdk.Msg{ - &gammtypes.MsgSwapExactAmountIn{ + &poolmanagertypes.MsgSwapExactAmountIn{ Sender: addr0.String(), - Routes: []gammtypes.SwapAmountInRoute{ + Routes: []poolmanagertypes.SwapAmountInRoute{ { PoolId: 12, TokenOutDenom: "akash", @@ -86,9 +86,9 @@ func (suite *KeeperTestSuite) TestAnteHandle() { name: "Mainnet Arb (Block: 5905150) - Highest Liquidity Pool Build", params: param{ msgs: []sdk.Msg{ - &gammtypes.MsgSwapExactAmountIn{ + &poolmanagertypes.MsgSwapExactAmountIn{ Sender: addr0.String(), - Routes: []gammtypes.SwapAmountInRoute{ + Routes: []poolmanagertypes.SwapAmountInRoute{ { PoolId: 23, TokenOutDenom: "ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC", @@ -118,9 +118,9 @@ func (suite *KeeperTestSuite) TestAnteHandle() { name: "Mainnet Arb Route - Multi Asset, Same Weights (Block: 6906570) - Hot Route Build - Atom Arb", params: param{ msgs: []sdk.Msg{ - &gammtypes.MsgSwapExactAmountIn{ + &poolmanagertypes.MsgSwapExactAmountIn{ Sender: addr0.String(), - Routes: []gammtypes.SwapAmountInRoute{ + Routes: []poolmanagertypes.SwapAmountInRoute{ { PoolId: 33, TokenOutDenom: "ibc/A0CC0CF735BFB30E730C70019D4218A1244FF383503FF7579C9201AB93CA9293", @@ -154,9 +154,9 @@ func (suite *KeeperTestSuite) TestAnteHandle() { name: "Stableswap Test Arb Route - Hot Route Build", params: param{ msgs: []sdk.Msg{ - &gammtypes.MsgSwapExactAmountIn{ + &poolmanagertypes.MsgSwapExactAmountIn{ Sender: addr0.String(), - Routes: []gammtypes.SwapAmountInRoute{ + Routes: []poolmanagertypes.SwapAmountInRoute{ { PoolId: 29, TokenOutDenom: types.OsmosisDenomination, @@ -282,9 +282,9 @@ func (suite *KeeperTestSuite) TestExtractSwappedPools() { name: "Single Swap", params: param{ msgs: []sdk.Msg{ - &gammtypes.MsgSwapExactAmountIn{ + &poolmanagertypes.MsgSwapExactAmountIn{ Sender: addr0.String(), - Routes: []gammtypes.SwapAmountInRoute{ + Routes: []poolmanagertypes.SwapAmountInRoute{ { PoolId: 28, TokenOutDenom: "ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC", @@ -314,9 +314,9 @@ func (suite *KeeperTestSuite) TestExtractSwappedPools() { name: "Two Swaps", params: param{ msgs: []sdk.Msg{ - &gammtypes.MsgSwapExactAmountIn{ + &poolmanagertypes.MsgSwapExactAmountIn{ Sender: addr0.String(), - Routes: []gammtypes.SwapAmountInRoute{ + Routes: []poolmanagertypes.SwapAmountInRoute{ { PoolId: 28, TokenOutDenom: "ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC", @@ -325,9 +325,9 @@ func (suite *KeeperTestSuite) TestExtractSwappedPools() { TokenIn: sdk.NewCoin("ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858", sdk.NewInt(10000)), TokenOutMinAmount: sdk.NewInt(10000), }, - &gammtypes.MsgSwapExactAmountIn{ + &poolmanagertypes.MsgSwapExactAmountIn{ Sender: addr0.String(), - Routes: []gammtypes.SwapAmountInRoute{ + Routes: []poolmanagertypes.SwapAmountInRoute{ { PoolId: 22, TokenOutDenom: "ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC", diff --git a/x/protorev/keeper/rebalance.go b/x/protorev/keeper/rebalance.go index 66c33247154..a29adc84341 100644 --- a/x/protorev/keeper/rebalance.go +++ b/x/protorev/keeper/rebalance.go @@ -128,7 +128,7 @@ func (k Keeper) FindMaxProfitForRoute(ctx sdk.Context, route poolmanagertypes.Sw } // ExecuteTrade inputs a route, amount in, and rebalances the pool -func (k Keeper) ExecuteTrade(ctx sdk.Context, route poolmanagertypes.SwapAmountInRoutes, inputCoin sdk.Coin, poolId uint64) error { +func (k Keeper) ExecuteTrade(ctx sdk.Context, route poolmanagertypes.SwapAmountInRoutes, inputCoin sdk.Coin) error { // Get the module address which will execute the trade protorevModuleAddress := k.accountKeeper.GetModuleAddress(types.ModuleName) diff --git a/x/protorev/keeper/routes.go b/x/protorev/keeper/routes.go index 9f8f4c85b00..7fc59a1c79a 100644 --- a/x/protorev/keeper/routes.go +++ b/x/protorev/keeper/routes.go @@ -11,8 +11,8 @@ import ( ) // BuildRoutes builds all of the possible arbitrage routes given the tokenIn, tokenOut and poolId that were used in the swap -func (k Keeper) BuildRoutes(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) []swaproutertypes.SwapAmountInRoutes { - routes := make([]swaproutertypes.SwapAmountInRoutes, 0) +func (k Keeper) BuildRoutes(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) []poolmanagertypes.SwapAmountInRoutes { + routes := make([]poolmanagertypes.SwapAmountInRoutes, 0) // Append hot routes if they exist if tokenPairRoutes, err := k.BuildTokenPairRoutes(ctx, tokenIn, tokenOut, poolId, maxIterableRoutes); err == nil { @@ -33,19 +33,19 @@ func (k Keeper) BuildRoutes(ctx sdk.Context, tokenIn, tokenOut string, poolId ui } // BuildTokenPairRoutes builds all of the possible arbitrage routes from the hot routes given the tokenIn, tokenOut and poolId that were used in the swap -func (k Keeper) BuildTokenPairRoutes(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) ([]swaproutertypes.SwapAmountInRoutes, error) { +func (k Keeper) BuildTokenPairRoutes(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) ([]poolmanagertypes.SwapAmountInRoutes, error) { if *maxIterableRoutes <= 0 { - return []swaproutertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") + return []poolmanagertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") } // Get all of the routes from the store that match the given tokenIn and tokenOut tokenPairArbRoutes, err := k.GetTokenPairArbRoutes(ctx, tokenIn, tokenOut) if err != nil { - return []swaproutertypes.SwapAmountInRoutes{}, err + return []poolmanagertypes.SwapAmountInRoutes{}, err } // Iterate through all of the routes and build hot routes - routes := make([]swaproutertypes.SwapAmountInRoutes, 0) + routes := make([]poolmanagertypes.SwapAmountInRoutes, 0) for index := 0; index < len(tokenPairArbRoutes.ArbRoutes) && *maxIterableRoutes > 0; index++ { if newRoute, err := k.BuildHotRoute(ctx, tokenPairArbRoutes.ArbRoutes[index], tokenIn, tokenOut, poolId, maxIterableRoutes); err == nil { routes = append(routes, newRoute) @@ -57,8 +57,8 @@ func (k Keeper) BuildTokenPairRoutes(ctx sdk.Context, tokenIn, tokenOut string, // BuildHotRoute constructs a cyclic arbitrage route given a hot route from the store and information about the swap that should be placed // in the hot route. -func (k Keeper) BuildHotRoute(ctx sdk.Context, route *types.Route, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) (swaproutertypes.SwapAmountInRoutes, error) { - newRoute := make(swaproutertypes.SwapAmountInRoutes, 0) +func (k Keeper) BuildHotRoute(ctx sdk.Context, route *types.Route, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) (poolmanagertypes.SwapAmountInRoutes, error) { + newRoute := make(poolmanagertypes.SwapAmountInRoutes, 0) for _, trade := range route.Trades { // 0 is a placeholder for pools swapped on that should be entered into the hot route @@ -77,27 +77,27 @@ func (k Keeper) BuildHotRoute(ctx sdk.Context, route *types.Route, tokenIn, toke // Check that the hot route is valid if err := k.CheckValidHotRoute(ctx, newRoute); err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } // Check that the route can be iterated if weight, err := k.GetRouteWeight(ctx, newRoute); err == nil && *maxIterableRoutes >= weight { err := k.IncrementRouteCountForBlock(ctx, weight) if err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } *maxIterableRoutes -= weight return newRoute, nil } - return swaproutertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") + return poolmanagertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") } // CheckValidHotRoute checks if the cyclic arbitrage route that was built using the hot routes method is correct. Much of the stateless // validation achieves the desired checks, however, we also check that the route is traversing pools that // are active. -func (k Keeper) CheckValidHotRoute(ctx sdk.Context, route swaproutertypes.SwapAmountInRoutes) error { +func (k Keeper) CheckValidHotRoute(ctx sdk.Context, route poolmanagertypes.SwapAmountInRoutes) error { if route.Length() != 3 { return fmt.Errorf("invalid hot route length") } @@ -114,32 +114,32 @@ func (k Keeper) CheckValidHotRoute(ctx sdk.Context, route swaproutertypes.SwapAm } // BuildOsmoRoute builds a cyclic arbitrage route that starts and ends with osmo given the tokenIn, tokenOut and poolId that were used in the swap -func (k Keeper) BuildOsmoRoute(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) (swaproutertypes.SwapAmountInRoutes, error) { +func (k Keeper) BuildOsmoRoute(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) (poolmanagertypes.SwapAmountInRoutes, error) { return k.BuildRoute(ctx, types.OsmosisDenomination, tokenIn, tokenOut, poolId, maxIterableRoutes, k.GetOsmoPool) } // BuildAtomRoute builds a cyclic arbitrage route that starts and ends with atom given the tokenIn, tokenOut and poolId that were used in the swap -func (k Keeper) BuildAtomRoute(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) (swaproutertypes.SwapAmountInRoutes, error) { +func (k Keeper) BuildAtomRoute(ctx sdk.Context, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64) (poolmanagertypes.SwapAmountInRoutes, error) { return k.BuildRoute(ctx, types.AtomDenomination, tokenIn, tokenOut, poolId, maxIterableRoutes, k.GetAtomPool) } // BuildRoute constructs a cyclic arbitrage route that is starts/ends with swapDenom (atom or osmo) given the swap (tokenIn, tokenOut, poolId), and // a function that can get the poolId from the store given a (token, swapDenom) pair. -func (k Keeper) BuildRoute(ctx sdk.Context, swapDenom, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64, getPoolIDFromStore func(sdk.Context, string) (uint64, error)) (swaproutertypes.SwapAmountInRoutes, error) { +func (k Keeper) BuildRoute(ctx sdk.Context, swapDenom, tokenIn, tokenOut string, poolId uint64, maxIterableRoutes *uint64, getPoolIDFromStore func(sdk.Context, string) (uint64, error)) (poolmanagertypes.SwapAmountInRoutes, error) { if *maxIterableRoutes <= 0 { - return swaproutertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") + return poolmanagertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") } // Creating the first trade in the arb entryPoolId, err := getPoolIDFromStore(ctx, tokenOut) if err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } // Check that the pool exists and is active _, err = k.GetAndCheckPool(ctx, entryPoolId) if err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } // Create the first swap for the MultiHopSwap Route entryRoute := poolmanagertypes.SwapAmountInRoute{ @@ -150,7 +150,7 @@ func (k Keeper) BuildRoute(ctx sdk.Context, swapDenom, tokenIn, tokenOut string, // Creating the second trade in the arb _, err = k.GetAndCheckPool(ctx, poolId) if err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } middleRoute := poolmanagertypes.SwapAmountInRoute{ PoolId: poolId, @@ -160,31 +160,31 @@ func (k Keeper) BuildRoute(ctx sdk.Context, swapDenom, tokenIn, tokenOut string, // Creating the third trade in the arb exitPoolId, err := getPoolIDFromStore(ctx, tokenIn) if err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } _, err = k.GetAndCheckPool(ctx, exitPoolId) if err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } exitRoute := poolmanagertypes.SwapAmountInRoute{ PoolId: exitPoolId, TokenOutDenom: swapDenom, } - newRoute := swaproutertypes.SwapAmountInRoutes{entryRoute, middleRoute, exitRoute} + newRoute := poolmanagertypes.SwapAmountInRoutes{entryRoute, middleRoute, exitRoute} // Check that the route can be iterated if weight, err := k.GetRouteWeight(ctx, newRoute); err == nil && *maxIterableRoutes >= weight { err := k.IncrementRouteCountForBlock(ctx, weight) if err != nil { - return swaproutertypes.SwapAmountInRoutes{}, err + return poolmanagertypes.SwapAmountInRoutes{}, err } *maxIterableRoutes -= weight return newRoute, nil } - return swaproutertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") + return poolmanagertypes.SwapAmountInRoutes{}, fmt.Errorf("the number of routes that can be iterated through has been exceeded") } // GetAndCheckPool retrieves the pool from the x/gamm module given a poolId and ensures that the pool can be traded on @@ -201,7 +201,7 @@ func (k Keeper) GetAndCheckPool(ctx sdk.Context, poolId uint64) (gammtypes.CFMMP // GetRouteWeight retrieves the weight of a route. The weight of a route is determined by the pools that are used in the route. // Different pools will have different execution times hence the need for a weighted point system. -func (k Keeper) GetRouteWeight(ctx sdk.Context, route swaproutertypes.SwapAmountInRoutes) (uint64, error) { +func (k Keeper) GetRouteWeight(ctx sdk.Context, route poolmanagertypes.SwapAmountInRoutes) (uint64, error) { // Routes must always be of length 3 if route.Length() != 3 { return 0, fmt.Errorf("invalid route length") @@ -221,9 +221,9 @@ func (k Keeper) GetRouteWeight(ctx sdk.Context, route swaproutertypes.SwapAmount } switch poolType { - case swaproutertypes.Balancer: + case poolmanagertypes.Balancer: return routeWeights.BalancerWeight, nil - case swaproutertypes.Stableswap: + case poolmanagertypes.Stableswap: return routeWeights.StableWeight, nil default: return 0, fmt.Errorf("invalid pool type") diff --git a/x/protorev/keeper/statistics.go b/x/protorev/keeper/statistics.go index 97dda8dad99..62dcdb0d065 100644 --- a/x/protorev/keeper/statistics.go +++ b/x/protorev/keeper/statistics.go @@ -202,7 +202,7 @@ func (k Keeper) UpdateProfitsByRoute(ctx sdk.Context, route []uint64, denom stri } // UpdateStatistics updates the module statistics after each trade is executed -func (k Keeper) UpdateStatistics(ctx sdk.Context, route poolmanagertypes.SwapAmountInRoutes, inputCoin sdk.Coin, outputAmt sdk.Int) error { +func (k Keeper) UpdateStatistics(ctx sdk.Context, route poolmanagertypes.SwapAmountInRoutes, denom string, profit sdk.Int) error { // Increment the number of trades executed by the ProtoRev module if err := k.IncrementNumberOfTrades(ctx); err != nil { return err diff --git a/x/protorev/keeper/statistics_test.go b/x/protorev/keeper/statistics_test.go index b9523cf46cb..881db9def99 100644 --- a/x/protorev/keeper/statistics_test.go +++ b/x/protorev/keeper/statistics_test.go @@ -137,8 +137,7 @@ func (suite *KeeperTestSuite) TestUpdateStatistics() { // Psuedo execute a trade err := suite.App.AppKeepers.ProtoRevKeeper.UpdateStatistics(suite.Ctx, poolmanagertypes.SwapAmountInRoutes{{TokenOutDenom: "", PoolId: 1}, {TokenOutDenom: "", PoolId: 2}, {TokenOutDenom: "", PoolId: 3}}, - sdk.NewCoin(types.OsmosisDenomination, sdk.NewInt(800)), - sdk.NewInt(1000), + types.OsmosisDenomination, sdk.NewInt(1000), ) suite.Require().NoError(err) @@ -160,8 +159,7 @@ func (suite *KeeperTestSuite) TestUpdateStatistics() { // Psuedo execute a second trade err = suite.App.AppKeepers.ProtoRevKeeper.UpdateStatistics(suite.Ctx, poolmanagertypes.SwapAmountInRoutes{{TokenOutDenom: "", PoolId: 2}, {TokenOutDenom: "", PoolId: 3}, {TokenOutDenom: "", PoolId: 4}}, - sdk.NewCoin(types.OsmosisDenomination, sdk.NewInt(850)), - sdk.NewInt(1100), + types.OsmosisDenomination, sdk.NewInt(1100), ) suite.Require().NoError(err) diff --git a/x/protorev/types/expected_keepers.go b/x/protorev/types/expected_keepers.go index 5f7c49913af..38eaf8ae5c7 100644 --- a/x/protorev/types/expected_keepers.go +++ b/x/protorev/types/expected_keepers.go @@ -28,9 +28,11 @@ type GAMMKeeper interface { GetPoolAndPoke(ctx sdk.Context, poolId uint64) (gammtypes.CFMMPoolI, error) GetPoolsAndPoke(ctx sdk.Context) (res []gammtypes.CFMMPoolI, err error) GetPoolDenoms(ctx sdk.Context, poolId uint64) ([]string, error) - GetPoolType(ctx sdk.Context, poolId uint64) (swaproutertypes.PoolType, error) + GetPoolType(ctx sdk.Context, poolId uint64) (poolmanagertypes.PoolType, error) } +// PoolManagerKeeper defines the PoolManager contract that must be fulfilled when +// creating a x/protorev keeper. type PoolManagerKeeper interface { RouteExactAmountIn( ctx sdk.Context,