diff --git a/proto/stride/stakeibc/trade_route.proto b/proto/stride/stakeibc/trade_route.proto index 1ca3226b90..f8f45f93cc 100644 --- a/proto/stride/stakeibc/trade_route.proto +++ b/proto/stride/stakeibc/trade_route.proto @@ -4,7 +4,6 @@ package stride.stakeibc; import "gogoproto/gogo.proto"; import "stride/stakeibc/ica_account.proto"; import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; option go_package = "github.com/Stride-Labs/stride/v16/x/stakeibc/types"; @@ -30,9 +29,9 @@ message TradeRoute { // ibc denom of the reward on the trade chain, input to the swap string reward_denom_on_trade_zone = 3; // ibc of the host denom on the trade chain, output from the swap - string target_denom_on_trade_zone = 4; + string host_denom_on_trade_zone = 4; // should be the same as the native host denom on the host chain - string target_denom_on_host_zone = 5; + string host_denom_on_host_zone = 5; TradeHop host_to_reward_hop = 6 [ (gogoproto.nullable) = false ]; TradeHop reward_to_trade_hop = 7 [ (gogoproto.nullable) = false ]; @@ -49,14 +48,13 @@ message TradeRoute { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - // timestamp that the price was last updated - google.protobuf.Timestamp price_update_time = 11 - [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + // unix time in seconds that the price was last updated + uint64 price_update_timestamp = 11; // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price value on - // stride 0.05 means the output from the trade can be no less than a 5% - // deviation from the current value + // This captures both the loss from slippage and from a stale price on stride + // 0.05 means the output from the trade can be no less than a 5% deviation + // from the current value string max_allowed_swap_loss_rate = 12 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", diff --git a/proto/stride/stakeibc/tx.proto b/proto/stride/stakeibc/tx.proto index 9302e987a6..05efd50ea0 100644 --- a/proto/stride/stakeibc/tx.proto +++ b/proto/stride/stakeibc/tx.proto @@ -245,9 +245,15 @@ message MsgCreateTradeRoute { // The osmosis pool ID uint64 pool_id = 13; + // Threshold defining the percentage of tokens that could be lost in the trade + // This captures both the loss from slippage and from a stale price on stride + // "0.05" means the output from the trade can be no less than a 5% deviation + // from the current value + string max_allowed_swap_loss_rate = 14; + // min and max set boundaries of reward denom on trade chain we will swap - uint64 min_swap_amount = 14; - uint64 max_swap_amount = 15; + uint64 min_swap_amount = 15; + uint64 max_swap_amount = 16; } message MsgCreateTradeRouteResponse {} diff --git a/x/stakeibc/keeper/icqcallbacks_pool_price.go b/x/stakeibc/keeper/icqcallbacks_pool_price.go index ea3e4a7612..4124410ee3 100644 --- a/x/stakeibc/keeper/icqcallbacks_pool_price.go +++ b/x/stakeibc/keeper/icqcallbacks_pool_price.go @@ -25,9 +25,8 @@ import ( // P0LastSpotPrice gives the ratio of Asset0Denom / Asset1Denom // P1LastSpotPrice gives the ratio of Asset1Denom / Asset0Denom // -// When storing down the price, we want to denominate the price of the TargetDenom, -// relative to the price of the RewardDenom, which means we have to take the inverse -// from the response +// When storing down the price, we want to store down the ratio of HostDenom. +// Meaning, if Asset0Denom is the host denom, we want to store P0LastSpotPrice func PoolPriceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_PoolPrice, "Starting pool spot price callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) @@ -55,7 +54,7 @@ func PoolPriceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Qu // Get the associate "SpotPrice" from the twap record, based on the asset ordering // The "SpotPrice" is actually a ratio of the assets in the pool var price sdk.Dec - if twapRecord.Asset0Denom == tradeRoute.TargetDenomOnTradeZone { + if twapRecord.Asset0Denom == tradeRoute.HostDenomOnTradeZone { price = twapRecord.P0LastSpotPrice } else { price = twapRecord.P1LastSpotPrice @@ -63,11 +62,11 @@ func PoolPriceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Qu k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_PoolPrice, "Query response - price ratio of %s to %s is %s", - tradeRoute.RewardDenomOnTradeZone, tradeRoute.TargetDenomOnTradeZone, price)) + tradeRoute.RewardDenomOnTradeZone, tradeRoute.HostDenomOnTradeZone, price)) // Update the price and time on the trade route data tradeRoute.SwapPrice = price - tradeRoute.PriceUpdateTime = ctx.BlockTime() + tradeRoute.PriceUpdateTimestamp = uint64(ctx.BlockTime().UnixNano()) k.SetTradeRoute(ctx, tradeRoute) return nil @@ -76,16 +75,16 @@ func PoolPriceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Qu // Helper function to confirm that the two assets in the twap record match the assets in the trade route // The assets in the twap record are sorted alphabetically, so we have to check both orderings func AssertTwapAssetsMatchTradeRoute(twapRecord types.OsmosisTwapRecord, tradeRoute types.TradeRoute) error { - hostDenomMatchFirst := twapRecord.Asset0Denom == tradeRoute.TargetDenomOnTradeZone + hostDenomMatchFirst := twapRecord.Asset0Denom == tradeRoute.HostDenomOnTradeZone rewardDenomMatchSecond := twapRecord.Asset1Denom == tradeRoute.RewardDenomOnTradeZone rewardDenomMatchFirst := twapRecord.Asset0Denom == tradeRoute.RewardDenomOnTradeZone - hostDenomMatchSecond := twapRecord.Asset1Denom == tradeRoute.TargetDenomOnTradeZone + hostDenomMatchSecond := twapRecord.Asset1Denom == tradeRoute.HostDenomOnTradeZone if (hostDenomMatchFirst && rewardDenomMatchSecond) || (rewardDenomMatchFirst && hostDenomMatchSecond) { return nil } return fmt.Errorf("Assets in query response (%s, %s) do not match denom's from trade route (%s, %s)", - twapRecord.Asset0Denom, twapRecord.Asset1Denom, tradeRoute.TargetDenomOnTradeZone, tradeRoute.RewardDenomOnTradeZone) + twapRecord.Asset0Denom, twapRecord.Asset1Denom, tradeRoute.HostDenomOnTradeZone, tradeRoute.RewardDenomOnTradeZone) } diff --git a/x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go b/x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go index 3f3484847e..c5e27a507b 100644 --- a/x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go +++ b/x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go @@ -55,7 +55,7 @@ func TradeConvertedBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeConvertedBalance, "Sending discovered converted tokens %v %s from tradeZone back to hostZone", - tradeConvertedBalanceAmount, tradeRoute.TargetDenomOnTradeZone)) + tradeConvertedBalanceAmount, tradeRoute.HostDenomOnTradeZone)) return nil } diff --git a/x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go b/x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go index 71f81fef85..73b6caa2b4 100644 --- a/x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go +++ b/x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go @@ -48,7 +48,7 @@ func TradeRewardBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query ic // Trade all found reward tokens in the trade ICA to the output denom of their trade pool err = utils.ApplyFuncIfNoError(ctx, func(c sdk.Context) error { - return k.TradeRewardTokens(ctx, tradeRewardBalanceAmount, tradeRoute) + return k.SwapRewardTokens(ctx, tradeRewardBalanceAmount, tradeRoute) }) if err != nil { k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeRewardBalance, @@ -57,7 +57,7 @@ func TradeRewardBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query ic k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeRewardBalance, "Swapping discovered reward tokens %v %s for %s", - tradeRewardBalanceAmount, tradeRoute.RewardDenomOnTradeZone, tradeRoute.TargetDenomOnTradeZone)) + tradeRewardBalanceAmount, tradeRoute.RewardDenomOnTradeZone, tradeRoute.HostDenomOnTradeZone)) return nil } diff --git a/x/stakeibc/keeper/msg_server_create_trade_route.go b/x/stakeibc/keeper/msg_server_create_trade_route.go index 2492358b61..dfc4699bc6 100644 --- a/x/stakeibc/keeper/msg_server_create_trade_route.go +++ b/x/stakeibc/keeper/msg_server_create_trade_route.go @@ -14,6 +14,8 @@ import ( connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" ) +var DefaultMaxAllowedSwapLossRate = "0.05" + // Gov tx to to register a trade route that swaps reward tokens for a different denom // // Example proposal: @@ -107,20 +109,30 @@ func (ms msgServer) CreateTradeRoute(goCtx context.Context, msg *types.MsgCreate ToAccount: hostICA, } + maxAllowedSwapLossRate := msg.MaxAllowedSwapLossRate + if maxAllowedSwapLossRate == "" { + maxAllowedSwapLossRate = DefaultMaxAllowedSwapLossRate + } + // Finally build and store the main trade route tradeRoute := types.TradeRoute{ RewardDenomOnHostZone: msg.RewardDenomOnHost, RewardDenomOnRewardZone: msg.RewardDenomOnReward, RewardDenomOnTradeZone: msg.RewardDenomOnTrade, - TargetDenomOnTradeZone: msg.HostDenomOnTrade, - TargetDenomOnHostZone: msg.HostDenomOnHost, - HostToRewardHop: hostToRewardHop, - RewardToTradeHop: rewardToTradeHop, - TradeToHostHop: tradeToHostHop, - PoolId: msg.PoolId, - SwapPrice: sdk.ZeroDec(), // this should only ever be set by ICQ so initialize to blank - MinSwapAmount: sdkmath.NewIntFromUint64(msg.MinSwapAmount), - MaxSwapAmount: sdkmath.NewIntFromUint64(msg.MaxSwapAmount), + HostDenomOnTradeZone: msg.HostDenomOnTrade, + HostDenomOnHostZone: msg.HostDenomOnHost, + + HostToRewardHop: hostToRewardHop, + RewardToTradeHop: rewardToTradeHop, + TradeToHostHop: tradeToHostHop, + + PoolId: msg.PoolId, + SwapPrice: sdk.ZeroDec(), // this should only ever be set by ICQ so initialize to blank + PriceUpdateTimestamp: 0, + + MaxAllowedSwapLossRate: sdk.MustNewDecFromStr(maxAllowedSwapLossRate), + MinSwapAmount: sdkmath.NewIntFromUint64(msg.MinSwapAmount), + MaxSwapAmount: sdkmath.NewIntFromUint64(msg.MaxSwapAmount), } ms.Keeper.SetTradeRoute(ctx, tradeRoute) diff --git a/x/stakeibc/keeper/msg_server_delete_trade_route.go b/x/stakeibc/keeper/msg_server_delete_trade_route.go index b998b7c8f8..0bc884e536 100644 --- a/x/stakeibc/keeper/msg_server_delete_trade_route.go +++ b/x/stakeibc/keeper/msg_server_delete_trade_route.go @@ -23,8 +23,8 @@ func (k msgServer) DeleteTradeRoute(goCtx context.Context, msg *types.MsgDeleteT routes := k.GetAllTradeRoutes(ctx) for _, route := range routes { - if route.TargetDenomOnHostZone == msg.HostDenom && route.RewardDenomOnRewardZone == msg.RewardDenom { - k.RemoveTradeRoute(ctx, route.RewardDenomOnHostZone, route.TargetDenomOnHostZone) + if route.HostDenomOnHostZone == msg.HostDenom && route.RewardDenomOnRewardZone == msg.RewardDenom { + k.RemoveTradeRoute(ctx, route.RewardDenomOnHostZone, route.HostDenomOnHostZone) } // if no matching trade route was found for the given host-denom and reward-denom... do nothing } diff --git a/x/stakeibc/keeper/msg_server_update_trade_route.go b/x/stakeibc/keeper/msg_server_update_trade_route.go index c3c5d9632b..ac2d41db47 100644 --- a/x/stakeibc/keeper/msg_server_update_trade_route.go +++ b/x/stakeibc/keeper/msg_server_update_trade_route.go @@ -23,7 +23,7 @@ func (k msgServer) UpdateTradeRoute(goCtx context.Context, msg *types.MsgUpdateT routes := k.GetAllTradeRoutes(ctx) for _, route := range routes { - if route.TargetDenomOnHostZone == msg.HostDenom && route.RewardDenomOnRewardZone == msg.RewardDenom { + if route.HostDenomOnHostZone == msg.HostDenom && route.RewardDenomOnRewardZone == msg.RewardDenom { route.PoolId = msg.PoolId route.MinSwapAmount = msg.MinSwapAmount route.MaxSwapAmount = msg.MaxSwapAmount diff --git a/x/stakeibc/keeper/reward_converter.go b/x/stakeibc/keeper/reward_converter.go index f4b7f9ac1e..32eedb92b7 100644 --- a/x/stakeibc/keeper/reward_converter.go +++ b/x/stakeibc/keeper/reward_converter.go @@ -30,12 +30,12 @@ import ( // 1. Epochly check the reward denom balance in the withdrawal address // on callback, send all this reward denom from withdrawl ICA to trade ICA on the trade zone (OSMOSIS) // 2. Epochly check the reward denom balance in trade ICA -// on callback, trade all reward denom for target output denom defined by pool and routes in params -// 3. Epochly check the target denom balance in trade ICA -// on callback, transfer these target denoms from trade ICA to withdrawal ICA on original host zone +// on callback, trade all reward denom for host denom defined by pool and routes in params +// 3. Epochly check the host denom balance in trade ICA +// on callback, transfer these host denom tokens from trade ICA to withdrawal ICA on original host zone // -// Normal staking flow continues from there. So if the target denom is the original host zone base denom -// as will often be the case, then these tokens will follow the normal staking and distribution flow. +// Normal staking flow continues from there. So the host denom tokens will land on the original host zone +// and the normal staking and distribution flow will continue from there. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ICA tx will kick off transfering the reward tokens from the hostZone withdrawl ICA to the tradeZone trade ICA @@ -106,7 +106,7 @@ func (k Keeper) TransferConvertedTokensTradeToHost(ctx sdk.Context, amount sdkma } timeout := uint64(strideEpochTracker.NextEpochStartTime) - convertedDenom := route.TargetDenomOnTradeZone + convertedDenom := route.HostDenomOnTradeZone sendTokens := sdk.NewCoin(convertedDenom, amount) tradeIcaAddress := route.TradeToHostHop.FromAccount.Address @@ -138,10 +138,10 @@ func (k Keeper) TransferConvertedTokensTradeToHost(ctx sdk.Context, amount sdkma return nil } -// Trade reward tokens in the Trade ICA for the target output token type using ICA remote tx on trade zone +// Trade reward tokens in the Trade ICA for the host denom tokens using ICA remote tx on trade zone // The amount represents the total amount of the reward token in the trade ICA found by the calling ICQ // Depending on min and max swap amounts set in the route, it is possible not the full amount given will swap -func (k Keeper) TradeRewardTokens(ctx sdk.Context, rewardAmount sdkmath.Int, route types.TradeRoute) error { +func (k Keeper) SwapRewardTokens(ctx sdk.Context, rewardAmount sdkmath.Int, route types.TradeRoute) error { // If the min swap amount was not set it would be ZeroInt, if positive we need to compare to the amount given // then if the min swap amount is greater than the current amount, do nothing this epoch to avoid small swaps if route.MinSwapAmount.IsPositive() && route.MinSwapAmount.GT(rewardAmount) { @@ -162,7 +162,7 @@ func (k Keeper) TradeRewardTokens(ctx sdk.Context, rewardAmount sdkmath.Int, rou } // If there is a valid price, use it to set a floor for the acceptable minimum output tokens - // minOut is the minimum number of route.TargetDenomOnTradeZone we must receive or the swap will fail + // minOut is the minimum number of HostDenom tokens we must receive or the swap will fail // // To calculate minOut, we first convert the rewardAmount into units of HostDenom, // and then we multiply by (1 - MaxAllowedSwapLossRate) @@ -183,7 +183,7 @@ func (k Keeper) TradeRewardTokens(ctx sdk.Context, rewardAmount sdkmath.Int, rou // decide which msg generation function to call based on check of which tradeZone was passed in routes := []types.SwapAmountInRoute{{ PoolId: route.PoolId, - TokenOutDenom: route.TargetDenomOnTradeZone, + TokenOutDenom: route.HostDenomOnTradeZone, }} msgs := []proto.Message{&types.MsgSwapExactAmountIn{ Sender: tradeIcaAccount.Address, @@ -323,7 +323,7 @@ func (k Keeper) TradeConvertedBalanceQuery(ctx sdk.Context, route types.TradeRou if err != nil { return errorsmod.Wrapf(err, "invalid trade account address (%s), could not decode", tradeAccount.Address) } - queryData := append(bankTypes.CreateAccountBalancesPrefix(tradeAddressBz), []byte(route.TargetDenomOnTradeZone)...) + queryData := append(bankTypes.CreateAccountBalancesPrefix(tradeAddressBz), []byte(route.HostDenomOnTradeZone)...) // Timeout query at end of epoch strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) @@ -366,7 +366,7 @@ func (k Keeper) PoolPriceQuery(ctx sdk.Context, route types.TradeRoute) error { k.Logger(ctx).Info(utils.LogWithHostZone(tradeAccount.ChainId, "Submitting ICQ for spot price in this pool")) // Sort denom's - denom1, denom2 := route.RewardDenomOnTradeZone, route.TargetDenomOnTradeZone + denom1, denom2 := route.RewardDenomOnTradeZone, route.HostDenomOnTradeZone if denom1 > denom2 { denom1, denom2 = denom2, denom1 } @@ -446,7 +446,7 @@ func (k Keeper) SwapAllRewardTokens(ctx sdk.Context) { // Helper function to be run hourly, kicks off query to get and update the swap price in keeper data func (k Keeper) UpdateAllSwapPrices(ctx sdk.Context) { - k.SetTradeRoute(ctx, types.TradeRoute{RewardDenomOnHostZone: "A", TargetDenomOnHostZone: "B"}) + k.SetTradeRoute(ctx, types.TradeRoute{RewardDenomOnHostZone: "A", HostDenomOnHostZone: "B"}) for _, route := range k.GetAllTradeRoutes(ctx) { // ICQ swap price for the specific pair on this route and update keeper on callback if err := k.PoolPriceQuery(ctx, route); err != nil { diff --git a/x/stakeibc/keeper/trade_route_test.go b/x/stakeibc/keeper/trade_route_test.go index a6d4d49671..ed0cd5d889 100644 --- a/x/stakeibc/keeper/trade_route_test.go +++ b/x/stakeibc/keeper/trade_route_test.go @@ -47,15 +47,15 @@ func (s *KeeperTestSuite) CreateTradeRoutes() (routes []types.TradeRoute) { RewardDenomOnHostZone: "ibc-" + rewardDenom + "-on-" + hostChain, RewardDenomOnRewardZone: rewardDenom, RewardDenomOnTradeZone: "ibc-" + rewardDenom + "-on-" + tradeChain, - TargetDenomOnTradeZone: "ibc-" + hostDenom + "-on-" + tradeChain, - TargetDenomOnHostZone: hostDenom, + HostDenomOnTradeZone: "ibc-" + hostDenom + "-on-" + tradeChain, + HostDenomOnHostZone: hostDenom, HostToRewardHop: hostRewardHop, RewardToTradeHop: rewardTradeHop, TradeToHostHop: tradeHostHop, - PoolId: uint64(i * 100), - SwapPrice: sdk.OneDec(), + PoolId: uint64(i * 100), + SwapPrice: sdk.OneDec(), MinSwapAmount: sdk.ZeroInt(), MaxSwapAmount: sdk.NewInt(1_000_000_000), @@ -72,7 +72,7 @@ func (s *KeeperTestSuite) TestGetTradeRoute() { routes := s.CreateTradeRoutes() for i, route := range routes { startDenom := route.RewardDenomOnHostZone - endDenom := route.TargetDenomOnHostZone + endDenom := route.HostDenomOnHostZone actualRoute, found := s.App.StakeibcKeeper.GetTradeRoute(s.Ctx, startDenom, endDenom) s.Require().True(found, "route should have been found") @@ -83,8 +83,8 @@ func (s *KeeperTestSuite) TestGetTradeRoute() { func (s *KeeperTestSuite) TestRemoveTradeRoute() { routes := s.CreateTradeRoutes() for _, route := range routes { - s.App.StakeibcKeeper.RemoveTradeRoute(s.Ctx, route.RewardDenomOnHostZone, route.TargetDenomOnHostZone) - _, found := s.App.StakeibcKeeper.GetTradeRoute(s.Ctx, route.RewardDenomOnHostZone, route.TargetDenomOnHostZone) + s.App.StakeibcKeeper.RemoveTradeRoute(s.Ctx, route.RewardDenomOnHostZone, route.HostDenomOnHostZone) + _, found := s.App.StakeibcKeeper.GetTradeRoute(s.Ctx, route.RewardDenomOnHostZone, route.HostDenomOnHostZone) s.Require().False(found, "route should not have been found") } } diff --git a/x/stakeibc/types/trade_route.go b/x/stakeibc/types/trade_route.go index 64f8d31253..fe1ac218a3 100644 --- a/x/stakeibc/types/trade_route.go +++ b/x/stakeibc/types/trade_route.go @@ -1,5 +1,5 @@ package types func (t TradeRoute) GetKey() []byte { - return TradeRouteKeyFromDenoms(t.RewardDenomOnHostZone, t.TargetDenomOnHostZone) + return TradeRouteKeyFromDenoms(t.RewardDenomOnHostZone, t.HostDenomOnHostZone) } diff --git a/x/stakeibc/types/trade_route.pb.go b/x/stakeibc/types/trade_route.pb.go index bd8a5fe177..5039ac2e93 100644 --- a/x/stakeibc/types/trade_route.pb.go +++ b/x/stakeibc/types/trade_route.pb.go @@ -9,19 +9,15 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -105,24 +101,24 @@ type TradeRoute struct { // ibc denom of the reward on the trade chain, input to the swap RewardDenomOnTradeZone string `protobuf:"bytes,3,opt,name=reward_denom_on_trade_zone,json=rewardDenomOnTradeZone,proto3" json:"reward_denom_on_trade_zone,omitempty"` // ibc of the host denom on the trade chain, output from the swap - TargetDenomOnTradeZone string `protobuf:"bytes,4,opt,name=target_denom_on_trade_zone,json=targetDenomOnTradeZone,proto3" json:"target_denom_on_trade_zone,omitempty"` + HostDenomOnTradeZone string `protobuf:"bytes,4,opt,name=host_denom_on_trade_zone,json=hostDenomOnTradeZone,proto3" json:"host_denom_on_trade_zone,omitempty"` // should be the same as the native host denom on the host chain - TargetDenomOnHostZone string `protobuf:"bytes,5,opt,name=target_denom_on_host_zone,json=targetDenomOnHostZone,proto3" json:"target_denom_on_host_zone,omitempty"` - HostToRewardHop TradeHop `protobuf:"bytes,6,opt,name=host_to_reward_hop,json=hostToRewardHop,proto3" json:"host_to_reward_hop"` - RewardToTradeHop TradeHop `protobuf:"bytes,7,opt,name=reward_to_trade_hop,json=rewardToTradeHop,proto3" json:"reward_to_trade_hop"` - TradeToHostHop TradeHop `protobuf:"bytes,8,opt,name=trade_to_host_hop,json=tradeToHostHop,proto3" json:"trade_to_host_hop"` + HostDenomOnHostZone string `protobuf:"bytes,5,opt,name=host_denom_on_host_zone,json=hostDenomOnHostZone,proto3" json:"host_denom_on_host_zone,omitempty"` + HostToRewardHop TradeHop `protobuf:"bytes,6,opt,name=host_to_reward_hop,json=hostToRewardHop,proto3" json:"host_to_reward_hop"` + RewardToTradeHop TradeHop `protobuf:"bytes,7,opt,name=reward_to_trade_hop,json=rewardToTradeHop,proto3" json:"reward_to_trade_hop"` + TradeToHostHop TradeHop `protobuf:"bytes,8,opt,name=trade_to_host_hop,json=tradeToHostHop,proto3" json:"trade_to_host_hop"` // Currently Osmosis is the only trade chain so this is an osmosis pool id PoolId uint64 `protobuf:"varint,9,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // Spot price in the pool to convert the reward denom to the host denom // output_tokens = swap_price * input tokens // This value may be slightly stale as it is updated by an ICQ SwapPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,10,opt,name=swap_price,json=swapPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_price"` - // timestamp that the price was last updated - PriceUpdateTime time.Time `protobuf:"bytes,11,opt,name=price_update_time,json=priceUpdateTime,proto3,stdtime" json:"price_update_time"` + // unix time in seconds that the price was last updated + PriceUpdateTimestamp uint64 `protobuf:"varint,11,opt,name=price_update_timestamp,json=priceUpdateTimestamp,proto3" json:"price_update_timestamp,omitempty"` // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price value on - // stride 0.05 means the output from the trade can be no less than a 5% - // deviation from the current value + // This captures both the loss from slippage and from a stale price on stride + // 0.05 means the output from the trade can be no less than a 5% deviation + // from the current value MaxAllowedSwapLossRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,12,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_allowed_swap_loss_rate"` // min and max set boundaries of reward denom on trade chain we will swap // min also decides when reward token transfers are worth it (transfer fees) @@ -184,16 +180,16 @@ func (m *TradeRoute) GetRewardDenomOnTradeZone() string { return "" } -func (m *TradeRoute) GetTargetDenomOnTradeZone() string { +func (m *TradeRoute) GetHostDenomOnTradeZone() string { if m != nil { - return m.TargetDenomOnTradeZone + return m.HostDenomOnTradeZone } return "" } -func (m *TradeRoute) GetTargetDenomOnHostZone() string { +func (m *TradeRoute) GetHostDenomOnHostZone() string { if m != nil { - return m.TargetDenomOnHostZone + return m.HostDenomOnHostZone } return "" } @@ -226,11 +222,11 @@ func (m *TradeRoute) GetPoolId() uint64 { return 0 } -func (m *TradeRoute) GetPriceUpdateTime() time.Time { +func (m *TradeRoute) GetPriceUpdateTimestamp() uint64 { if m != nil { - return m.PriceUpdateTime + return m.PriceUpdateTimestamp } - return time.Time{} + return 0 } func init() { @@ -241,51 +237,49 @@ func init() { func init() { proto.RegisterFile("stride/stakeibc/trade_route.proto", fileDescriptor_c252b142ecf88017) } var fileDescriptor_c252b142ecf88017 = []byte{ - // 690 bytes of a gzipped FileDescriptorProto + // 657 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x4e, 0xdb, 0x4c, - 0x10, 0xc0, 0x63, 0xe0, 0x83, 0x64, 0xf9, 0x93, 0x0f, 0xd3, 0x42, 0x12, 0xa4, 0x84, 0x72, 0xa8, - 0xb8, 0x60, 0xab, 0x54, 0xaa, 0x50, 0xc5, 0xa1, 0x09, 0x39, 0x90, 0x2a, 0x6a, 0x91, 0x49, 0x7b, - 0xa0, 0x87, 0xd5, 0xc6, 0x5e, 0x12, 0x8b, 0xd8, 0x63, 0x79, 0x37, 0x4d, 0xda, 0xa7, 0x40, 0x7d, - 0x96, 0x3e, 0x41, 0x4f, 0x1c, 0x51, 0x4f, 0x55, 0x0f, 0xb4, 0x82, 0x17, 0xa9, 0x76, 0xd6, 0x06, - 0x12, 0x7a, 0x48, 0xab, 0x9e, 0x92, 0xf5, 0xcc, 0xef, 0xb7, 0x33, 0xde, 0x1d, 0x93, 0x47, 0x42, - 0xc6, 0xbe, 0xc7, 0x6d, 0x21, 0xd9, 0x29, 0xf7, 0xdb, 0xae, 0x2d, 0x63, 0xe6, 0x71, 0x1a, 0x43, - 0x5f, 0x72, 0x2b, 0x8a, 0x41, 0x82, 0x99, 0xd7, 0x29, 0x56, 0x9a, 0x52, 0x7a, 0xd0, 0x81, 0x0e, - 0x60, 0xcc, 0x56, 0xff, 0x74, 0x5a, 0xe9, 0x9e, 0xc9, 0x77, 0x19, 0x65, 0xae, 0x0b, 0xfd, 0x50, - 0x26, 0x29, 0x45, 0x17, 0x44, 0x00, 0x82, 0x6a, 0x56, 0x2f, 0x92, 0x50, 0xa5, 0x03, 0xd0, 0xe9, - 0x71, 0x1b, 0x57, 0xed, 0xfe, 0x89, 0x2d, 0xfd, 0x80, 0x0b, 0xc9, 0x82, 0x48, 0x27, 0x6c, 0x7e, - 0x31, 0x48, 0xb6, 0xa5, 0x6a, 0x3b, 0x80, 0xc8, 0xb4, 0xc8, 0x8a, 0x8c, 0x59, 0x28, 0x4e, 0x78, - 0x4c, 0xdd, 0x2e, 0x0b, 0x43, 0xde, 0xa3, 0xbe, 0x57, 0x30, 0x36, 0x8c, 0xad, 0x9c, 0xb3, 0x9c, - 0x86, 0xf6, 0x75, 0xa4, 0xe1, 0x99, 0x75, 0xb2, 0x70, 0x12, 0x43, 0x90, 0x96, 0x53, 0x98, 0xda, - 0x30, 0xb6, 0xe6, 0x77, 0xd6, 0xad, 0xb1, 0xce, 0xac, 0xc6, 0x7e, 0xb5, 0xaa, 0x53, 0x6a, 0x33, - 0xe7, 0x97, 0x95, 0x8c, 0x33, 0xaf, 0xb0, 0xe4, 0x91, 0xf9, 0x82, 0x10, 0x09, 0x37, 0x8e, 0xe9, - 0x49, 0x1d, 0x39, 0x09, 0xc9, 0x83, 0xcd, 0x4f, 0x59, 0x42, 0xb0, 0x09, 0x47, 0xbd, 0x5f, 0x73, - 0x97, 0x14, 0x63, 0x3e, 0x60, 0xb1, 0x47, 0x3d, 0x1e, 0x42, 0x40, 0x21, 0xa4, 0x5d, 0x10, 0x92, - 0x7e, 0x84, 0x90, 0x27, 0xcd, 0x3c, 0xd4, 0x09, 0x75, 0x15, 0x7f, 0x1d, 0x1e, 0x80, 0x90, 0xc7, - 0x10, 0x72, 0x73, 0x8f, 0xac, 0x8f, 0x93, 0xc9, 0x1a, 0xd9, 0x29, 0x64, 0xd7, 0x46, 0x58, 0x07, - 0x17, 0x48, 0x3f, 0x27, 0xa5, 0x71, 0x5a, 0x1f, 0x3b, 0xc2, 0xd3, 0x08, 0xaf, 0x8e, 0xc0, 0x58, - 0x74, 0xca, 0x4a, 0x16, 0x77, 0xb8, 0xfc, 0x2d, 0x3b, 0xa3, 0x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0x7f, 0xe9, 0xe5, 0xfd, 0x6b, 0xef, 0x6e, 0xe3, + 0xf4, 0xa2, 0x6c, 0x9d, 0x5d, 0x94, 0xad, 0x1f, 0x17, 0x65, 0xeb, 0xd3, 0x65, 0xb9, 0x70, 0x76, + 0x59, 0x2e, 0x7c, 0xbb, 0x2c, 0x17, 0x0e, 0x37, 0x6f, 0x08, 0x0f, 0xe8, 0xa8, 0x6c, 0x34, 0x78, + 0x4b, 0x56, 0xb2, 0x47, 0xf2, 0xfd, 0xe3, 0xed, 0x4a, 0xff, 0xc6, 0xa3, 0xab, 0x0b, 0xb4, 0x46, + 0xe9, 0x29, 0x7c, 0xf2, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x05, 0x21, 0xfb, 0x8a, 0x94, 0x05, 0x00, + 0x00, } func (m *TradeHop) Marshal() (dAtA []byte, err error) { @@ -388,14 +382,11 @@ func (m *TradeRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x62 - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.PriceUpdateTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.PriceUpdateTime):]) - if err3 != nil { - return 0, err3 + if m.PriceUpdateTimestamp != 0 { + i = encodeVarintTradeRoute(dAtA, i, uint64(m.PriceUpdateTimestamp)) + i-- + dAtA[i] = 0x58 } - i -= n3 - i = encodeVarintTradeRoute(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x5a { size := m.SwapPrice.Size() i -= size @@ -441,17 +432,17 @@ func (m *TradeRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x32 - if len(m.TargetDenomOnHostZone) > 0 { - i -= len(m.TargetDenomOnHostZone) - copy(dAtA[i:], m.TargetDenomOnHostZone) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.TargetDenomOnHostZone))) + if len(m.HostDenomOnHostZone) > 0 { + i -= len(m.HostDenomOnHostZone) + copy(dAtA[i:], m.HostDenomOnHostZone) + i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.HostDenomOnHostZone))) i-- dAtA[i] = 0x2a } - if len(m.TargetDenomOnTradeZone) > 0 { - i -= len(m.TargetDenomOnTradeZone) - copy(dAtA[i:], m.TargetDenomOnTradeZone) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.TargetDenomOnTradeZone))) + if len(m.HostDenomOnTradeZone) > 0 { + i -= len(m.HostDenomOnTradeZone) + copy(dAtA[i:], m.HostDenomOnTradeZone) + i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.HostDenomOnTradeZone))) i-- dAtA[i] = 0x22 } @@ -525,11 +516,11 @@ func (m *TradeRoute) Size() (n int) { if l > 0 { n += 1 + l + sovTradeRoute(uint64(l)) } - l = len(m.TargetDenomOnTradeZone) + l = len(m.HostDenomOnTradeZone) if l > 0 { n += 1 + l + sovTradeRoute(uint64(l)) } - l = len(m.TargetDenomOnHostZone) + l = len(m.HostDenomOnHostZone) if l > 0 { n += 1 + l + sovTradeRoute(uint64(l)) } @@ -544,8 +535,9 @@ func (m *TradeRoute) Size() (n int) { } l = m.SwapPrice.Size() n += 1 + l + sovTradeRoute(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.PriceUpdateTime) - n += 1 + l + sovTradeRoute(uint64(l)) + if m.PriceUpdateTimestamp != 0 { + n += 1 + sovTradeRoute(uint64(m.PriceUpdateTimestamp)) + } l = m.MaxAllowedSwapLossRate.Size() n += 1 + l + sovTradeRoute(uint64(l)) l = m.MinSwapAmount.Size() @@ -836,7 +828,7 @@ func (m *TradeRoute) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetDenomOnTradeZone", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnTradeZone", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -864,11 +856,11 @@ func (m *TradeRoute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TargetDenomOnTradeZone = string(dAtA[iNdEx:postIndex]) + m.HostDenomOnTradeZone = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetDenomOnHostZone", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnHostZone", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -896,7 +888,7 @@ func (m *TradeRoute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TargetDenomOnHostZone = string(dAtA[iNdEx:postIndex]) + m.HostDenomOnHostZone = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { @@ -1051,10 +1043,10 @@ func (m *TradeRoute) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceUpdateTime", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceUpdateTimestamp", wireType) } - var msglen int + m.PriceUpdateTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTradeRoute @@ -1064,25 +1056,11 @@ func (m *TradeRoute) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.PriceUpdateTimestamp |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.PriceUpdateTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) diff --git a/x/stakeibc/types/tx.pb.go b/x/stakeibc/types/tx.pb.go index 5658daa0c1..05f6374d02 100644 --- a/x/stakeibc/types/tx.pb.go +++ b/x/stakeibc/types/tx.pb.go @@ -1579,9 +1579,14 @@ type MsgCreateTradeRoute struct { HostDenomOnHost string `protobuf:"bytes,12,opt,name=host_denom_on_host,json=hostDenomOnHost,proto3" json:"host_denom_on_host,omitempty"` // The osmosis pool ID PoolId uint64 `protobuf:"varint,13,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + // Threshold defining the percentage of tokens that could be lost in the trade + // This captures both the loss from slippage and from a stale price on stride + // "0.05" means the output from the trade can be no less than a 5% deviation + // from the current value + MaxAllowedSwapLossRate string `protobuf:"bytes,14,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3" json:"max_allowed_swap_loss_rate,omitempty"` // min and max set boundaries of reward denom on trade chain we will swap - MinSwapAmount uint64 `protobuf:"varint,14,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` - MaxSwapAmount uint64 `protobuf:"varint,15,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` + MinSwapAmount uint64 `protobuf:"varint,15,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` + MaxSwapAmount uint64 `protobuf:"varint,16,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` } func (m *MsgCreateTradeRoute) Reset() { *m = MsgCreateTradeRoute{} } @@ -1708,6 +1713,13 @@ func (m *MsgCreateTradeRoute) GetPoolId() uint64 { return 0 } +func (m *MsgCreateTradeRoute) GetMaxAllowedSwapLossRate() string { + if m != nil { + return m.MaxAllowedSwapLossRate + } + return "" +} + func (m *MsgCreateTradeRoute) GetMinSwapAmount() uint64 { if m != nil { return m.MinSwapAmount @@ -2004,135 +2016,137 @@ func init() { func init() { proto.RegisterFile("stride/stakeibc/tx.proto", fileDescriptor_9b7e09c9ad51cd54) } var fileDescriptor_9b7e09c9ad51cd54 = []byte{ - // 2043 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xcd, 0x6f, 0x24, 0x47, - 0x15, 0xf7, 0xec, 0x7a, 0xfd, 0xf1, 0xfc, 0xdd, 0xf6, 0x7a, 0xc7, 0xbd, 0xf1, 0x8c, 0xdd, 0xde, - 0x04, 0xe3, 0xc4, 0x33, 0xd8, 0x8e, 0x02, 0x2c, 0x20, 0x61, 0x8f, 0x03, 0x19, 0xb1, 0x0e, 0xa8, - 0xed, 0xb0, 0xd2, 0x4a, 0xa8, 0xa9, 0xe9, 0xae, 0x9d, 0x69, 0xed, 0x74, 0xd5, 0xa4, 0xbb, 0xc7, - 0x9e, 0xe5, 0x80, 0x22, 0x24, 0x24, 0x84, 0x84, 0x04, 0x42, 0xca, 0x11, 0xe5, 0xc0, 0x01, 0xc1, - 0x25, 0x42, 0xf9, 0x23, 0x22, 0x71, 0x89, 0x72, 0x40, 0x88, 0x83, 0x41, 0xbb, 0x87, 0x70, 0x44, - 0xfe, 0x0b, 0x50, 0x7d, 0x4c, 0x4d, 0x77, 0x4f, 0x8d, 0xed, 0x75, 0xcc, 0x5e, 0x6c, 0x57, 0xd5, - 0xaf, 0xde, 0xfb, 0xd5, 0xab, 0x57, 0xaf, 0x7e, 0xd5, 0x86, 0x7c, 0x14, 0x87, 0xbe, 0x87, 0xcb, - 0x51, 0x8c, 0x9e, 0x60, 0xbf, 0xe6, 0x96, 0xe3, 0x4e, 0xa9, 0x15, 0xd2, 0x98, 0x1a, 0x33, 0x62, - 0xa4, 0xd4, 0x1d, 0x31, 0x57, 0xb3, 0x50, 0xdf, 0x45, 0x0e, 0x72, 0x5d, 0xda, 0x26, 0xb1, 0x98, - 0x63, 0x16, 0xb3, 0x90, 0x63, 0xd4, 0xf4, 0x3d, 0x14, 0xd3, 0x50, 0x02, 0x16, 0xea, 0xb4, 0x4e, - 0xf9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f, 0x0b, 0x43, - 0x8f, 0xb6, 0x13, 0xb2, 0xe4, 0x90, 0x5b, 0xdc, 0x7c, 0x80, 0x6a, 0x51, 0x59, 0x2a, 0xd3, 0xe3, - 0xad, 0xb7, 0x92, 0xea, 0x94, 0xcb, 0x94, 0xda, 0x08, 0xff, 0x4f, 0xe1, 0xce, 0xff, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xd8, 0xf2, 0x08, 0xab, 0x17, 0x1d, 0x00, 0x00, + // 2074 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xcf, 0x6f, 0x24, 0x47, + 0x15, 0xf6, 0xd8, 0x5e, 0xff, 0x78, 0xb6, 0xd7, 0x76, 0xdb, 0xeb, 0x1d, 0xf7, 0xc6, 0x33, 0x76, + 0x7b, 0x13, 0x8c, 0x13, 0xcf, 0x60, 0x3b, 0x0a, 0x60, 0x40, 0xc2, 0x1e, 0x07, 0x32, 0x62, 0x1d, + 0x50, 0xdb, 0x61, 0xa5, 0x95, 0x50, 0x53, 0xd3, 0x5d, 0x3b, 0xd3, 0xda, 0xee, 0xae, 0x49, 0x57, + 0x8f, 0x3d, 0xcb, 0x01, 0x45, 0x48, 0x48, 0x08, 0x09, 0x09, 0x84, 0x94, 0x23, 0xca, 0x81, 0x03, + 0x02, 0x0e, 0x11, 0xca, 0x1f, 0x11, 0x89, 0x4b, 0x94, 0x03, 0x42, 0x1c, 0x0c, 0xda, 0x3d, 0x84, + 0xb3, 0xff, 0x02, 0x54, 0x3f, 0xa6, 0xa6, 0xbb, 0xa7, 0xc7, 0xe3, 0x75, 0xcc, 0x5e, 0x6c, 0x57, + 0xd5, 0x57, 0xef, 0x7d, 0xf5, 0xea, 0xd5, 0xab, 0xaf, 0xda, 0x90, 0xa7, 0x51, 0xe8, 0x3a, 0xb8, + 0x4c, 0x23, 0xf4, 0x04, 0xbb, 0x35, 0xbb, 0x1c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58, 0xea, + 0xf3, 0x16, 0xcb, 0x0c, 0x43, 0x36, 0x56, 0xdf, 0xb9, 0x3a, 0x56, 0x79, 0x26, 0xb0, 0x90, 0xf5, + 0xb2, 0xea, 0x13, 0xa1, 0x1e, 0xa0, 0x5e, 0xbe, 0x22, 0x50, 0x39, 0xfc, 0x09, 0xcc, 0x24, 0x5f, + 0x4c, 0x6b, 0x59, 0x16, 0x12, 0x10, 0xfd, 0xab, 0x03, 0x21, 0xca, 0x7c, 0x0b, 0xee, 0x64, 0x3f, + 0x76, 0x32, 0x6d, 0x64, 0x42, 0xf5, 0xed, 0x2b, 0x43, 0x95, 0x5b, 0x1b, 0x66, 0xd3, 0xcf, 0x93, + 0xf5, 0x2c, 0x2b, 0x29, 0x90, 0xfe, 0xfa, 0x15, 0x40, 0xca, 0xc9, 0xcf, 0x21, 0xdf, 0xf7, 0x89, + 0xd1, 0x27, 0xdf, 0xb2, 0xd1, 0xfa, 0x9b, 0x2f, 0x82, 0x56, 0xfe, 0x7f, 0x93, 0x83, 0x95, 0xcb, + 0x1f, 0x09, 0x99, 0x91, 0xbb, 0x74, 0x8a, 0xfe, 0xcd, 0x17, 0x9e, 0x12, 0xcf, 0xdd, 0x2c, 0x01, + 0x9e, 0x99, 0xbb, 0x19, 0xc0, 0xec, 0xdc, 0xbd, 0x44, 0x69, 0x6b, 0x8f, 0x60, 0x3a, 0xf1, 0x51, + 0x76, 0x35, 0xfb, 0xc0, 0x75, 0x11, 0xfa, 0xc6, 0x20, 0x44, 0xbc, 0x4a, 0xa6, 0x5e, 0x38, 0x99, + 0x55, 0x32, 0x89, 0xc9, 0xae, 0x92, 0xd9, 0x4f, 0x16, 0xed, 0xf7, 0x39, 0x28, 0x0e, 0xfa, 0xef, + 0xce, 0x6e, 0xff, 0xdd, 0xe8, 0x3b, 0x49, 0xff, 0xd6, 0x35, 0x26, 0xc5, 0xd7, 0x9d, 0x7a, 0xba, + 0x18, 0x7d, 0x92, 0x33, 0x86, 0xc9, 0x5e, 0x77, 0xf6, 0xc3, 0x85, 0x15, 0xf1, 0x9e, 0x47, 0x4b, + 0x66, 0x11, 0x4f, 0xa3, 0xb2, 0x8b, 0x78, 0x3f, 0x49, 0xc5, 0xfc, 0xf4, 0xe8, 0xa9, 0xfb, 0xfd, + 0xcf, 0xf7, 0x20, 0x3f, 0xfd, 0x84, 0x12, 0xf3, 0xd3, 0x23, 0x92, 0xee, 0xf7, 0xdf, 0x82, 0x41, + 0x7e, 0xfa, 0x09, 0x83, 0x83, 0x07, 0x9f, 0x3e, 0x2b, 0xe4, 0x3e, 0x7b, 0x56, 0xc8, 0xfd, 0xe7, + 0x59, 0x21, 0xf7, 0xdb, 0xe7, 0x85, 0xa1, 0xcf, 0x9e, 0x17, 0x86, 0xfe, 0xf9, 0xbc, 0x30, 0xf4, + 0x68, 0x27, 0x26, 0x4b, 0x8e, 0xb9, 0xc5, 0xad, 0x07, 0xa8, 0x46, 0xcb, 0x52, 0x99, 0x9e, 0x6e, + 0xbf, 0x15, 0x57, 0xa7, 0x5c, 0xa6, 0xd4, 0xc6, 0xf8, 0x7f, 0x19, 0x77, 0xff, 0x17, 0x00, 0x00, + 0xff, 0xff, 0x19, 0xe0, 0xb2, 0xad, 0x53, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4075,12 +4089,21 @@ func (m *MsgCreateTradeRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.MaxSwapAmount != 0 { i = encodeVarintTx(dAtA, i, uint64(m.MaxSwapAmount)) i-- - dAtA[i] = 0x78 + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 } if m.MinSwapAmount != 0 { i = encodeVarintTx(dAtA, i, uint64(m.MinSwapAmount)) i-- - dAtA[i] = 0x70 + dAtA[i] = 0x78 + } + if len(m.MaxAllowedSwapLossRate) > 0 { + i -= len(m.MaxAllowedSwapLossRate) + copy(dAtA[i:], m.MaxAllowedSwapLossRate) + i = encodeVarintTx(dAtA, i, uint64(len(m.MaxAllowedSwapLossRate))) + i-- + dAtA[i] = 0x72 } if m.PoolId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) @@ -4927,11 +4950,15 @@ func (m *MsgCreateTradeRoute) Size() (n int) { if m.PoolId != 0 { n += 1 + sovTx(uint64(m.PoolId)) } + l = len(m.MaxAllowedSwapLossRate) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if m.MinSwapAmount != 0 { n += 1 + sovTx(uint64(m.MinSwapAmount)) } if m.MaxSwapAmount != 0 { - n += 1 + sovTx(uint64(m.MaxSwapAmount)) + n += 2 + sovTx(uint64(m.MaxSwapAmount)) } return n } @@ -8903,6 +8930,38 @@ func (m *MsgCreateTradeRoute) Unmarshal(dAtA []byte) error { } } case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxAllowedSwapLossRate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinSwapAmount", wireType) } @@ -8921,7 +8980,7 @@ func (m *MsgCreateTradeRoute) Unmarshal(dAtA []byte) error { break } } - case 15: + case 16: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxSwapAmount", wireType) }