diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a1ab1e8bd7..b5831065164 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Features + +* [#6416](https://github.com/osmosis-labs/osmosis/pull/6416) feat[CL]: add num initialized ticks query + ### Bug Fixes * [#6334](https://github.com/osmosis-labs/osmosis/pull/6334) fix: enable taker fee cli @@ -70,22 +74,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## v18.0.0 -<<<<<<< HEAD -======= -### Misc Improvements - -* [#6161](https://github.com/osmosis-labs/osmosis/pull/6161) Reduce CPU time of epochs - -### Bug Fixes - -* [#6162](https://github.com/osmosis-labs/osmosis/pull/6162) allow zero qualifying balancer shares in CL incentives - -### Features - -* [#6034](https://github.com/osmosis-labs/osmosis/pull/6034) feat(spike): taker fee -## v18.0.0 - ->>>>>>> 5c8fd80f (feat(spike): taker fee (#6034)) Fixes mainnet bugs w/ incorrect accumulation sumtrees, and CL handling for a balancer pool with 0 bonded shares. ### Improvements diff --git a/go.mod b/go.mod index a2a1ead33b9..36ca5a53468 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( cosmossdk.io/errors v1.0.0 github.com/CosmWasm/wasmd v0.31.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.47.4 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4 v4.1.0 github.com/cosmos/ibc-apps/modules/async-icq/v4 v4.1.0 diff --git a/go.sum b/go.sum index 9942f51c1d3..deb01a46f48 100644 --- a/go.sum +++ b/go.sum @@ -579,6 +579,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -1332,6 +1333,7 @@ go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/proto/osmosis/concentrated-liquidity/query.proto b/proto/osmosis/concentrated-liquidity/query.proto index 1ecb3404916..b130aa059cc 100644 --- a/proto/osmosis/concentrated-liquidity/query.proto +++ b/proto/osmosis/concentrated-liquidity/query.proto @@ -124,6 +124,14 @@ service Query { option (google.api.http).get = "/osmosis/concentratedliquidity/v1beta1/get_total_liquidity"; } + + // NumNextInitializedTicks returns the provided number of next initialized + // ticks in the direction of swapping the token in denom. + rpc NumNextInitializedTicks(NumNextInitializedTicksRequest) + returns (NumNextInitializedTicksResponse) { + option (google.api.http).get = "/osmosis/concentratedliquidity/v1beta1/" + "num_next_initialized_ticks"; + } } //=============================== UserPositions @@ -315,3 +323,23 @@ message GetTotalLiquidityResponse { (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } + +//=============================== NumNextInitializedTicks +message NumNextInitializedTicksRequest { + uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; + string token_in_denom = 2 + [ (gogoproto.moretags) = "yaml:\"token_in_denom\"" ]; + uint64 num_next_initialized_ticks = 3 + [ (gogoproto.moretags) = "yaml:\"num_next_initialized_ticks\"" ]; +} +message NumNextInitializedTicksResponse { + repeated TickLiquidityNet liquidity_depths = 1 + [ (gogoproto.nullable) = false ]; + int64 current_tick = 2; + string current_liquidity = 3 [ + + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.moretags) = "yaml:\"current_liquidity\"", + (gogoproto.nullable) = false + ]; +} \ No newline at end of file diff --git a/proto/osmosis/concentrated-liquidity/query.yml b/proto/osmosis/concentrated-liquidity/query.yml index 2df4cd3178e..6dd7e708fe9 100644 --- a/proto/osmosis/concentrated-liquidity/query.yml +++ b/proto/osmosis/concentrated-liquidity/query.yml @@ -69,3 +69,8 @@ queries: query_func: "k.GetTotalLiquidity" cli: cmd: "GetTotalLiquidity" + NumNextInitializedTicks: + proto_wrapper: + query_func: "k.NumNextInitializedTicks" + cli: + cmd: "NumNextInitializedTicks" diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index b77348bf14b..0eb2cfdc20b 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -518,9 +518,9 @@ func (s *IntegrationTestSuite) ConcentratedLiquidity() { nextInitTick := int64(40000) // address1 position1's upper tick // Calculate sqrtPrice after and at the next initialized tick (upperTick of address1 position1 - 40000) - _, sqrtPriceAfterNextInitializedTick, err := clmath.TickToSqrtPrice(nextInitTick + tickOffset) + sqrtPriceAfterNextInitializedTick, err := clmath.TickToSqrtPrice(nextInitTick + tickOffset) s.Require().NoError(err) - _, sqrtPriceAtNextInitializedTick, err := clmath.TickToSqrtPrice(nextInitTick) + sqrtPriceAtNextInitializedTick, err := clmath.TickToSqrtPrice(nextInitTick) s.Require().NoError(err) sqrtPriceAfterNextInitializedTickBigDec := sqrtPriceAfterNextInitializedTick sqrtPriceAtNextInitializedTickBigDec := sqrtPriceAtNextInitializedTick @@ -665,9 +665,9 @@ func (s *IntegrationTestSuite) ConcentratedLiquidity() { // Using: CalcAmount0Delta = liquidity * ((sqrtPriceB - sqrtPriceA) / (sqrtPriceB * sqrtPriceA)) // Calculate sqrtPrice after and at the next initialized tick (which is upperTick of address1 position1 - 40000) - _, sqrtPricebBelowNextInitializedTick, err := clmath.TickToSqrtPrice(nextInitTick - tickOffset) + sqrtPricebBelowNextInitializedTick, err := clmath.TickToSqrtPrice(nextInitTick - tickOffset) s.Require().NoError(err) - _, sqrtPriceAtNextInitializedTick, err = clmath.TickToSqrtPrice(nextInitTick) + sqrtPriceAtNextInitializedTick, err = clmath.TickToSqrtPrice(nextInitTick) s.Require().NoError(err) sqrtPriceAtNextInitializedTickBigDec = sqrtPriceAtNextInitializedTick diff --git a/x/concentrated-liquidity/client/grpc/grpc_query.go b/x/concentrated-liquidity/client/grpc/grpc_query.go index 251c67b2522..0b3fd0fc4b5 100644 --- a/x/concentrated-liquidity/client/grpc/grpc_query.go +++ b/x/concentrated-liquidity/client/grpc/grpc_query.go @@ -90,6 +90,16 @@ func (q Querier) Params(grpcCtx context.Context, return q.Q.Params(ctx, *req) } +func (q Querier) NumNextInitializedTicks(grpcCtx context.Context, + req *queryproto.NumNextInitializedTicksRequest, +) (*queryproto.NumNextInitializedTicksResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(grpcCtx) + return q.Q.NumNextInitializedTicks(ctx, *req) +} + func (q Querier) LiquidityPerTickRange(grpcCtx context.Context, req *queryproto.LiquidityPerTickRangeRequest, ) (*queryproto.LiquidityPerTickRangeResponse, error) { diff --git a/x/concentrated-liquidity/client/query_proto_wrap.go b/x/concentrated-liquidity/client/query_proto_wrap.go index a1c5efc0359..7f79de46df4 100644 --- a/x/concentrated-liquidity/client/query_proto_wrap.go +++ b/x/concentrated-liquidity/client/query_proto_wrap.go @@ -292,3 +292,28 @@ func (q Querier) GetTotalLiquidity(ctx sdk.Context, req clquery.GetTotalLiquidit TotalLiquidity: totalLiquidity, }, nil } + +// NumNextInitializedTicks returns an array of LiquidityDepthWithRange, which contains the user defined number of next initialized ticks in the direction +// of swapping in the given tokenInDenom. +func (q Querier) NumNextInitializedTicks(ctx sdk.Context, req clquery.NumNextInitializedTicksRequest) (*clquery.NumNextInitializedTicksResponse, error) { + if req.TokenInDenom == "" { + return nil, status.Error(codes.InvalidArgument, "tokenIn is empty") + } + + liquidityDepths, err := q.Keeper.GetNumNextInitializedTicks( + ctx, + req.PoolId, + req.NumNextInitializedTicks, + req.TokenInDenom, + ) + if err != nil { + return nil, err + } + + pool, err := q.Keeper.GetConcentratedPoolById(ctx, req.PoolId) + if err != nil { + return nil, err + } + + return &clquery.NumNextInitializedTicksResponse{LiquidityDepths: liquidityDepths, CurrentLiquidity: pool.GetLiquidity(), CurrentTick: pool.GetCurrentTick()}, nil +} diff --git a/x/concentrated-liquidity/client/queryproto/query.pb.go b/x/concentrated-liquidity/client/queryproto/query.pb.go index 5e72654e457..50134681987 100644 --- a/x/concentrated-liquidity/client/queryproto/query.pb.go +++ b/x/concentrated-liquidity/client/queryproto/query.pb.go @@ -1505,6 +1505,120 @@ func (m *GetTotalLiquidityResponse) GetTotalLiquidity() github_com_cosmos_cosmos return nil } +// =============================== NumNextInitializedTicks +type NumNextInitializedTicksRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokenInDenom string `protobuf:"bytes,2,opt,name=token_in_denom,json=tokenInDenom,proto3" json:"token_in_denom,omitempty" yaml:"token_in_denom"` + NumNextInitializedTicks uint64 `protobuf:"varint,3,opt,name=num_next_initialized_ticks,json=numNextInitializedTicks,proto3" json:"num_next_initialized_ticks,omitempty" yaml:"num_next_initialized_ticks"` +} + +func (m *NumNextInitializedTicksRequest) Reset() { *m = NumNextInitializedTicksRequest{} } +func (m *NumNextInitializedTicksRequest) String() string { return proto.CompactTextString(m) } +func (*NumNextInitializedTicksRequest) ProtoMessage() {} +func (*NumNextInitializedTicksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c83e18b11fd607d, []int{30} +} +func (m *NumNextInitializedTicksRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NumNextInitializedTicksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NumNextInitializedTicksRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NumNextInitializedTicksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NumNextInitializedTicksRequest.Merge(m, src) +} +func (m *NumNextInitializedTicksRequest) XXX_Size() int { + return m.Size() +} +func (m *NumNextInitializedTicksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NumNextInitializedTicksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NumNextInitializedTicksRequest proto.InternalMessageInfo + +func (m *NumNextInitializedTicksRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *NumNextInitializedTicksRequest) GetTokenInDenom() string { + if m != nil { + return m.TokenInDenom + } + return "" +} + +func (m *NumNextInitializedTicksRequest) GetNumNextInitializedTicks() uint64 { + if m != nil { + return m.NumNextInitializedTicks + } + return 0 +} + +type NumNextInitializedTicksResponse struct { + LiquidityDepths []TickLiquidityNet `protobuf:"bytes,1,rep,name=liquidity_depths,json=liquidityDepths,proto3" json:"liquidity_depths"` + CurrentTick int64 `protobuf:"varint,2,opt,name=current_tick,json=currentTick,proto3" json:"current_tick,omitempty"` + CurrentLiquidity github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=current_liquidity,json=currentLiquidity,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"current_liquidity" yaml:"current_liquidity"` +} + +func (m *NumNextInitializedTicksResponse) Reset() { *m = NumNextInitializedTicksResponse{} } +func (m *NumNextInitializedTicksResponse) String() string { return proto.CompactTextString(m) } +func (*NumNextInitializedTicksResponse) ProtoMessage() {} +func (*NumNextInitializedTicksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c83e18b11fd607d, []int{31} +} +func (m *NumNextInitializedTicksResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NumNextInitializedTicksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NumNextInitializedTicksResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NumNextInitializedTicksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NumNextInitializedTicksResponse.Merge(m, src) +} +func (m *NumNextInitializedTicksResponse) XXX_Size() int { + return m.Size() +} +func (m *NumNextInitializedTicksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NumNextInitializedTicksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_NumNextInitializedTicksResponse proto.InternalMessageInfo + +func (m *NumNextInitializedTicksResponse) GetLiquidityDepths() []TickLiquidityNet { + if m != nil { + return m.LiquidityDepths + } + return nil +} + +func (m *NumNextInitializedTicksResponse) GetCurrentTick() int64 { + if m != nil { + return m.CurrentTick + } + return 0 +} + func init() { proto.RegisterType((*UserPositionsRequest)(nil), "osmosis.concentratedliquidity.v1beta1.UserPositionsRequest") proto.RegisterType((*UserPositionsResponse)(nil), "osmosis.concentratedliquidity.v1beta1.UserPositionsResponse") @@ -1536,6 +1650,8 @@ func init() { proto.RegisterType((*UserUnbondingPositionsResponse)(nil), "osmosis.concentratedliquidity.v1beta1.UserUnbondingPositionsResponse") proto.RegisterType((*GetTotalLiquidityRequest)(nil), "osmosis.concentratedliquidity.v1beta1.GetTotalLiquidityRequest") proto.RegisterType((*GetTotalLiquidityResponse)(nil), "osmosis.concentratedliquidity.v1beta1.GetTotalLiquidityResponse") + proto.RegisterType((*NumNextInitializedTicksRequest)(nil), "osmosis.concentratedliquidity.v1beta1.NumNextInitializedTicksRequest") + proto.RegisterType((*NumNextInitializedTicksResponse)(nil), "osmosis.concentratedliquidity.v1beta1.NumNextInitializedTicksResponse") } func init() { @@ -1543,141 +1659,148 @@ func init() { } var fileDescriptor_5c83e18b11fd607d = []byte{ - // 2133 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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0x88, 0x32, 0xe4, 0xff, 0xaa, 0x1a, 0x78, 0x11, 0xa0, 0x9d, - 0x82, 0xdc, 0xf1, 0xab, 0x68, 0xea, 0xcc, 0xcd, 0x97, 0x4b, 0x32, 0x7a, 0x7e, 0xbe, 0x4a, 0x41, - 0x05, 0xca, 0x7c, 0x95, 0x56, 0xb4, 0x3a, 0x95, 0x6e, 0x29, 0x31, 0x49, 0xf2, 0x47, 0x04, 0x17, - 0xba, 0x7c, 0x77, 0x5b, 0xcc, 0x76, 0x29, 0xfe, 0x1e, 0x64, 0xc3, 0xf0, 0xf8, 0xee, 0x1f, 0x9f, - 0x3a, 0x73, 0xf3, 0x7e, 0x29, 0x55, 0x25, 0x97, 0x16, 0x3d, 0xcb, 0x0a, 0x15, 0x56, 0x1c, 0xaa, - 0x35, 0x0c, 0xb6, 0x65, 0x57, 0x4e, 0x3c, 0xdb, 0x29, 0x1e, 0x53, 0xda, 0x4a, 0xf1, 0x52, 0x07, - 0x86, 0x8c, 0xc0, 0xf0, 0xca, 0x81, 0x18, 0x02, 0xf7, 0x3a, 0x40, 0x3c, 0x82, 0xb1, 0xc8, 0xdc, - 0x76, 0xd5, 0x08, 0xc3, 0x7f, 0x07, 0xce, 0x84, 0xc6, 0xfc, 0xa0, 0x22, 0x11, 0xd4, 0x89, 0xdd, - 0x9d, 0x22, 0x0e, 0x83, 0x1a, 0x11, 0x89, 0x02, 0xe1, 0xaa, 0x6a, 0x90, 0x4d, 0x18, 0xef, 0xd4, - 0x27, 0x43, 0xf2, 0x5d, 0x38, 0x1d, 0x72, 0x09, 0x6d, 0x47, 0x13, 0x91, 0x48, 0x27, 0xf9, 0x26, - 0x0c, 0xaf, 0x30, 0x66, 0x45, 0xf5, 0xb3, 0x98, 0x10, 0xa0, 0x41, 0x92, 0xfc, 0x63, 0x04, 0x67, - 0xa5, 0x62, 0x89, 0x64, 0x06, 0x4e, 0xfa, 0x85, 0x14, 0x26, 0x76, 0xbc, 0x14, 0x6c, 0xa4, 0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 0xc8, 0x63, 0x11, 0x92, 0xb7, - 0x70, 0x35, 0x65, 0x48, 0x3c, 0x97, 0x3a, 0xaa, 0x17, 0xea, 0x53, 0x93, 0xee, 0x5a, 0x9f, 0x20, - 0x38, 0xbf, 0x67, 0x68, 0xc0, 0x69, 0xf7, 0x6f, 0xaf, 0x59, 0x24, 0xff, 0xc6, 0xe0, 0x0a, 0x06, - 0xdc, 0x14, 0x75, 0xca, 0xd5, 0xae, 0x01, 0xa7, 0xb2, 0xfe, 0xec, 0x79, 0x01, 0x7d, 0xfc, 0xbc, - 0x80, 0xfe, 0xfe, 0xbc, 0x80, 0x3e, 0x7c, 0x51, 0x38, 0xf6, 0xf1, 0x8b, 0xc2, 0xb1, 0xbf, 0xbd, - 0x28, 0x1c, 0xfb, 0xce, 0xa3, 0xd8, 0x44, 0x23, 0xf5, 0x4f, 0x5b, 0x5a, 0xcd, 0x8d, 0x8c, 0x6d, - 0xde, 0x98, 0x2d, 0xbf, 0xdb, 0xeb, 0x8f, 0xed, 0xba, 0x65, 0x52, 0x9b, 0x07, 0xff, 0xed, 0x20, - 0xf8, 0xb3, 0xe4, 0x90, 0xf8, 0xe7, 0xd6, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x29, 0xb3, 0x3e, - 0x11, 0x7c, 0x21, 0x00, 0x00, + // 2254 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0x4d, 0x6c, 0x1c, 0x49, + 0x15, 0x4e, 0x4f, 0x7e, 0xe7, 0xc5, 0x89, 0x9d, 0xb2, 0x63, 0x3b, 0x93, 0x64, 0x26, 0x5b, 0x90, + 0x5d, 0x6b, 0x13, 0xcf, 0x90, 0x1f, 0x13, 0x9c, 0x9f, 0xcd, 0x7a, 0xec, 0xb5, 0x35, 0xac, 0xe3, + 0x75, 0x7a, 0x63, 0x40, 0x1c, 0x68, 0x7a, 0xba, 0xcb, 0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00, 0x00, 0xff, 0xff, 0x09, 0xd7, 0xa0, 0x11, 0x91, 0x24, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1729,6 +1852,9 @@ type QueryClient interface { UserUnbondingPositions(ctx context.Context, in *UserUnbondingPositionsRequest, opts ...grpc.CallOption) (*UserUnbondingPositionsResponse, error) // GetTotalLiquidity returns total liquidity across all cl pools. GetTotalLiquidity(ctx context.Context, in *GetTotalLiquidityRequest, opts ...grpc.CallOption) (*GetTotalLiquidityResponse, error) + // NumNextInitializedTicks returns the provided number of next initialized + // ticks in the direction of swapping the token in denom. + NumNextInitializedTicks(ctx context.Context, in *NumNextInitializedTicksRequest, opts ...grpc.CallOption) (*NumNextInitializedTicksResponse, error) } type queryClient struct { @@ -1865,6 +1991,15 @@ func (c *queryClient) GetTotalLiquidity(ctx context.Context, in *GetTotalLiquidi return out, nil } +func (c *queryClient) NumNextInitializedTicks(ctx context.Context, in *NumNextInitializedTicksRequest, opts ...grpc.CallOption) (*NumNextInitializedTicksResponse, error) { + out := new(NumNextInitializedTicksResponse) + err := c.cc.Invoke(ctx, "/osmosis.concentratedliquidity.v1beta1.Query/NumNextInitializedTicks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Pools returns all concentrated liquidity pools @@ -1904,6 +2039,9 @@ type QueryServer interface { UserUnbondingPositions(context.Context, *UserUnbondingPositionsRequest) (*UserUnbondingPositionsResponse, error) // GetTotalLiquidity returns total liquidity across all cl pools. GetTotalLiquidity(context.Context, *GetTotalLiquidityRequest) (*GetTotalLiquidityResponse, error) + // NumNextInitializedTicks returns the provided number of next initialized + // ticks in the direction of swapping the token in denom. + NumNextInitializedTicks(context.Context, *NumNextInitializedTicksRequest) (*NumNextInitializedTicksResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1952,6 +2090,9 @@ func (*UnimplementedQueryServer) UserUnbondingPositions(ctx context.Context, req func (*UnimplementedQueryServer) GetTotalLiquidity(ctx context.Context, req *GetTotalLiquidityRequest) (*GetTotalLiquidityResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTotalLiquidity not implemented") } +func (*UnimplementedQueryServer) NumNextInitializedTicks(ctx context.Context, req *NumNextInitializedTicksRequest) (*NumNextInitializedTicksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NumNextInitializedTicks not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2209,6 +2350,24 @@ func _Query_GetTotalLiquidity_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_NumNextInitializedTicks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NumNextInitializedTicksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NumNextInitializedTicks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.concentratedliquidity.v1beta1.Query/NumNextInitializedTicks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NumNextInitializedTicks(ctx, req.(*NumNextInitializedTicksRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.concentratedliquidity.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -2269,6 +2428,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GetTotalLiquidity", Handler: _Query_GetTotalLiquidity_Handler, }, + { + MethodName: "NumNextInitializedTicks", + Handler: _Query_NumNextInitializedTicks_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/concentrated-liquidity/query.proto", @@ -3413,6 +3576,98 @@ func (m *GetTotalLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *NumNextInitializedTicksRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NumNextInitializedTicksRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NumNextInitializedTicksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumNextInitializedTicks != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.NumNextInitializedTicks)) + i-- + dAtA[i] = 0x18 + } + if len(m.TokenInDenom) > 0 { + i -= len(m.TokenInDenom) + copy(dAtA[i:], m.TokenInDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenInDenom))) + i-- + dAtA[i] = 0x12 + } + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *NumNextInitializedTicksResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NumNextInitializedTicksResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NumNextInitializedTicksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CurrentLiquidity.Size() + i -= size + if _, err := m.CurrentLiquidity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.CurrentTick != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.CurrentTick)) + i-- + dAtA[i] = 0x10 + } + if len(m.LiquidityDepths) > 0 { + for iNdEx := len(m.LiquidityDepths) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LiquidityDepths[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3884,6 +4139,45 @@ func (m *GetTotalLiquidityResponse) Size() (n int) { return n } +func (m *NumNextInitializedTicksRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + l = len(m.TokenInDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.NumNextInitializedTicks != 0 { + n += 1 + sovQuery(uint64(m.NumNextInitializedTicks)) + } + return n +} + +func (m *NumNextInitializedTicksResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LiquidityDepths) > 0 { + for _, e := range m.LiquidityDepths { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.CurrentTick != 0 { + n += 1 + sovQuery(uint64(m.CurrentTick)) + } + l = m.CurrentLiquidity.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -6728,6 +7022,263 @@ func (m *GetTotalLiquidityResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *NumNextInitializedTicksRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NumNextInitializedTicksRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NumNextInitializedTicksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenInDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenInDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumNextInitializedTicks", wireType) + } + m.NumNextInitializedTicks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumNextInitializedTicks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NumNextInitializedTicksResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NumNextInitializedTicksResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NumNextInitializedTicksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LiquidityDepths", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LiquidityDepths = append(m.LiquidityDepths, TickLiquidityNet{}) + if err := m.LiquidityDepths[len(m.LiquidityDepths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentTick", wireType) + } + m.CurrentTick = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentTick |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentLiquidity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentLiquidity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/concentrated-liquidity/client/queryproto/query.pb.gw.go b/x/concentrated-liquidity/client/queryproto/query.pb.gw.go index 7cc5d994ad9..312473b1cd0 100644 --- a/x/concentrated-liquidity/client/queryproto/query.pb.gw.go +++ b/x/concentrated-liquidity/client/queryproto/query.pb.gw.go @@ -573,6 +573,42 @@ func local_request_Query_GetTotalLiquidity_0(ctx context.Context, marshaler runt } +var ( + filter_Query_NumNextInitializedTicks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_NumNextInitializedTicks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq NumNextInitializedTicksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_NumNextInitializedTicks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.NumNextInitializedTicks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NumNextInitializedTicks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq NumNextInitializedTicksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_NumNextInitializedTicks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.NumNextInitializedTicks(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -901,6 +937,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_NumNextInitializedTicks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_NumNextInitializedTicks_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NumNextInitializedTicks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1222,6 +1281,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_NumNextInitializedTicks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_NumNextInitializedTicks_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NumNextInitializedTicks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1253,6 +1332,8 @@ var ( pattern_Query_UserUnbondingPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "concentratedliquidity", "v1beta1", "user_unbonding_positions", "address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetTotalLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "concentratedliquidity", "v1beta1", "get_total_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_NumNextInitializedTicks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "concentratedliquidity", "v1beta1", "num_next_initialized_ticks"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1283,4 +1364,6 @@ var ( forward_Query_UserUnbondingPositions_0 = runtime.ForwardResponseMessage forward_Query_GetTotalLiquidity_0 = runtime.ForwardResponseMessage + + forward_Query_NumNextInitializedTicks_0 = runtime.ForwardResponseMessage ) diff --git a/x/concentrated-liquidity/query.go b/x/concentrated-liquidity/query.go index 7d5b21684cc..b1fe66320a6 100644 --- a/x/concentrated-liquidity/query.go +++ b/x/concentrated-liquidity/query.go @@ -244,3 +244,95 @@ func (k Keeper) getTickByTickIndex(ctx sdk.Context, poolId uint64, tickIndex int } return tickStruct, nil } + +// GetNumNextInitializedTicks is a method that returns an array of TickLiquidityNet objects representing the net liquidity in the direction of swapping the given token in +// for a given pool. The number of ticks returned is determined by the numberOfNextInitializedTicks parameter. +func (k Keeper) GetNumNextInitializedTicks(ctx sdk.Context, poolId, numberOfNextInitializedTicks uint64, tokenInDenom string) ([]queryproto.TickLiquidityNet, error) { + p, err := k.getPoolById(ctx, poolId) + if err != nil { + return []queryproto.TickLiquidityNet{}, err + } + + startTick := p.GetCurrentTick() + + // sanity check that given tokenIn is an asset in pool. + if tokenInDenom != p.GetToken0() && tokenInDenom != p.GetToken1() { + return []queryproto.TickLiquidityNet{}, types.TokenInDenomNotInPoolError{TokenInDenom: tokenInDenom} + } + + // figure out zero for one depending on the token in. + zeroForOne := p.GetToken0() == tokenInDenom + + ctx.Logger().Debug(fmt.Sprintf("is_zero_for_one %t\n", zeroForOne)) + + // the boundTick will always be the min and max tick depending on the swap direction. + // we can narrow this down later to some max number of ticks to iterate through. + ctx.Logger().Debug(fmt.Sprintf("min_tick %d\n", types.MinInitializedTick)) + ctx.Logger().Debug(fmt.Sprintf("max_tick %d\n", types.MaxTick)) + + var boundTick sdk.Int + if boundTick.IsNil() { + if zeroForOne { + boundTick = sdk.NewInt(types.MinInitializedTick) + } else { + boundTick = sdk.NewInt(types.MaxTick) + } + } + + currentTickSqrtPrice, err := math.TickToSqrtPrice(startTick) + if err != nil { + return []queryproto.TickLiquidityNet{}, err + } + + ctx.Logger().Debug(fmt.Sprintf("currentTick %d; current tick's sqrt price%s\n", startTick, currentTickSqrtPrice)) + + // iterator assignments + store := ctx.KVStore(k.storeKey) + prefixBz := types.KeyTickPrefixByPoolId(poolId) + prefixStore := prefix.NewStore(store, prefixBz) + + // If zero for one, we use reverse iterator. As a result, we need to increment the start tick by 1 + // so that we include the start tick in the search. + // + // If one for zero, we use forward iterator. However, our definition of the active range is inclusive + // of the lower bound. As a result, current liquidity must already include the lower bound tick + // so we skip it. + startTick = startTick + 1 + + startTickKey := types.TickIndexToBytes(startTick) + boundTickKey := types.TickIndexToBytes(boundTick.Int64()) + + // define iterator depending on swap strategy + var iterator db.Iterator + if zeroForOne { + iterator = prefixStore.ReverseIterator(boundTickKey, startTickKey) + } else { + iterator = prefixStore.Iterator(startTickKey, storetypes.InclusiveEndBytes(boundTickKey)) + } + + liquidityDepths := []queryproto.TickLiquidityNet{} + + iterationCount := uint64(0) + + defer iterator.Close() + for ; iterator.Valid() && iterationCount < numberOfNextInitializedTicks; iterator.Next() { + tickIndex, err := types.TickIndexFromBytes(iterator.Key()) + if err != nil { + return []queryproto.TickLiquidityNet{}, err + } + + tickStruct, err := ParseTickFromBz(iterator.Value()) + if err != nil { + return []queryproto.TickLiquidityNet{}, err + } + + liquidityDepth := queryproto.TickLiquidityNet{ + LiquidityNet: tickStruct.LiquidityNet, + TickIndex: tickIndex, + } + liquidityDepths = append(liquidityDepths, liquidityDepth) + iterationCount++ + } + + return liquidityDepths, nil +} diff --git a/x/concentrated-liquidity/query_test.go b/x/concentrated-liquidity/query_test.go index 9ec2d34d504..4283f4b075a 100644 --- a/x/concentrated-liquidity/query_test.go +++ b/x/concentrated-liquidity/query_test.go @@ -592,3 +592,284 @@ func (s *KeeperTestSuite) TestGetTickLiquidityNetInDirection() { }) } } + +func (s *KeeperTestSuite) TestGetNumNextInitializedTicks() { + defaultTick := withPoolId(defaultTick, defaultPoolId) + + tests := []struct { + name string + presetTicks []genesis.FullTick + + // testing params + poolId uint64 + tokenInDenom string + currentPoolTick int64 + numberOfNextInitializedTicks uint64 + + // expected values + expectedLiquidityDepths []queryproto.TickLiquidityNet + expectedError bool + }{ + { + name: "one full range position, zero for one true", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + }, + + poolId: defaultPoolId, + tokenInDenom: ETH, + numberOfNextInitializedTicks: 1, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(10), + TickIndex: DefaultMinTick, + }, + }, + }, + { + name: "one full range position, zero for one false", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + }, + + poolId: defaultPoolId, + tokenInDenom: USDC, + numberOfNextInitializedTicks: 1, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(-10), + TickIndex: DefaultMaxTick, + }, + }, + }, + { + name: "one full range position, one range position above current tick, zero for one true", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, 5, sdk.NewDec(20)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(-20)), + }, + + poolId: defaultPoolId, + tokenInDenom: ETH, + numberOfNextInitializedTicks: 1, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(10), + TickIndex: DefaultMinTick, + }, + }, + }, + { + name: "one full range position, one range position above current tick, zero for one false", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, 5, sdk.NewDec(20)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(-20)), + }, + + poolId: defaultPoolId, + tokenInDenom: USDC, + numberOfNextInitializedTicks: 3, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(20), + TickIndex: 5, + }, + { + LiquidityNet: sdk.NewDec(-20), + TickIndex: 10, + }, + { + LiquidityNet: sdk.NewDec(-10), + TickIndex: DefaultMaxTick, + }, + }, + }, + { + name: "one full range position, one range position above current tick, zero for one false, bound num ticks below with non-empty ticks", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, -10, sdk.NewDec(20)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(-20)), + }, + + poolId: defaultPoolId, + tokenInDenom: ETH, + numberOfNextInitializedTicks: 1, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(20), + TickIndex: -10, + }, + }, + }, + { + name: "one ranged position, returned empty array", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, -10, sdk.NewDec(20)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(-20)), + }, + + poolId: defaultPoolId, + tokenInDenom: ETH, + numberOfNextInitializedTicks: 0, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{}, + }, + { + name: "one full range position, one range position above current tick, zero for one false, bound num ticks below with non-empty ticks", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, -10, sdk.NewDec(20)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(-20)), + }, + + poolId: defaultPoolId, + tokenInDenom: USDC, + numberOfNextInitializedTicks: 1, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(-20), + TickIndex: 10, + }, + }, + }, + { + name: "one full range position, two ranged positions, zero for one true", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, -5, sdk.NewDec(20)), + withLiquidityNetandTickIndex(defaultTick, 5, sdk.NewDec(-20)), + withLiquidityNetandTickIndex(defaultTick, 2, sdk.NewDec(40)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(-40)), + }, + + poolId: defaultPoolId, + tokenInDenom: ETH, + numberOfNextInitializedTicks: 2, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(20), + TickIndex: -5, + }, + { + LiquidityNet: sdk.NewDec(10), + TickIndex: DefaultMinTick, + }, + }, + }, + { + name: "one full range position, two ranged positions, zero for one false", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + withLiquidityNetandTickIndex(defaultTick, -5, sdk.NewDec(20)), + withLiquidityNetandTickIndex(defaultTick, 5, sdk.NewDec(-20)), + withLiquidityNetandTickIndex(defaultTick, 2, sdk.NewDec(40)), + withLiquidityNetandTickIndex(defaultTick, 10, sdk.NewDec(-40)), + }, + + poolId: defaultPoolId, + tokenInDenom: USDC, + numberOfNextInitializedTicks: 4, + expectedLiquidityDepths: []queryproto.TickLiquidityNet{ + { + LiquidityNet: sdk.NewDec(40), + TickIndex: 2, + }, + { + LiquidityNet: sdk.NewDec(-20), + TickIndex: 5, + }, + { + LiquidityNet: sdk.NewDec(-40), + TickIndex: 10, + }, + { + LiquidityNet: sdk.NewDec(-10), + TickIndex: DefaultMaxTick, + }, + }, + }, + + // error cases + { + name: "error: invalid pool id", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + }, + + poolId: 5, + tokenInDenom: "invalid_token", + numberOfNextInitializedTicks: 1, + expectedError: true, + }, + { + name: "error: invalid token in", + presetTicks: []genesis.FullTick{ + withLiquidityNetandTickIndex(defaultTick, DefaultMinTick, sdk.NewDec(10)), + withLiquidityNetandTickIndex(defaultTick, DefaultMaxTick, sdk.NewDec(-10)), + }, + + poolId: defaultPoolId, + tokenInDenom: "invalid_token", + numberOfNextInitializedTicks: 1, + expectedError: true, + }, + } + + for _, test := range tests { + test := test + if test.poolId == 0 { + test.poolId = defaultPoolId + } + s.Run(test.name, func() { + // Init suite for each test. + s.SetupTest() + + // Create a default CL pool + pool := s.PrepareConcentratedPool() + for _, tick := range test.presetTicks { + s.App.ConcentratedLiquidityKeeper.SetTickInfo(s.Ctx, tick.PoolId, tick.TickIndex, &tick.Info) + } + + // Force initialize current sqrt price to 1. + // Normally, initialized during position creation. + // We only initialize ticks in this test for simplicity. + curPrice := sdk.OneDec() + curTick, err := math.CalculateSqrtPriceToTick(osmomath.BigDecFromSDKDec(osmomath.MustMonotonicSqrt(curPrice))) + s.Require().NoError(err) + var curSqrtPrice osmomath.BigDec = osmomath.OneDec() + if test.currentPoolTick > 0 { + sqrtPrice, err := math.TickToSqrtPrice(test.currentPoolTick) + s.Require().NoError(err) + + curTick = test.currentPoolTick + curSqrtPrice = sqrtPrice + } + pool.SetCurrentSqrtPrice(curSqrtPrice) + pool.SetCurrentTick(curTick) + + err = s.App.ConcentratedLiquidityKeeper.SetPool(s.Ctx, pool) + s.Require().NoError(err) + + // system under test + liquidityForRange, err := s.App.ConcentratedLiquidityKeeper.GetNumNextInitializedTicks(s.Ctx, test.poolId, test.numberOfNextInitializedTicks, test.tokenInDenom) + if test.expectedError { + s.Require().Error(err) + return + } + + s.Require().NoError(err) + s.Require().Equal(test.expectedLiquidityDepths, liquidityForRange) + }) + } +} diff --git a/x/concentrated-liquidity/types/errors.go b/x/concentrated-liquidity/types/errors.go index f2a02f429ca..451a96c04f3 100644 --- a/x/concentrated-liquidity/types/errors.go +++ b/x/concentrated-liquidity/types/errors.go @@ -887,3 +887,12 @@ type ComputedSqrtPriceInequalityError struct { func (e ComputedSqrtPriceInequalityError) Error() string { return fmt.Sprintf("edge case has occurred when swapping at tick boundaries, with izZeroForOne (%t), NextInitializedTickSqrtPrice (%s), computedSqrtPrice (%s). Please try again with a different swap amount", e.IsZeroForOne, e.NextInitializedTickSqrtPrice, e.ComputedSqrtPrice) } + +type NumberOfTicksExceedsMaxError struct { + NumberOfTicks uint64 + MaxNumberOfTicks uint64 +} + +func (e NumberOfTicksExceedsMaxError) Error() string { + return fmt.Sprintf("number of ticks exceeds max ticks. Provided number of ticks (%d), max ticks (%d)", e.NumberOfTicks, e.MaxNumberOfTicks) +}