From 076270e0a0bf57949d9772965025877863a0c65a Mon Sep 17 00:00:00 2001 From: affan Date: Tue, 26 Mar 2024 13:49:34 -0400 Subject: [PATCH 1/3] Update LiquidityTierUpsertEvent to add OI caps --- .../dydxprotocol/indexer/events/events.ts | 34 +- .../dydxprotocol/indexer/events/events.proto | 6 + protocol/indexer/events/events.pb.go | 343 +++++++++++------- protocol/indexer/events/liquidity_tier.go | 4 + .../indexer/events/liquidity_tier_test.go | 4 + protocol/x/perpetuals/keeper/perpetual.go | 2 + 6 files changed, 258 insertions(+), 135 deletions(-) diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts index 1f8d38d1fd..bf9891706c 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts @@ -957,6 +957,12 @@ export interface LiquidityTierUpsertEventV1 { /** @deprecated */ basePositionNotional: Long; + /** Lower cap of open interest in quote quantums. */ + + openInterestLowerCap: Long; + /** Upper cap of open interest in quote quantums. */ + + openInterestUpperCap: Long; } /** * LiquidityTierUpsertEventV1 message contains all the information to @@ -992,6 +998,12 @@ export interface LiquidityTierUpsertEventV1SDKType { /** @deprecated */ base_position_notional: Long; + /** Lower cap of open interest in quote quantums. */ + + open_interest_lower_cap: Long; + /** Upper cap of open interest in quote quantums. */ + + open_interest_upper_cap: Long; } /** * UpdateClobPairEventV1 message contains all the information about an update to @@ -2675,7 +2687,9 @@ function createBaseLiquidityTierUpsertEventV1(): LiquidityTierUpsertEventV1 { name: "", initialMarginPpm: 0, maintenanceFractionPpm: 0, - basePositionNotional: Long.UZERO + basePositionNotional: Long.UZERO, + openInterestLowerCap: Long.UZERO, + openInterestUpperCap: Long.UZERO }; } @@ -2701,6 +2715,14 @@ export const LiquidityTierUpsertEventV1 = { writer.uint32(40).uint64(message.basePositionNotional); } + if (!message.openInterestLowerCap.isZero()) { + writer.uint32(48).uint64(message.openInterestLowerCap); + } + + if (!message.openInterestUpperCap.isZero()) { + writer.uint32(56).uint64(message.openInterestUpperCap); + } + return writer; }, @@ -2733,6 +2755,14 @@ export const LiquidityTierUpsertEventV1 = { message.basePositionNotional = (reader.uint64() as Long); break; + case 6: + message.openInterestLowerCap = (reader.uint64() as Long); + break; + + case 7: + message.openInterestUpperCap = (reader.uint64() as Long); + break; + default: reader.skipType(tag & 7); break; @@ -2749,6 +2779,8 @@ export const LiquidityTierUpsertEventV1 = { message.initialMarginPpm = object.initialMarginPpm ?? 0; message.maintenanceFractionPpm = object.maintenanceFractionPpm ?? 0; message.basePositionNotional = object.basePositionNotional !== undefined && object.basePositionNotional !== null ? Long.fromValue(object.basePositionNotional) : Long.UZERO; + message.openInterestLowerCap = object.openInterestLowerCap !== undefined && object.openInterestLowerCap !== null ? Long.fromValue(object.openInterestLowerCap) : Long.UZERO; + message.openInterestUpperCap = object.openInterestUpperCap !== undefined && object.openInterestUpperCap !== null ? Long.fromValue(object.openInterestUpperCap) : Long.UZERO; return message; } diff --git a/proto/dydxprotocol/indexer/events/events.proto b/proto/dydxprotocol/indexer/events/events.proto index affeaefea8..68346e5b6c 100644 --- a/proto/dydxprotocol/indexer/events/events.proto +++ b/proto/dydxprotocol/indexer/events/events.proto @@ -381,6 +381,12 @@ message LiquidityTierUpsertEventV1 { // // Deprecated since v3.x. uint64 base_position_notional = 5 [ deprecated = true ]; + + // Lower cap of open interest in quote quantums. + uint64 open_interest_lower_cap = 6; + + // Upper cap of open interest in quote quantums. + uint64 open_interest_upper_cap = 7; } // UpdateClobPairEventV1 message contains all the information about an update to diff --git a/protocol/indexer/events/events.pb.go b/protocol/indexer/events/events.pb.go index 40208d144e..b39168347e 100644 --- a/protocol/indexer/events/events.pb.go +++ b/protocol/indexer/events/events.pb.go @@ -1763,6 +1763,10 @@ type LiquidityTierUpsertEventV1 struct { // // Deprecated since v3.x. BasePositionNotional uint64 `protobuf:"varint,5,opt,name=base_position_notional,json=basePositionNotional,proto3" json:"base_position_notional,omitempty"` // Deprecated: Do not use. + // Lower cap of open interest in quote quantums. + OpenInterestLowerCap uint64 `protobuf:"varint,6,opt,name=open_interest_lower_cap,json=openInterestLowerCap,proto3" json:"open_interest_lower_cap,omitempty"` + // Upper cap of open interest in quote quantums. + OpenInterestUpperCap uint64 `protobuf:"varint,7,opt,name=open_interest_upper_cap,json=openInterestUpperCap,proto3" json:"open_interest_upper_cap,omitempty"` } func (m *LiquidityTierUpsertEventV1) Reset() { *m = LiquidityTierUpsertEventV1{} } @@ -1834,6 +1838,20 @@ func (m *LiquidityTierUpsertEventV1) GetBasePositionNotional() uint64 { return 0 } +func (m *LiquidityTierUpsertEventV1) GetOpenInterestLowerCap() uint64 { + if m != nil { + return m.OpenInterestLowerCap + } + return 0 +} + +func (m *LiquidityTierUpsertEventV1) GetOpenInterestUpperCap() uint64 { + if m != nil { + return m.OpenInterestUpperCap + } + return 0 +} + // UpdateClobPairEventV1 message contains all the information about an update to // a clob pair on the dYdX chain. type UpdateClobPairEventV1 struct { @@ -2148,140 +2166,143 @@ func init() { } var fileDescriptor_6331dfb59c6fd2bb = []byte{ - // 2122 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcb, 0x6f, 0x1b, 0xc9, - 0xd1, 0x17, 0xc9, 0x11, 0x25, 0x15, 0x45, 0x99, 0x6c, 0x4b, 0x32, 0x25, 0x7d, 0x9f, 0xec, 0x0c, - 0x10, 0xc0, 0xf0, 0xee, 0x52, 0x96, 0xb3, 0x09, 0x16, 0x39, 0x04, 0x11, 0xf5, 0x58, 0xd1, 0xb0, - 0x64, 0xee, 0x88, 0xf2, 0xee, 0x3a, 0xc1, 0x4e, 0x5a, 0x33, 0x4d, 0xaa, 0xa1, 0x79, 0x79, 0xba, - 0x29, 0x5b, 0x06, 0x72, 0x4e, 0x0e, 0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a, 0x69, 0xfe, 0x31, 0x07, 0x37, 0x9a, 0x31, 0x0e, 0x58, 0x8b, 0xc4, 0x89, 0x1f, 0xda, 0xb0, - 0xc8, 0x48, 0xe0, 0x92, 0xd8, 0xbe, 0x3e, 0xc3, 0x2d, 0xa4, 0x20, 0x7b, 0x69, 0xc8, 0x87, 0x5b, - 0x31, 0x71, 0x68, 0x44, 0x49, 0xc0, 0x2f, 0xe9, 0xca, 0x5e, 0x45, 0xd7, 0x52, 0x8a, 0xda, 0xa7, - 0x6e, 0x05, 0x66, 0x31, 0x63, 0xea, 0x18, 0xc9, 0xc9, 0x94, 0x9c, 0x91, 0xe3, 0xba, 0x8b, 0x96, - 0x21, 0x8f, 0x7d, 0x31, 0x4d, 0xee, 0x44, 0xc3, 0xd2, 0x23, 0x54, 0x83, 0xbc, 0xb2, 0xbb, 0x32, - 0x2d, 0x0d, 0xba, 0x37, 0x36, 0x29, 0xfa, 0x02, 0x6f, 0x69, 0x49, 0xb4, 0x0f, 0x73, 0xa9, 0x3d, - 0x95, 0xfc, 0x5b, 0xc3, 0x74, 0x85, 0xcd, 0x7f, 0xe6, 0xa0, 0xf4, 0x38, 0x76, 0x49, 0xbc, 0x47, - 0x3d, 0x2f, 0x89, 0xd6, 0x31, 0x14, 0x7c, 0x7c, 0x46, 0x62, 0x3b, 0x14, 0x9c, 0xf1, 0xc9, 0x3b, - 0xc4, 0x71, 0x12, 0x4f, 0x17, 0x0e, 0x90, 0x40, 0x92, 0x82, 0xf6, 0x60, 0x5a, 0x01, 0x66, 0xdf, - 0x05, 0x70, 0x7f, 0xca, 0x52, 0xe2, 0xe8, 0x0b, 0x28, 0x7b, 0xf4, 0x59, 0x87, 0xba, 0x98, 0xd3, - 0x30, 0xd0, 0x46, 0xaa, 0xe3, 0x6e, 0x63, 0xac, 0x17, 0x1e, 0x75, 0xa5, 0x24, 0xa4, 0x3c, 0xed, - 0x4a, 0xde, 0x25, 0x2a, 0xba, 0x0d, 0x85, 0x16, 0xf5, 0x3c, 0x5b, 0x87, 0x2f, 0x27, 0xc3, 0x07, - 0x82, 0xb4, 0xa5, 0x42, 0x28, 0xab, 0x87, 0xf0, 0x4f, 0x8b, 0x10, 0x19, 0x45, 0x24, 0xaa, 0xc7, - 0x19, 0x89, 0xf7, 0x08, 0x11, 0x4c, 0x9e, 0x32, 0xf3, 0x8a, 0xc9, 0x13, 0xe6, 0xfb, 0x80, 0x78, - 0xc8, 0xb1, 0x67, 0x0b, 0x34, 0xe2, 0xda, 0x52, 0xaa, 0x32, 0x23, 0x35, 0x94, 0x24, 0x67, 0x4f, - 0x32, 0x0e, 0x04, 0x7d, 0x60, 0xb6, 0x84, 0xa9, 0xcc, 0x0e, 0xcc, 0x6e, 0x0a, 0x7a, 0xad, 0x08, - 0x05, 0xde, 0x8d, 0x9a, 0xf9, 0x8b, 0x1c, 0xdc, 0xdc, 0x21, 0x1e, 0x39, 0x27, 0x31, 0x6e, 0xf7, - 0xf4, 0x03, 0x3f, 0x02, 0x48, 0x56, 0x4c, 0xae, 0xb6, 0x01, 0x93, 0x10, 0x77, 0xe1, 0x04, 0x78, - 0xd8, 0x6a, 0x31, 0xc2, 0x39, 0x0d, 0xda, 0x57, 0xda, 0x71, 0x09, 0x78, 0x17, 0x6e, 0xa0, 0x35, - 0xcb, 0x0d, 0xb6, 0x66, 0x97, 0x42, 0x67, 0x0c, 0x84, 0xee, 0x3e, 0x2c, 0x2a, 0x97, 0x3e, 0xeb, - 0x84, 0x9c, 0xd8, 0xcf, 0x3a, 0x38, 0xe0, 0x1d, 0x9f, 0xc9, 0x28, 0x1a, 0x96, 0x72, 0xf7, 0x27, - 0x82, 0xf5, 0x89, 0xe6, 0xa0, 0x25, 0xc8, 0x53, 0x66, 0x9f, 0x74, 0x2e, 0x64, 0x30, 0x67, 0xad, - 0x69, 0xca, 0x6a, 0x9d, 0x0b, 0x51, 0xf1, 0x28, 0xb3, 0x5b, 0x34, 0xc0, 0x9e, 0x2d, 0x0c, 0xf4, - 0x88,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x6a, - 0x3d, 0xf3, 0xab, 0xd7, 0xeb, 0x53, 0x5f, 0xbd, 0x5e, 0x9f, 0xfa, 0xd7, 0xeb, 0xf5, 0xa9, 0xa7, - 0x1f, 0x4d, 0xae, 0xa8, 0xff, 0x1f, 0xa0, 0x93, 0xbc, 0x64, 0x7c, 0xe7, 0x7f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xd1, 0x69, 0xc7, 0x1d, 0x27, 0x1a, 0x00, 0x00, + // 2166 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xbd, 0x6f, 0x1b, 0xc9, + 0x15, 0x17, 0x3f, 0x44, 0x49, 0x8f, 0xa2, 0x4c, 0x8e, 0x29, 0x99, 0x92, 0x12, 0xd9, 0x59, 0x20, + 0x80, 0xe1, 0xbb, 0xa3, 0x2c, 0xe7, 0x2e, 0x38, 0xa4, 0x08, 0x22, 0xea, 0xe3, 0x44, 0x43, 0x92, + 0x79, 0x2b, 0xca, 0x77, 0xe7, 0x04, 0xb7, 0x19, 0xed, 0x0e, 0xa9, 0x81, 0xf6, 0xcb, 0x3b, 0x43, + 0xd9, 0x32, 0x90, 0x3a, 0x29, 0x02, 0x24, 0x40, 0x90, 0x22, 0x45, 0x8a, 0x14, 0x69, 0x02, 0xa4, + 0x08, 0x90, 0x36, 0x55, 0x9a, 0xeb, 0x62, 0xa4, 0x49, 0x90, 0xe2, 0x10, 0xd8, 0x45, 0xfe, 0x8d, + 0x60, 0x3e, 0x76, 0x49, 0x8a, 0x1f, 0xa6, 0x2d, 0x5d, 0x25, 0xee, 0xfb, 0xcd, 0xfb, 0xbd, 0x37, + 0xef, 0xbd, 0x99, 0x79, 0x33, 0x82, 0xbb, 0xce, 0x85, 0xf3, 0x3c, 0x8c, 0x02, 0x1e, 0xd8, 0x81, + 0xbb, 0x4e, 0x7d, 0x87, 0x3c, 0x27, 0xd1, 0x3a, 0x39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25, 0xc8, + 0x61, 0x4f, 0x0c, 0x93, 0x2b, 0x31, 0x6b, 0xea, 0x2f, 0x54, 0x83, 0x9c, 0xf2, 0xbb, 0x32, 0x2d, + 0x1d, 0xba, 0x37, 0xb6, 0x28, 0xfa, 0x12, 0x6f, 0x6a, 0x4d, 0xb4, 0x07, 0x73, 0x89, 0x3f, 0x95, + 0xdc, 0x5b, 0xd3, 0x74, 0x95, 0x8d, 0x7f, 0x65, 0xa0, 0xf8, 0x28, 0x72, 0x48, 0xb4, 0x4b, 0x5d, + 0x37, 0xce, 0xd6, 0x31, 0xe4, 0x3d, 0x7c, 0x46, 0x22, 0x2b, 0x10, 0xc8, 0xf8, 0xe2, 0x1d, 0x12, + 0x38, 0xc9, 0xa7, 0x0f, 0x0e, 0x90, 0x44, 0x52, 0x82, 0x76, 0x61, 0x5a, 0x11, 0xa6, 0xdf, 0x85, + 0x70, 0x6f, 0xca, 0x54, 0xea, 0xe8, 0x4b, 0x28, 0xb9, 0xf4, 0x69, 0x87, 0x3a, 0x98, 0xd3, 0xc0, + 0xd7, 0x4e, 0xaa, 0xed, 0x6e, 0x7d, 0x6c, 0x14, 0xf6, 0xbb, 0x5a, 0x92, 0x52, 0xee, 0x76, 0x45, + 0xf7, 0x92, 0x14, 0xdd, 0x86, 0x7c, 0x8b, 0xba, 0xae, 0xa5, 0xd3, 0x97, 0x91, 0xe9, 0x03, 0x21, + 0xda, 0x54, 0x29, 0x94, 0xa7, 0x87, 0x88, 0x4f, 0x8b, 0x10, 0x99, 0x45, 0x24, 0x4e, 0x8f, 0x33, + 0x12, 0xed, 0x12, 0x22, 0x40, 0x9e, 0x80, 0x39, 0x05, 0xf2, 0x18, 0x7c, 0x1f, 0x10, 0x0f, 0x38, + 0x76, 0x2d, 0xc1, 0x46, 0x1c, 0x4b, 0x6a, 0x55, 0x66, 0xa4, 0x85, 0xa2, 0x44, 0x76, 0x25, 0x70, + 0x20, 0xe4, 0x03, 0xa3, 0x25, 0x4d, 0x65, 0x76, 0x60, 0x74, 0x53, 0xc8, 0x6b, 0x05, 0xc8, 0xf3, + 0x6e, 0xd6, 0x8c, 0x5f, 0x66, 0xe0, 0xe6, 0x36, 0x71, 0xc9, 0x39, 0x89, 0x70, 0xbb, 0xa7, 0x1f, + 0xf8, 0x31, 0x40, 0x3c, 0x63, 0x72, 0xb5, 0x05, 0x18, 0xa7, 0xb8, 0x4b, 0x27, 0xc8, 0x83, 0x56, + 0x8b, 0x11, 0xce, 0xa9, 0xdf, 0xbe, 0xd2, 0x8a, 0x8b, 0xc9, 0xbb, 0x74, 0x03, 0xad, 0x59, 0x66, + 0xb0, 0x35, 0xbb, 0x94, 0xba, 0xec, 0x40, 0xea, 0xee, 0x43, 0x59, 0x85, 0xf4, 0x69, 0x27, 0xe0, + 0xc4, 0x7a, 0xda, 0xc1, 0x3e, 0xef, 0x78, 0x4c, 0x66, 0x31, 0x6b, 0xaa, 0x70, 0x7f, 0x2a, 0xa0, + 0x4f, 0x35, 0x82, 0x16, 0x21, 0x47, 0x99, 0x75, 0xd2, 0xb9, 0x90, 0xc9, 0x9c, 0x35, 0xa7, 0x29, + 0xab, 0x75, 0x2e, 0xc4, 0x89, 0x47, 0x99, 0xd5, 0xa2, 0x3e, 0x76, 0x2d, 0xe1, 0xa0, 0x4b, 0x3c, + 0xb1, 0x18, 0x67, 0xe4, 0x98, 0x12, 0x65, 0xbb, 0x02, 0x39, 0x4a, 0x00, 0xe3, 0x17, 0x69, 0x40, + 0x83, 0xf5, 0xf7, 0xcd, 0x66, 0xe3, 0x0e, 0xcc, 0x8b, 0x96, 0xda, 0x12, 0x27, 0x69, 0xbc, 0x03, + 0x16, 0x4c, 0x10, 0xb2, 0x06, 0xa6, 0x51, 0xdd, 0x99, 0x24, 0xa4, 0xdf, 0x06, 0x50, 0x11, 0x63, + 0xf4, 0x05, 0xd1, 0x11, 0x9d, 0x93, 0x92, 0x23, 0xfa, 0x82, 0xf4, 0x84, 0x67, 0xba, 0x37, 0x3c, + 0x2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9, 0x0d, + 0xf5, 0xff, 0xbf, 0xe9, 0x24, 0x27, 0x81, 0xef, 0xfd, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x09, 0x45, + 0x07, 0x31, 0x95, 0x1a, 0x00, 0x00, } func (m *FundingUpdateV1) Marshal() (dAtA []byte, err error) { @@ -3540,6 +3561,16 @@ func (m *LiquidityTierUpsertEventV1) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if m.OpenInterestUpperCap != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.OpenInterestUpperCap)) + i-- + dAtA[i] = 0x38 + } + if m.OpenInterestLowerCap != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.OpenInterestLowerCap)) + i-- + dAtA[i] = 0x30 + } if m.BasePositionNotional != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.BasePositionNotional)) i-- @@ -4326,6 +4357,12 @@ func (m *LiquidityTierUpsertEventV1) Size() (n int) { if m.BasePositionNotional != 0 { n += 1 + sovEvents(uint64(m.BasePositionNotional)) } + if m.OpenInterestLowerCap != 0 { + n += 1 + sovEvents(uint64(m.OpenInterestLowerCap)) + } + if m.OpenInterestUpperCap != 0 { + n += 1 + sovEvents(uint64(m.OpenInterestUpperCap)) + } return n } @@ -7570,6 +7607,44 @@ func (m *LiquidityTierUpsertEventV1) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OpenInterestLowerCap", wireType) + } + m.OpenInterestLowerCap = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OpenInterestLowerCap |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OpenInterestUpperCap", wireType) + } + m.OpenInterestUpperCap = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OpenInterestUpperCap |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/protocol/indexer/events/liquidity_tier.go b/protocol/indexer/events/liquidity_tier.go index 14b77c754f..cc3d438105 100644 --- a/protocol/indexer/events/liquidity_tier.go +++ b/protocol/indexer/events/liquidity_tier.go @@ -7,11 +7,15 @@ func NewLiquidityTierUpsertEvent( name string, initialMarginPpm uint32, maintenanceFractionPpm uint32, + openIntersetLowerCap uint64, + openInterestUpperCap uint64, ) *LiquidityTierUpsertEventV1 { return &LiquidityTierUpsertEventV1{ Id: id, Name: name, InitialMarginPpm: initialMarginPpm, MaintenanceFractionPpm: maintenanceFractionPpm, + OpenInterestLowerCap: openIntersetLowerCap, + OpenInterestUpperCap: openInterestUpperCap, } } diff --git a/protocol/indexer/events/liquidity_tier_test.go b/protocol/indexer/events/liquidity_tier_test.go index 64e1718392..fd7552c57a 100644 --- a/protocol/indexer/events/liquidity_tier_test.go +++ b/protocol/indexer/events/liquidity_tier_test.go @@ -12,12 +12,16 @@ func TestNewLiquidityTierUpsertEvent_Success(t *testing.T) { "Large-Cap", 50000, 600000, + 0, + 1000000, ) expectedLiquidityTierUpsertEventProto := &LiquidityTierUpsertEventV1{ Id: 0, Name: "Large-Cap", InitialMarginPpm: 50000, MaintenanceFractionPpm: 600000, + OpenInterestLowerCap: 0, + OpenInterestUpperCap: 1000000, } require.Equal(t, expectedLiquidityTierUpsertEventProto, liquidityTierUpsertEvent) } diff --git a/protocol/x/perpetuals/keeper/perpetual.go b/protocol/x/perpetuals/keeper/perpetual.go index 502bb74523..c95913b3b6 100644 --- a/protocol/x/perpetuals/keeper/perpetual.go +++ b/protocol/x/perpetuals/keeper/perpetual.go @@ -1539,6 +1539,8 @@ func (k Keeper) SetLiquidityTier( name, initialMarginPpm, maintenanceFractionPpm, + openInterestLowerCap, + openInterestUpperCap, ), ), ) From bee3c85169229fa900bdff3ff37c3ec7ddbe862c Mon Sep 17 00:00:00 2001 From: affan Date: Tue, 26 Mar 2024 14:30:40 -0400 Subject: [PATCH 2/3] add some constants --- indexer/services/ender/__tests__/helpers/constants.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indexer/services/ender/__tests__/helpers/constants.ts b/indexer/services/ender/__tests__/helpers/constants.ts index e058d9dcec..04cafdf6f7 100644 --- a/indexer/services/ender/__tests__/helpers/constants.ts +++ b/indexer/services/ender/__tests__/helpers/constants.ts @@ -148,6 +148,8 @@ export const defaultLiquidityTierUpsertEvent: LiquidityTierUpsertEventV1 = { initialMarginPpm: 50000, // 5% maintenanceFractionPpm: 600000, // 60% of IM = 3% basePositionNotional: Long.fromValue(1_000_000_000_000, true), // 1_000_000 USDC + openInterestLowerCap: 0, + openInterestUpperCap: 10000000 }; export const defaultUpdatePerpetualEvent: UpdatePerpetualEventV1 = { From f679f6655822ffe74968f4c643d4a1a7629dab0f Mon Sep 17 00:00:00 2001 From: affan Date: Tue, 26 Mar 2024 14:44:40 -0400 Subject: [PATCH 3/3] type fix --- indexer/services/ender/__tests__/helpers/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indexer/services/ender/__tests__/helpers/constants.ts b/indexer/services/ender/__tests__/helpers/constants.ts index 04cafdf6f7..54b77f54c9 100644 --- a/indexer/services/ender/__tests__/helpers/constants.ts +++ b/indexer/services/ender/__tests__/helpers/constants.ts @@ -148,8 +148,8 @@ export const defaultLiquidityTierUpsertEvent: LiquidityTierUpsertEventV1 = { initialMarginPpm: 50000, // 5% maintenanceFractionPpm: 600000, // 60% of IM = 3% basePositionNotional: Long.fromValue(1_000_000_000_000, true), // 1_000_000 USDC - openInterestLowerCap: 0, - openInterestUpperCap: 10000000 + openInterestLowerCap: Long.fromValue(0, true), + openInterestUpperCap: Long.fromValue(1_000_000_000, true), }; export const defaultUpdatePerpetualEvent: UpdatePerpetualEventV1 = {