diff --git a/indexer/packages/postgres/src/constants.ts b/indexer/packages/postgres/src/constants.ts index 900c2e6038..97846f3f37 100644 --- a/indexer/packages/postgres/src/constants.ts +++ b/indexer/packages/postgres/src/constants.ts @@ -110,6 +110,7 @@ Record = { [ClobPairStatus.CLOB_PAIR_STATUS_PAUSED]: PerpetualMarketStatus.PAUSED, [ClobPairStatus.CLOB_PAIR_STATUS_POST_ONLY]: PerpetualMarketStatus.POST_ONLY, [ClobPairStatus.CLOB_PAIR_STATUS_INITIALIZING]: PerpetualMarketStatus.INITIALIZING, + [ClobPairStatus.CLOB_PAIR_STATUS_FINAL_SETTLEMENT]: PerpetualMarketStatus.FINAL_SETTLEMENT, }; export const DEFAULT_POSTGRES_OPTIONS : Options = config.USE_READ_REPLICA diff --git a/indexer/packages/postgres/src/types/perpetual-market-types.ts b/indexer/packages/postgres/src/types/perpetual-market-types.ts index 65962fb655..13318b3c68 100644 --- a/indexer/packages/postgres/src/types/perpetual-market-types.ts +++ b/indexer/packages/postgres/src/types/perpetual-market-types.ts @@ -60,4 +60,5 @@ export enum PerpetualMarketStatus { CANCEL_ONLY = 'CANCEL_ONLY', POST_ONLY = 'POST_ONLY', INITIALIZING = 'INITIALIZING', + FINAL_SETTLEMENT = 'FINAL_SETTLEMENT', } diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts index d0bba0007e..f0c6ab0c2b 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/clob_pair.ts @@ -33,6 +33,14 @@ export enum ClobPair_Status { * both short-term and post-only. */ STATUS_INITIALIZING = 5, + + /** + * STATUS_FINAL_SETTLEMENT - STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + * and trading has ceased. All open positions will be closed by the + * protocol. Open stateful orders will be cancelled. Open short-term + * orders will be left to expire. + */ + STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } /** Status of the CLOB. */ @@ -68,6 +76,14 @@ export enum ClobPair_StatusSDKType { * both short-term and post-only. */ STATUS_INITIALIZING = 5, + + /** + * STATUS_FINAL_SETTLEMENT - STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + * and trading has ceased. All open positions will be closed by the + * protocol. Open stateful orders will be cancelled. Open short-term + * orders will be left to expire. + */ + STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } export function clobPair_StatusFromJSON(object: any): ClobPair_Status { @@ -96,6 +112,10 @@ export function clobPair_StatusFromJSON(object: any): ClobPair_Status { case "STATUS_INITIALIZING": return ClobPair_Status.STATUS_INITIALIZING; + case 6: + case "STATUS_FINAL_SETTLEMENT": + return ClobPair_Status.STATUS_FINAL_SETTLEMENT; + case -1: case "UNRECOGNIZED": default: @@ -122,6 +142,9 @@ export function clobPair_StatusToJSON(object: ClobPair_Status): string { case ClobPair_Status.STATUS_INITIALIZING: return "STATUS_INITIALIZING"; + case ClobPair_Status.STATUS_FINAL_SETTLEMENT: + return "STATUS_FINAL_SETTLEMENT"; + case ClobPair_Status.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/matches.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/matches.ts index 3d0f19d5c0..462654af4e 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/matches.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/matches.ts @@ -128,6 +128,14 @@ export interface MatchPerpetualDeleveraging { /** An ordered list of fills created by this liquidation. */ fills: MatchPerpetualDeleveraging_Fill[]; + /** + * Flag denoting whether the deleveraging operation was for the purpose + * of final settlement. Final settlement matches are at the oracle price, + * whereas deleveraging happens at the bankruptcy price of the deleveraged + * subaccount. + */ + + isFinalSettlement: boolean; } /** * MatchPerpetualDeleveraging is an injected message used for deleveraging a @@ -143,6 +151,14 @@ export interface MatchPerpetualDeleveragingSDKType { /** An ordered list of fills created by this liquidation. */ fills: MatchPerpetualDeleveraging_FillSDKType[]; + /** + * Flag denoting whether the deleveraging operation was for the purpose + * of final settlement. Final settlement matches are at the oracle price, + * whereas deleveraging happens at the bankruptcy price of the deleveraged + * subaccount. + */ + + is_final_settlement: boolean; } /** Fill represents a fill between the liquidated and offsetting subaccount. */ @@ -451,7 +467,8 @@ function createBaseMatchPerpetualDeleveraging(): MatchPerpetualDeleveraging { return { liquidated: undefined, perpetualId: 0, - fills: [] + fills: [], + isFinalSettlement: false }; } @@ -469,6 +486,10 @@ export const MatchPerpetualDeleveraging = { MatchPerpetualDeleveraging_Fill.encode(v!, writer.uint32(26).fork()).ldelim(); } + if (message.isFinalSettlement === true) { + writer.uint32(32).bool(message.isFinalSettlement); + } + return writer; }, @@ -493,6 +514,10 @@ export const MatchPerpetualDeleveraging = { message.fills.push(MatchPerpetualDeleveraging_Fill.decode(reader, reader.uint32())); break; + case 4: + message.isFinalSettlement = reader.bool(); + break; + default: reader.skipType(tag & 7); break; @@ -507,6 +532,7 @@ export const MatchPerpetualDeleveraging = { message.liquidated = object.liquidated !== undefined && object.liquidated !== null ? SubaccountId.fromPartial(object.liquidated) : undefined; message.perpetualId = object.perpetualId ?? 0; message.fills = object.fills?.map(e => MatchPerpetualDeleveraging_Fill.fromPartial(e)) || []; + message.isFinalSettlement = object.isFinalSettlement ?? false; return message; } 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 1c11aa4faa..4665d3fbc6 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 @@ -465,12 +465,20 @@ export interface DeleveragingEventV1 { */ fillAmount: Long; - /** Bankruptcy price of liquidated subaccount, in USDC quote quantums. */ + /** Fill price of deleveraging event, in USDC quote quantums. */ price: Long; /** `true` if liquidating a short position, `false` otherwise. */ isBuy: boolean; + /** + * `true` if the deleveraging event is for final settlement, indicating + * the match occurred at the oracle price rather than bankruptcy price. + * When this flag is `false`, the fill price is the bankruptcy price + * of the liquidated subaccount. + */ + + isFinalSettlement: boolean; } /** * DeleveragingEvent message contains all the information for a deleveraging @@ -493,12 +501,20 @@ export interface DeleveragingEventV1SDKType { */ fill_amount: Long; - /** Bankruptcy price of liquidated subaccount, in USDC quote quantums. */ + /** Fill price of deleveraging event, in USDC quote quantums. */ price: Long; /** `true` if liquidating a short position, `false` otherwise. */ is_buy: boolean; + /** + * `true` if the deleveraging event is for final settlement, indicating + * the match occurred at the oracle price rather than bankruptcy price. + * When this flag is `false`, the fill price is the bankruptcy price + * of the liquidated subaccount. + */ + + is_final_settlement: boolean; } /** * LiquidationOrder represents the liquidation taker order to be included in a @@ -1782,7 +1798,8 @@ function createBaseDeleveragingEventV1(): DeleveragingEventV1 { perpetualId: 0, fillAmount: Long.UZERO, price: Long.UZERO, - isBuy: false + isBuy: false, + isFinalSettlement: false }; } @@ -1812,6 +1829,10 @@ export const DeleveragingEventV1 = { writer.uint32(48).bool(message.isBuy); } + if (message.isFinalSettlement === true) { + writer.uint32(56).bool(message.isFinalSettlement); + } + return writer; }, @@ -1848,6 +1869,10 @@ export const DeleveragingEventV1 = { message.isBuy = reader.bool(); break; + case 7: + message.isFinalSettlement = reader.bool(); + break; + default: reader.skipType(tag & 7); break; @@ -1865,6 +1890,7 @@ export const DeleveragingEventV1 = { message.fillAmount = object.fillAmount !== undefined && object.fillAmount !== null ? Long.fromValue(object.fillAmount) : Long.UZERO; message.price = object.price !== undefined && object.price !== null ? Long.fromValue(object.price) : Long.UZERO; message.isBuy = object.isBuy ?? false; + message.isFinalSettlement = object.isFinalSettlement ?? false; return message; } diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts index e25b4b9767..92995bc19d 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/clob.ts @@ -307,6 +307,14 @@ export enum ClobPairStatus { * both short-term and post-only. */ CLOB_PAIR_STATUS_INITIALIZING = 5, + + /** + * CLOB_PAIR_STATUS_FINAL_SETTLEMENT - CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + * deactivated. Clob pairs in this state do not accept new orders and trading + * is blocked. All open positions are closed by the protocol when the clob + * pair gains this status. + */ + CLOB_PAIR_STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } /** @@ -348,6 +356,14 @@ export enum ClobPairStatusSDKType { * both short-term and post-only. */ CLOB_PAIR_STATUS_INITIALIZING = 5, + + /** + * CLOB_PAIR_STATUS_FINAL_SETTLEMENT - CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + * deactivated. Clob pairs in this state do not accept new orders and trading + * is blocked. All open positions are closed by the protocol when the clob + * pair gains this status. + */ + CLOB_PAIR_STATUS_FINAL_SETTLEMENT = 6, UNRECOGNIZED = -1, } export function clobPairStatusFromJSON(object: any): ClobPairStatus { @@ -376,6 +392,10 @@ export function clobPairStatusFromJSON(object: any): ClobPairStatus { case "CLOB_PAIR_STATUS_INITIALIZING": return ClobPairStatus.CLOB_PAIR_STATUS_INITIALIZING; + case 6: + case "CLOB_PAIR_STATUS_FINAL_SETTLEMENT": + return ClobPairStatus.CLOB_PAIR_STATUS_FINAL_SETTLEMENT; + case -1: case "UNRECOGNIZED": default: @@ -402,6 +422,9 @@ export function clobPairStatusToJSON(object: ClobPairStatus): string { case ClobPairStatus.CLOB_PAIR_STATUS_INITIALIZING: return "CLOB_PAIR_STATUS_INITIALIZING"; + case ClobPairStatus.CLOB_PAIR_STATUS_FINAL_SETTLEMENT: + return "CLOB_PAIR_STATUS_FINAL_SETTLEMENT"; + case ClobPairStatus.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts index bd787a70e8..970a5c8e2c 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/shared/removal_reason.ts @@ -75,6 +75,9 @@ export enum OrderRemovalReason { * equity tier requirements. */ ORDER_REMOVAL_REASON_EQUITY_TIER = 13, + + /** ORDER_REMOVAL_REASON_FINAL_SETTLEMENT - The order has been removed since its ClobPair has entered final settlement. */ + ORDER_REMOVAL_REASON_FINAL_SETTLEMENT = 14, UNRECOGNIZED = -1, } /** OrderRemovalReason is an enum of all the reasons an order was removed. */ @@ -155,6 +158,9 @@ export enum OrderRemovalReasonSDKType { * equity tier requirements. */ ORDER_REMOVAL_REASON_EQUITY_TIER = 13, + + /** ORDER_REMOVAL_REASON_FINAL_SETTLEMENT - The order has been removed since its ClobPair has entered final settlement. */ + ORDER_REMOVAL_REASON_FINAL_SETTLEMENT = 14, UNRECOGNIZED = -1, } export function orderRemovalReasonFromJSON(object: any): OrderRemovalReason { @@ -215,6 +221,10 @@ export function orderRemovalReasonFromJSON(object: any): OrderRemovalReason { case "ORDER_REMOVAL_REASON_EQUITY_TIER": return OrderRemovalReason.ORDER_REMOVAL_REASON_EQUITY_TIER; + case 14: + case "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT": + return OrderRemovalReason.ORDER_REMOVAL_REASON_FINAL_SETTLEMENT; + case -1: case "UNRECOGNIZED": default: @@ -265,6 +275,9 @@ export function orderRemovalReasonToJSON(object: OrderRemovalReason): string { case OrderRemovalReason.ORDER_REMOVAL_REASON_EQUITY_TIER: return "ORDER_REMOVAL_REASON_EQUITY_TIER"; + case OrderRemovalReason.ORDER_REMOVAL_REASON_FINAL_SETTLEMENT: + return "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT"; + case OrderRemovalReason.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/indexer/services/comlink/public/api-documentation.md b/indexer/services/comlink/public/api-documentation.md index f499988468..bd09dc6402 100644 --- a/indexer/services/comlink/public/api-documentation.md +++ b/indexer/services/comlink/public/api-documentation.md @@ -2816,6 +2816,7 @@ or |*anonymous*|CANCEL_ONLY| |*anonymous*|POST_ONLY| |*anonymous*|INITIALIZING| +|*anonymous*|FINAL_SETTLEMENT| ## PerpetualMarketResponseObject diff --git a/indexer/services/comlink/public/swagger.json b/indexer/services/comlink/public/swagger.json index 888773a9d4..fc2e3db6be 100644 --- a/indexer/services/comlink/public/swagger.json +++ b/indexer/services/comlink/public/swagger.json @@ -686,7 +686,8 @@ "PAUSED", "CANCEL_ONLY", "POST_ONLY", - "INITIALIZING" + "INITIALIZING", + "FINAL_SETTLEMENT" ], "type": "string" }, diff --git a/indexer/services/ender/__tests__/helpers/constants.ts b/indexer/services/ender/__tests__/helpers/constants.ts index cd583a6ac3..1beaf05399 100644 --- a/indexer/services/ender/__tests__/helpers/constants.ts +++ b/indexer/services/ender/__tests__/helpers/constants.ts @@ -288,6 +288,7 @@ export const defaultDeleveragingEvent: DeleveragingEventV1 = { fillAmount: Long.fromValue(10_000, true), price: Long.fromValue(1_000_000_000, true), isBuy: true, + isFinalSettlement: false, }; export const defaultDepositEvent: TransferEventV1 = { assetId: 0, diff --git a/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql b/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql index a4ea28e715..fe6f2be178 100644 --- a/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql +++ b/indexer/services/ender/src/scripts/dydx_clob_pair_status_to_market_status.sql @@ -17,6 +17,7 @@ BEGIN WHEN '3'::jsonb THEN RETURN 'CANCEL_ONLY'; /** CLOB_PAIR_STATUS_CANCEL_ONLY */ WHEN '4'::jsonb THEN RETURN 'POST_ONLY'; /** CLOB_PAIR_STATUS_POST_ONLY */ WHEN '5'::jsonb THEN RETURN 'INITIALIZING'; /** CLOB_PAIR_STATUS_INITIALIZING */ + WHEN '6'::jsonb THEN RETURN 'FINAL_SETTLEMENT'; /** CLOB_PAIR_STATUS_FINAL_SETTLEMENT */ ELSE RAISE EXCEPTION 'Invalid clob pair status: %', status; END CASE; END; diff --git a/proto/dydxprotocol/clob/clob_pair.proto b/proto/dydxprotocol/clob/clob_pair.proto index 4668851dea..2ad28d4281 100644 --- a/proto/dydxprotocol/clob/clob_pair.proto +++ b/proto/dydxprotocol/clob/clob_pair.proto @@ -65,6 +65,11 @@ message ClobPair { // Clob pairs in this state only accept orders which are // both short-term and post-only. STATUS_INITIALIZING = 5; + // STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + // and trading has ceased. All open positions will be closed by the + // protocol. Open stateful orders will be cancelled. Open short-term + // orders will be left to expire. + STATUS_FINAL_SETTLEMENT = 6; } Status status = 7; diff --git a/proto/dydxprotocol/clob/matches.proto b/proto/dydxprotocol/clob/matches.proto index f9a51b6a78..8b7b299f61 100644 --- a/proto/dydxprotocol/clob/matches.proto +++ b/proto/dydxprotocol/clob/matches.proto @@ -75,4 +75,10 @@ message MatchPerpetualDeleveraging { } // An ordered list of fills created by this liquidation. repeated Fill fills = 3 [ (gogoproto.nullable) = false ]; + + // Flag denoting whether the deleveraging operation was for the purpose + // of final settlement. Final settlement matches are at the oracle price, + // whereas deleveraging happens at the bankruptcy price of the deleveraged + // subaccount. + bool is_final_settlement = 4; } diff --git a/proto/dydxprotocol/indexer/events/events.proto b/proto/dydxprotocol/indexer/events/events.proto index c7a55a1bc8..be1d96dd84 100644 --- a/proto/dydxprotocol/indexer/events/events.proto +++ b/proto/dydxprotocol/indexer/events/events.proto @@ -180,10 +180,15 @@ message DeleveragingEventV1 { // The amount filled between the liquidated and offsetting position, in // base quantums. uint64 fill_amount = 4; - // Bankruptcy price of liquidated subaccount, in USDC quote quantums. + // Fill price of deleveraging event, in USDC quote quantums. uint64 price = 5; // `true` if liquidating a short position, `false` otherwise. bool is_buy = 6; + // `true` if the deleveraging event is for final settlement, indicating + // the match occurred at the oracle price rather than bankruptcy price. + // When this flag is `false`, the fill price is the bankruptcy price + // of the liquidated subaccount. + bool is_final_settlement = 7; } // LiquidationOrder represents the liquidation taker order to be included in a diff --git a/proto/dydxprotocol/indexer/protocol/v1/clob.proto b/proto/dydxprotocol/indexer/protocol/v1/clob.proto index 7c30fbcf87..b7b52b0a69 100644 --- a/proto/dydxprotocol/indexer/protocol/v1/clob.proto +++ b/proto/dydxprotocol/indexer/protocol/v1/clob.proto @@ -173,4 +173,9 @@ enum ClobPairStatus { // Clob pairs in this state only accept orders which are // both short-term and post-only. CLOB_PAIR_STATUS_INITIALIZING = 5; + // CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + // deactivated. Clob pairs in this state do not accept new orders and trading + // is blocked. All open positions are closed by the protocol when the clob + // pair gains this status. + CLOB_PAIR_STATUS_FINAL_SETTLEMENT = 6; } diff --git a/proto/dydxprotocol/indexer/shared/removal_reason.proto b/proto/dydxprotocol/indexer/shared/removal_reason.proto index 7787e6571a..be81d025d2 100644 --- a/proto/dydxprotocol/indexer/shared/removal_reason.proto +++ b/proto/dydxprotocol/indexer/shared/removal_reason.proto @@ -51,4 +51,6 @@ enum OrderRemovalReason { // The order has been removed since the subaccount does not satisfy the // equity tier requirements. ORDER_REMOVAL_REASON_EQUITY_TIER = 13; + // The order has been removed since its ClobPair has entered final settlement. + ORDER_REMOVAL_REASON_FINAL_SETTLEMENT = 14; } diff --git a/protocol/indexer/events/events.pb.go b/protocol/indexer/events/events.pb.go index e9bb3e3dfd..0ddbfd4bca 100644 --- a/protocol/indexer/events/events.pb.go +++ b/protocol/indexer/events/events.pb.go @@ -856,10 +856,15 @@ type DeleveragingEventV1 struct { // The amount filled between the liquidated and offsetting position, in // base quantums. FillAmount uint64 `protobuf:"varint,4,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"` - // Bankruptcy price of liquidated subaccount, in USDC quote quantums. + // Fill price of deleveraging event, in USDC quote quantums. Price uint64 `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"` // `true` if liquidating a short position, `false` otherwise. IsBuy bool `protobuf:"varint,6,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + // `true` if the deleveraging event is for final settlement, indicating + // the match occurred at the oracle price rather than bankruptcy price. + // When this flag is `false`, the fill price is the bankruptcy price + // of the liquidated subaccount. + IsFinalSettlement bool `protobuf:"varint,7,opt,name=is_final_settlement,json=isFinalSettlement,proto3" json:"is_final_settlement,omitempty"` } func (m *DeleveragingEventV1) Reset() { *m = DeleveragingEventV1{} } @@ -937,6 +942,13 @@ func (m *DeleveragingEventV1) GetIsBuy() bool { return false } +func (m *DeleveragingEventV1) GetIsFinalSettlement() bool { + if m != nil { + return m.IsFinalSettlement + } + return false +} + // LiquidationOrder represents the liquidation taker order to be included in a // liquidation order fill event. type LiquidationOrderV1 struct { @@ -2025,131 +2037,132 @@ func init() { } var fileDescriptor_6331dfb59c6fd2bb = []byte{ - // 1971 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x4f, 0x23, 0xc9, - 0x15, 0xc7, 0x76, 0x63, 0xe0, 0x81, 0x19, 0xbb, 0x06, 0x18, 0x03, 0x09, 0x43, 0x5a, 0x8a, 0x84, - 0xf6, 0xc3, 0x0c, 0x93, 0x49, 0xb4, 0xca, 0x21, 0x0a, 0x06, 0xb3, 0x78, 0x04, 0x8c, 0xd3, 0x98, - 0xd9, 0xdd, 0x49, 0xb4, 0x9d, 0xa2, 0xbb, 0x6c, 0x4a, 0xf4, 0xd7, 0x76, 0x95, 0xc9, 0x30, 0x52, - 0xce, 0xc9, 0x2d, 0x91, 0x72, 0xce, 0x21, 0x87, 0x5c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, 0x61, 0x7e, - 0x0a, 0x25, 0x85, 0x55, 0xc5, 0x2c, 0x05, 0x41, 0x60, 0x44, 0x98, 0xc6, 0x52, 0x6a, 0xc6, 0x92, - 0xbf, 0xd1, 0x26, 0x2c, 0xf8, 0x34, 0xb0, 0x15, 0xb8, 0x73, 0x86, 0x83, 0x76, 0xf7, 0xb8, 0x15, - 0xac, 0x92, 0x4f, 0x03, 0x69, 0xcd, 0x8e, 0xe4, 0x34, 0x22, 0xdf, 0xec, 0xc0, 0xdd, 0x21, 0xe1, - 0x42, 0x55, 0x30, 0x4e, 0x31, 0x23, 0x12, 0x7b, 0xf6, 0x61, 0x65, 0x8c, 0xa8, 0xf4, 0x58, 0x66, - 0x49, 0x59, 0xb4, 0x02, 0xd3, 0xa9, 0x67, 0x42, 0x7f, 0xc9, 0x4a, 0xd7, 0xe6, 0x67, 0x89, 0xda, - 0xbe, 0x60, 0xde, 0x86, 0x5a, 0xf3, 0xcf, 0x19, 0x28, 0x1c, 0x87, 0x9d, 0xd8, 0x21, 0x4f, 0x5a, - 0xe2, 0x48, 0x31, 0xf4, 0x33, 0x28, 0x74, 0xef, 0xb2, 0xa4, 0x82, 0x47, 0x56, 0x68, 0x4a, 0xb8, - 0xd8, 0xaa, 0xd4, 0x15, 0xed, 0x38, 0x95, 0xae, 0xbb, 0x22, 0xe1, 0xac, 0x67, 0x8d, 0x1e, 0xc1, - 0x14, 0x76, 0xdd, 0x98, 0x30, 0x26, 0xbd, 0x9c, 0xa9, 0x96, 0xff, 0xf9, 0xd7, 0x0f, 0x17, 0xf4, - 0x05, 0xbf, 0xad, 0x38, 0xc7, 0x3c, 0xa6, 0x41, 0x7b, 0x7f, 0xc2, 0x4a, 0xb6, 0x56, 0xa7, 0x21, - 0xcf, 0xa4, 0x91, 0xe6, 0x9f, 0x72, 0x70, 0xa7, 0x19, 0xe3, 0x80, 0xb5, 0x48, 0x9c, 0xc4, 0xa1, - 0x0d, 0x0b, 0x8c, 0x04, 0x2e, 0x89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xc1, 0xcc, 0x8d, 0x73, - 0x9b, 0x18, 0x23, 0x8e, 0xc3, 0x60, 0xd1, 0x4e, 0x0e, 0x29, 0xda, 0xaa, 0xf5, 0xd5, 0xab, 0xb5, - 0xcc, 0xd7, 0xaf, 0xd6, 0x32, 0xff, 0x7d, 0xb5, 0x96, 0xf9, 0xed, 0xeb, 0xb5, 0x89, 0xaf, 0x5f, - 0xaf, 0x4d, 0xfc, 0xfb, 0xf5, 0xda, 0xc4, 0xb3, 0x8f, 0xc6, 0xff, 0xda, 0xdc, 0xff, 0x6f, 0x81, - 0xd3, 0xbc, 0x64, 0x7c, 0xef, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x9d, 0xde, 0x80, 0x3c, - 0x18, 0x00, 0x00, + // 1997 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x6f, 0x23, 0x49, + 0x15, 0x8f, 0x3f, 0xe2, 0x38, 0x2f, 0x71, 0xc6, 0xae, 0x49, 0x32, 0x4e, 0x02, 0x99, 0xd0, 0x12, + 0x52, 0xb4, 0x1f, 0xce, 0x64, 0x18, 0xd0, 0x8a, 0x03, 0x22, 0x4e, 0x9c, 0x8d, 0x47, 0x49, 0xc6, + 0xb4, 0x9d, 0xd9, 0xdd, 0x01, 0x6d, 0x53, 0xe9, 0x2e, 0x3b, 0xa5, 0xf4, 0xd7, 0x76, 0x95, 0xc3, + 0x64, 0x24, 0xce, 0x70, 0x03, 0x89, 0x33, 0x07, 0x0e, 0x5c, 0x90, 0x38, 0x20, 0x71, 0xdd, 0x13, + 0x97, 0xbd, 0xb1, 0xe2, 0x02, 0xe2, 0x30, 0x42, 0x33, 0x07, 0xae, 0xfc, 0x09, 0xa8, 0x3e, 0xba, + 0x6d, 0xc7, 0x76, 0xc6, 0x33, 0xc9, 0x9e, 0xe2, 0x7a, 0xaf, 0xde, 0xef, 0x7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x1d, 0x73, 0x1c, 0x86, + 0x8b, 0x76, 0x7a, 0x44, 0xd1, 0x56, 0xcd, 0xaf, 0x5e, 0xad, 0xa7, 0xbe, 0x7e, 0xb5, 0x9e, 0xfa, + 0xcf, 0xab, 0xf5, 0xd4, 0x6f, 0x5f, 0xaf, 0x4f, 0x7d, 0xfd, 0x7a, 0x7d, 0xea, 0x5f, 0xaf, 0xd7, + 0xa7, 0x9e, 0x7d, 0x34, 0xf9, 0xd7, 0xe9, 0xc1, 0x7f, 0x23, 0x9c, 0xe6, 0x24, 0xe3, 0x7b, 0xff, + 0x0f, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x35, 0x70, 0xc0, 0x6c, 0x18, 0x00, 0x00, } func (m *FundingUpdateV1) Marshal() (dAtA []byte, err error) { @@ -2752,6 +2765,16 @@ func (m *DeleveragingEventV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IsFinalSettlement { + i-- + if m.IsFinalSettlement { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } if m.IsBuy { i-- if m.IsBuy { @@ -3815,6 +3838,9 @@ func (m *DeleveragingEventV1) Size() (n int) { if m.IsBuy { n += 2 } + if m.IsFinalSettlement { + n += 2 + } return n } @@ -5688,6 +5714,26 @@ func (m *DeleveragingEventV1) Unmarshal(dAtA []byte) error { } } m.IsBuy = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFinalSettlement", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFinalSettlement = bool(v != 0) default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/protocol/indexer/protocol/v1/clob.pb.go b/protocol/indexer/protocol/v1/clob.pb.go index ba1ea7a6d9..6e17da3336 100644 --- a/protocol/indexer/protocol/v1/clob.pb.go +++ b/protocol/indexer/protocol/v1/clob.pb.go @@ -47,6 +47,11 @@ const ( // Clob pairs in this state only accept orders which are // both short-term and post-only. ClobPairStatus_CLOB_PAIR_STATUS_INITIALIZING ClobPairStatus = 5 + // CLOB_PAIR_STATUS_FINAL_SETTLEMENT represents a clob pair that has been + // deactivated. Clob pairs in this state do not accept new orders and trading + // is blocked. All open positions are closed by the protocol when the clob + // pair gains this status. + ClobPairStatus_CLOB_PAIR_STATUS_FINAL_SETTLEMENT ClobPairStatus = 6 ) var ClobPairStatus_name = map[int32]string{ @@ -56,15 +61,17 @@ var ClobPairStatus_name = map[int32]string{ 3: "CLOB_PAIR_STATUS_CANCEL_ONLY", 4: "CLOB_PAIR_STATUS_POST_ONLY", 5: "CLOB_PAIR_STATUS_INITIALIZING", + 6: "CLOB_PAIR_STATUS_FINAL_SETTLEMENT", } var ClobPairStatus_value = map[string]int32{ - "CLOB_PAIR_STATUS_UNSPECIFIED": 0, - "CLOB_PAIR_STATUS_ACTIVE": 1, - "CLOB_PAIR_STATUS_PAUSED": 2, - "CLOB_PAIR_STATUS_CANCEL_ONLY": 3, - "CLOB_PAIR_STATUS_POST_ONLY": 4, - "CLOB_PAIR_STATUS_INITIALIZING": 5, + "CLOB_PAIR_STATUS_UNSPECIFIED": 0, + "CLOB_PAIR_STATUS_ACTIVE": 1, + "CLOB_PAIR_STATUS_PAUSED": 2, + "CLOB_PAIR_STATUS_CANCEL_ONLY": 3, + "CLOB_PAIR_STATUS_POST_ONLY": 4, + "CLOB_PAIR_STATUS_INITIALIZING": 5, + "CLOB_PAIR_STATUS_FINAL_SETTLEMENT": 6, } func (x ClobPairStatus) String() string { @@ -479,58 +486,59 @@ func init() { } var fileDescriptor_fac8923e70f7ca3c = []byte{ - // 809 bytes of a gzipped FileDescriptorProto + // 830 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0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f, 0x73, 0x37, 0xf1, 0x92, 0xb9, 0xfc, 0x37, + 0xb8, 0xaf, 0x9b, 0xf6, 0x80, 0x8e, 0xfa, 0xd8, 0xa1, 0x2e, 0xe9, 0x93, 0x13, 0xf7, 0xda, 0x12, + 0xbb, 0x70, 0x6f, 0x8d, 0xd1, 0xd7, 0x09, 0xfe, 0xde, 0xc8, 0xf2, 0x58, 0x6b, 0x8e, 0xfa, 0x27, + 0xae, 0x71, 0xa8, 0x96, 0xdf, 0xaa, 0xad, 0xf7, 0x2d, 0xdd, 0x30, 0xb3, 0xc4, 0x36, 0x52, 0x0b, + 0x6b, 0xe3, 0x45, 0xa2, 0x15, 0xf4, 0x10, 0x1e, 0xac, 0xf5, 0xb1, 0x85, 0x09, 0xee, 0x9b, 0xf8, + 0x19, 0xb6, 0x9e, 0xa8, 0x77, 0xd0, 0x87, 0xf0, 0x70, 0x8d, 0x32, 0xc4, 0x56, 0xdf, 0xa4, 0xae, + 0x41, 0x88, 0x69, 0x1c, 0x1b, 0x16, 0x51, 0x37, 0x07, 0x3f, 0xbc, 0xba, 0x6c, 0x29, 0xaf, 0x2f, + 0x5b, 0xca, 0x5f, 0x97, 0x2d, 0xe5, 0xd7, 0xab, 0x56, 0xe9, 0xf5, 0x55, 0xab, 0xf4, 0xc7, 0x55, + 0xab, 0xf4, 0xec, 0xdb, 0x09, 0x4f, 0x9e, 0xcf, 0xc7, 0x5d, 0x5f, 0x4c, 0x7b, 0x2b, 0x9f, 0x85, + 0x8b, 0x2f, 0x3e, 0xf3, 0x9f, 0x7b, 0x3c, 0xea, 0xfd, 0xd7, 0x87, 0x62, 0xbc, 0x99, 0x16, 0x8f, + 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x08, 0xc4, 0xc7, 0xa2, 0x06, 0x00, 0x00, } func (m *IndexerOrderId) Marshal() (dAtA []byte, err error) { diff --git a/protocol/indexer/protocol/v1/v1_mappers.go b/protocol/indexer/protocol/v1/v1_mappers.go index 275263257c..b404d3435c 100644 --- a/protocol/indexer/protocol/v1/v1_mappers.go +++ b/protocol/indexer/protocol/v1/v1_mappers.go @@ -176,7 +176,14 @@ func ConvertToClobPairStatus(status clobtypes.ClobPair_Status) ClobPairStatus { return ClobPairStatus_CLOB_PAIR_STATUS_POST_ONLY case clobtypes.ClobPair_STATUS_INITIALIZING: return ClobPairStatus_CLOB_PAIR_STATUS_INITIALIZING + case clobtypes.ClobPair_STATUS_FINAL_SETTLEMENT: + return ClobPairStatus_CLOB_PAIR_STATUS_FINAL_SETTLEMENT default: - panic("invalid clob pair status") + panic( + fmt.Sprintf( + "ConvertToClobPairStatus: invalid clob pair status: %+v", + status, + ), + ) } } diff --git a/protocol/indexer/protocol/v1/v1_mappers_test.go b/protocol/indexer/protocol/v1/v1_mappers_test.go index 66a4a70f1f..af79807302 100644 --- a/protocol/indexer/protocol/v1/v1_mappers_test.go +++ b/protocol/indexer/protocol/v1/v1_mappers_test.go @@ -398,7 +398,10 @@ func TestConvertToClobPairStatus(t *testing.T) { expectedStatus: v1.ClobPairStatus(clobtypes.ClobPair_Status_value[name]), } if value == int32(clobtypes.ClobPair_STATUS_UNSPECIFIED) { - testCase.expectedPanic = "invalid clob pair status" + testCase.expectedPanic = fmt.Sprintf( + "ConvertToClobPairStatus: invalid clob pair status: %+v", + clobtypes.ClobPair_STATUS_UNSPECIFIED, + ) } tests[testName] = testCase } diff --git a/protocol/indexer/shared/removal_reason.pb.go b/protocol/indexer/shared/removal_reason.pb.go index 99a9bf9daf..480302a924 100644 --- a/protocol/indexer/shared/removal_reason.pb.go +++ b/protocol/indexer/shared/removal_reason.pb.go @@ -68,6 +68,8 @@ const ( // The order has been removed since the subaccount does not satisfy the // equity tier requirements. OrderRemovalReason_ORDER_REMOVAL_REASON_EQUITY_TIER OrderRemovalReason = 13 + // The order has been removed since its ClobPair has entered final settlement. + OrderRemovalReason_ORDER_REMOVAL_REASON_FINAL_SETTLEMENT OrderRemovalReason = 14 ) var OrderRemovalReason_name = map[int32]string{ @@ -85,6 +87,7 @@ var OrderRemovalReason_name = map[int32]string{ 11: "ORDER_REMOVAL_REASON_REPLACED", 12: "ORDER_REMOVAL_REASON_FULLY_FILLED", 13: "ORDER_REMOVAL_REASON_EQUITY_TIER", + 14: "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT", } var OrderRemovalReason_value = map[string]int32{ @@ -102,6 +105,7 @@ var OrderRemovalReason_value = map[string]int32{ "ORDER_REMOVAL_REASON_REPLACED": 11, "ORDER_REMOVAL_REASON_FULLY_FILLED": 12, "ORDER_REMOVAL_REASON_EQUITY_TIER": 13, + "ORDER_REMOVAL_REASON_FINAL_SETTLEMENT": 14, } func (x OrderRemovalReason) String() string { @@ -121,33 +125,34 @@ func init() { } var fileDescriptor_0d5eea5cab8c58ba = []byte{ - // 446 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0x13, 0xa0, 0x05, 0x16, 0x90, 0x56, 0x7b, 0x05, 0xac, 0x16, 0x5a, 0x5a, 0xfe, 0xc5, - 0x48, 0x20, 0x54, 0x01, 0x12, 0xda, 0x78, 0x27, 0xd2, 0x2a, 0x1b, 0x6f, 0x18, 0xdb, 0xd0, 0xe4, - 0x32, 0x72, 0x63, 0x8b, 0x44, 0x6a, 0x63, 0xe4, 0x96, 0xaa, 0xbc, 0x01, 0x47, 0x1e, 0x8b, 0x63, - 0x8e, 0x1c, 0x51, 0xf2, 0x22, 0x48, 0x76, 0x40, 0x54, 0x5a, 0x5f, 0x7c, 0xf1, 0xef, 0xf7, 0xcd, - 0x67, 0xef, 0x2c, 0x7b, 0x91, 0x7d, 0xcb, 0x2e, 0xbe, 0x94, 0xc5, 0x59, 0x31, 0x29, 0x8e, 0xfd, - 0xd9, 0x3c, 0xcb, 0x2f, 0xf2, 0xd2, 0x3f, 0x9d, 0xa6, 0x65, 0x9e, 0xf9, 0x65, 0x7e, 0x52, 0x9c, - 0xa7, 0xc7, 0x54, 0xe6, 0xe9, 0x69, 0x31, 0xef, 0x54, 0x98, 0xb8, 0xfb, 0xbf, 0xd1, 0x59, 0x1b, - 0x9d, 0xda, 0x78, 0xf2, 0x7d, 0x83, 0x09, 0x5b, 0x66, 0x79, 0x89, 0xb5, 0x8a, 0x95, 0x29, 0x76, - 0xd8, 0x96, 0x45, 0x05, 0x48, 0x08, 0x03, 0xfb, 0x51, 0x1a, 0x42, 0x90, 0x91, 0x0d, 0x29, 0x09, - 0xa3, 0x21, 0x04, 0xba, 0xa7, 0x41, 0xf1, 0x96, 0xd8, 0x62, 0xf7, 0x9c, 0x14, 0x1c, 0x0e, 0x35, - 0x82, 0xe2, 0x6d, 0xf1, 0x88, 0x3d, 0x70, 0xe7, 0x44, 0x80, 0x14, 0xc8, 0x30, 0x00, 0x03, 0x8a, - 0x5f, 0x11, 0xcf, 0xd8, 0x7e, 0xc3, 0x3c, 0x05, 0x18, 0x58, 0x63, 0x64, 0x0c, 0x28, 0x8d, 0x1e, - 0x83, 0xe2, 0x57, 0xc5, 0x1e, 0x7b, 0xe8, 0xa4, 0x75, 0x18, 0x03, 0x86, 0xd2, 0x10, 0x20, 0x5a, - 0xe4, 0xd7, 0xc4, 0x63, 0xb6, 0xeb, 0x04, 0x23, 0x30, 0x3d, 0x8a, 0x51, 0x2a, 0x58, 0xa3, 0x1b, - 0xe2, 0x0d, 0x7b, 0xed, 0x44, 0x87, 0x36, 0x8a, 0xc9, 0x86, 0x66, 0x44, 0x9f, 0x6c, 0x62, 0x14, - 0x05, 0x68, 0xa3, 0x88, 0x06, 0xb2, 0x0f, 0x48, 0x95, 0xc0, 0x37, 0xc5, 0x7b, 0xf6, 0xd6, 0xdd, - 0x67, 0x30, 0x00, 0xa5, 0x65, 0x0c, 0x64, 0xff, 0x7e, 0xed, 0x3a, 0x05, 0xa1, 0x4a, 0xa5, 0xae, - 0xb5, 0x7d, 0x7e, 0x5d, 0xbc, 0x63, 0x07, 0xce, 0x80, 0x9e, 0xed, 0xd7, 0x43, 0x28, 0xa8, 0xb4, - 0xd0, 0xc6, 0xd4, 0x05, 0xea, 0x25, 0xc6, 0x8c, 0xaa, 0x27, 0x28, 0x7e, 0x43, 0x3c, 0x65, 0x7b, - 0x4e, 0x1b, 0x41, 0x25, 0x01, 0xd4, 0xe5, 0x11, 0x22, 0x3d, 0x06, 0x7e, 0x53, 0xec, 0xb3, 0x9d, - 0x86, 0x7f, 0xa7, 0xe0, 0x10, 0xf0, 0xdf, 0xd9, 0x31, 0xb1, 0xcd, 0xee, 0x37, 0xc4, 0x0e, 0x8d, - 0x0c, 0x40, 0xf1, 0x5b, 0x62, 0x97, 0x6d, 0xbb, 0x7b, 0xd7, 0x05, 0x75, 0x55, 0xf0, 0x76, 0xe3, - 0x36, 0xc1, 0x87, 0x44, 0xc7, 0x23, 0x8a, 0x35, 0x20, 0xbf, 0xd3, 0xc5, 0x9f, 0x4b, 0xaf, 0xbd, - 0x58, 0x7a, 0xed, 0xdf, 0x4b, 0xaf, 0xfd, 0x63, 0xe5, 0xb5, 0x16, 0x2b, 0xaf, 0xf5, 0x6b, 0xe5, - 0xb5, 0xc6, 0x07, 0x9f, 0x67, 0x67, 0xd3, 0xaf, 0x47, 0x9d, 0x49, 0x71, 0xe2, 0x5f, 0x5a, 0xff, - 0xf3, 0x57, 0xcf, 0x27, 0xd3, 0x74, 0x36, 0xf7, 0x1b, 0x2e, 0xc4, 0xd1, 0x66, 0xf5, 0xe2, 0xe5, - 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x84, 0xfa, 0x05, 0x36, 0x03, 0x00, 0x00, + // 461 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcd, 0x6e, 0xd3, 0x40, + 0x14, 0x85, 0x13, 0xa0, 0x05, 0x86, 0x1f, 0x8d, 0x66, 0x0b, 0x58, 0x2d, 0xb4, 0xb4, 0xfc, 0x25, + 0x48, 0x20, 0x54, 0x01, 0x12, 0x9a, 0x78, 0xae, 0xa5, 0x51, 0xc6, 0x9e, 0x70, 0x3d, 0x86, 0x26, + 0x9b, 0xab, 0x34, 0xb6, 0x48, 0xa4, 0x36, 0x46, 0x6e, 0xa9, 0xca, 0x5b, 0xf0, 0x2e, 0xbc, 0x04, + 0xcb, 0x2e, 0x59, 0xa2, 0xe4, 0x45, 0x10, 0x76, 0x40, 0x54, 0xb2, 0x37, 0xde, 0xf8, 0x7c, 0xe7, + 0x9e, 0x99, 0x33, 0x97, 0x3d, 0x4f, 0xbf, 0xa6, 0x67, 0x9f, 0x8b, 0xfc, 0x24, 0x9f, 0xe4, 0x87, + 0xdd, 0xd9, 0x3c, 0xcd, 0xce, 0xb2, 0xa2, 0x7b, 0x3c, 0x1d, 0x17, 0x59, 0xda, 0x2d, 0xb2, 0xa3, + 0xfc, 0x74, 0x7c, 0x48, 0x45, 0x36, 0x3e, 0xce, 0xe7, 0x9d, 0x52, 0x26, 0xee, 0xfc, 0x4f, 0x74, + 0x56, 0x44, 0xa7, 0x22, 0x1e, 0x7f, 0x5f, 0x63, 0xc2, 0x16, 0x69, 0x56, 0x60, 0x85, 0x62, 0x49, + 0x8a, 0x2d, 0xb6, 0x61, 0x51, 0x01, 0x12, 0x42, 0x68, 0x3f, 0x48, 0x43, 0x08, 0x32, 0xb6, 0x11, + 0x25, 0x51, 0x3c, 0x00, 0x5f, 0x07, 0x1a, 0x14, 0x6f, 0x89, 0x0d, 0x76, 0xb7, 0x56, 0x05, 0xfb, + 0x03, 0x8d, 0xa0, 0x78, 0x5b, 0x3c, 0x64, 0xf7, 0xeb, 0x7d, 0x62, 0x40, 0xf2, 0x65, 0xe4, 0x83, + 0x01, 0xc5, 0x2f, 0x89, 0xa7, 0x6c, 0xb7, 0x61, 0x9e, 0x02, 0xf4, 0xad, 0x31, 0xd2, 0x01, 0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, 0x84, 0x10, 0x39, 0x7e, 0xbb, 0x87, 0x3f, 0x16, 0x5e, 0xfb, 0x7c, + 0xe1, 0xb5, 0x7f, 0x2d, 0xbc, 0xf6, 0xb7, 0xa5, 0xd7, 0x3a, 0x5f, 0x7a, 0xad, 0x9f, 0x4b, 0xaf, + 0x35, 0xda, 0xfb, 0x34, 0x3b, 0x99, 0x7e, 0x39, 0xe8, 0x4c, 0xf2, 0xa3, 0xee, 0x85, 0x4d, 0x39, + 0x7d, 0xf9, 0x6c, 0x32, 0x1d, 0xcf, 0xe6, 0xdd, 0x86, 0xdd, 0x39, 0x58, 0x2f, 0x7f, 0xbc, 0xf8, + 0x1d, 0x00, 0x00, 0xff, 0xff, 0x80, 0x93, 0x47, 0x03, 0x61, 0x03, 0x00, 0x00, } diff --git a/protocol/lib/metrics/constants.go b/protocol/lib/metrics/constants.go index dff52b62c0..c988e626aa 100644 --- a/protocol/lib/metrics/constants.go +++ b/protocol/lib/metrics/constants.go @@ -302,7 +302,6 @@ const ( // Liquidation. ConstructLiquidationOrder = "construct_liquidation_order" - InsuranceFundBalance = "insurance_fund_balance" InsuranceFundDelta = "insurance_fund_delta" Liquidations = "liquidations" MaybeGetLiquidationOrder = "maybe_get_liquidation_order" diff --git a/protocol/lib/metrics/lib.go b/protocol/lib/metrics/lib.go new file mode 100644 index 0000000000..bd67d1c41e --- /dev/null +++ b/protocol/lib/metrics/lib.go @@ -0,0 +1,92 @@ +package metrics + +import ( + "time" + + gometrics "github.com/armon/go-metrics" + "github.com/cosmos/cosmos-sdk/telemetry" +) + +// This file provides a main entrypoint for logging in the v4 protocol. +// TODO(CLOB-1013) Drop both metrics libraries above for a library +// that supports float64 (i.e hashicorp go-metrics) + +type Label = gometrics.Label + +// IncrCounterWithLabels provides a wrapper functionality for emitting a counter +// metric with global labels (if any) along with the provided labels. +func IncrCounterWithLabels(key string, val float32, labels ...Label) { + telemetry.IncrCounterWithLabels([]string{key}, val, labels) +} + +// IncrCounter provides a wrapper functionality for emitting a counter +// metric with global labels (if any). +func IncrCounter(key string, val float32) { + telemetry.IncrCounterWithLabels([]string{key}, val, []gometrics.Label{}) +} + +// SetGaugeWithLabels provides a wrapper functionality for emitting a gauge +// metric with global labels (if any) along with the provided labels. +func SetGaugeWithLabels(key string, val float32, labels ...gometrics.Label) { + telemetry.SetGaugeWithLabels([]string{key}, val, labels) +} + +// SetGauge provides a wrapper functionality for emitting a gauge +// metric with global labels (if any). +func SetGauge(key string, val float32) { + telemetry.SetGaugeWithLabels([]string{key}, val, []gometrics.Label{}) +} + +// AddSampleWithLabels provides a wrapper functionality for emitting a sample +// metric with the provided labels. +func AddSampleWithLabels(key string, val float32, labels ...gometrics.Label) { + gometrics.AddSampleWithLabels( + []string{key}, + val, + labels, + ) +} + +// AddSample provides a wrapper functionality for emitting a sample +// metric. +func AddSample(key string, val float32) { + gometrics.AddSampleWithLabels( + []string{key}, + val, + []gometrics.Label{}, + ) +} + +// ModuleMeasureSince provides a wrapper functionality for emitting a time measure +// metric with global labels (if any). +// Please try to use `AddSample` instead. +// TODO(CLOB-1022) Roll our own calculations for timing on top of AddSample instead +// of using MeasureSince. +func ModuleMeasureSince(module string, key string, start time.Time) { + telemetry.ModuleMeasureSince( + module, + start, + key, + ) +} + +// ModuleMeasureSinceWithLabels provides a short hand method for emitting a time measure +// metric for a module with labels. Global labels are not included in this metric. +// Please try to use `AddSampleWithLabels` instead. +// TODO(CLOB-1022) Roll our own calculations for timing on top of AddSample instead +// of using MeasureSince. +func ModuleMeasureSinceWithLabels( + module string, + keys []string, + start time.Time, + labels []gometrics.Label, +) { + gometrics.MeasureSinceWithLabels( + keys, + start.UTC(), + append( + []gometrics.Label{telemetry.NewLabel(telemetry.MetricLabelNameModule, module)}, + labels..., + ), + ) +} diff --git a/protocol/lib/metrics/metric_keys.go b/protocol/lib/metrics/metric_keys.go new file mode 100644 index 0000000000..1be6e8f717 --- /dev/null +++ b/protocol/lib/metrics/metric_keys.go @@ -0,0 +1,42 @@ +// nolint:lll +package metrics + +// Metrics Keys Guidelines +// 1. Be wary of length +// 2. Prefix by module +// 3. Suffix keys with a unit of measurement +// 4. Delimit with '_' +// 5. Information such as callback type should be added as tags, not in key names. +// Example: clob_place_order_count, clob_msg_place_order_latency_ms, clob_operations_queue_length +// clob_expired_stateful_orders_count, clob_processed_orders_ms_total + +// Clob Metrics Keys +const ( + // Stats + ClobExpiredStatefulOrders = "clob_expired_stateful_order_removed" + ClobPrepareCheckStateCannotDeleverageSubaccount = "clob_prepare_check_state_cannot_deleverage_subaccount" + ClobDeleverageSubaccountTotalQuoteQuantums = "clob_deleverage_subaccount_total_quote_quantums" + ClobDeleverageSubaccount = "clob_deleverage_subaccount" + LiquidationsPlacePerpetualLiquidationQuoteQuantums = "liquidations_place_perpetual_liquidation_quote_quantums" + LiquidationsLiquidationMatchNegativeTNC = "liquidations_liquidation_match_negative_tnc" + ClobMevErrorCount = "clob_mev_error_count" + + // Gauges + InsuranceFundBalance = "insurance_fund_balance" + ClobMev = "clob_mev" + + // Samples + ClobDeleverageSubaccountTotalQuoteQuantumsDistribution = "clob_deleverage_subaccount_total_quote_quantums_distribution" + DeleveragingPercentFilledDistribution = "deleveraging_percent_filled_distribution" + ClobDeleveragingNumSubaccountsIteratedCount = "clob_deleveraging_num_subaccounts_iterated_count" + ClobDeleveragingNonOverlappingBankrupcyPricesCount = "clob_deleveraging_non_overlapping_bankruptcy_prices_count" + ClobDeleveragingNoOpenPositionOnOppositeSideCount = "clob_deleveraging_no_open_position_on_opposite_side_count" + ClobDeleverageSubaccountFilledQuoteQuantums = "clob_deleverage_subaccount_filled_quote_quantums" + LiquidationsLiquidatableSubaccountIdsCount = "liquidations_liquidatable_subaccount_ids_count" + LiquidationsPercentFilledDistribution = "liquidations_percent_filled_distribution" + LiquidationsPlacePerpetualLiquidationQuoteQuantumsDistribution = "liquidations_place_perpetual_liquidation_quote_quantums_distribution" + + // Measure Since + ClobOffsettingSubaccountPerpetualPosition = "clob_offsetting_subaccount_perpetual_position" + MevLatency = "mev_latency" +) diff --git a/protocol/lib/metrics/util.go b/protocol/lib/metrics/util.go index 3d7d71682b..cd16b4261b 100644 --- a/protocol/lib/metrics/util.go +++ b/protocol/lib/metrics/util.go @@ -3,7 +3,6 @@ package metrics import ( "math/big" "strconv" - "time" sdk "github.com/cosmos/cosmos-sdk/types" @@ -68,25 +67,6 @@ func GetMetricValueFromBigInt(i *big.Int) float32 { return r } -// ModuleMeasureSinceWithLabels provides a short hand method for emitting a time measure -// metric for a module with a given set of keys and labels. -// NOTE: global labels are not included in this metric. -func ModuleMeasureSinceWithLabels( - module string, - keys []string, - start time.Time, - labels []gometrics.Label, -) { - gometrics.MeasureSinceWithLabels( - keys, - start.UTC(), - append( - []gometrics.Label{telemetry.NewLabel(telemetry.MetricLabelNameModule, module)}, - labels..., - ), - ) -} - // GetCallbackMetricFromCtx determines the callback metric based on the context. Note that DeliverTx is implied // if the context is not CheckTx or ReCheckTx. This function is unable to account for other callbacks like // PrepareCheckState or EndBlocker. diff --git a/protocol/x/clob/abci.go b/protocol/x/clob/abci.go index f8e89134ce..b22303d983 100644 --- a/protocol/x/clob/abci.go +++ b/protocol/x/clob/abci.go @@ -4,7 +4,6 @@ import ( "fmt" "time" - gometrics "github.com/armon/go-metrics" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" liquidationtypes "github.com/dydxprotocol/v4-chain/protocol/daemons/server/types/liquidations" @@ -63,10 +62,10 @@ func EndBlocker( ), ), ) - telemetry.IncrCounterWithLabels( - []string{types.ModuleName, metrics.Expired, metrics.StatefulOrderRemoved, metrics.Count}, + metrics.IncrCounterWithLabels( + metrics.ClobExpiredStatefulOrders, 1, - orderId.GetOrderIdLabels(), + orderId.GetOrderIdLabels()..., ) } @@ -108,10 +107,9 @@ func EndBlocker( keeper.PruneRateLimits(ctx) // Emit relevant metrics at the end of every block. - telemetry.SetGaugeWithLabels( - []string{metrics.InsuranceFundBalance}, + metrics.SetGauge( + metrics.InsuranceFundBalance, metrics.GetMetricValueFromBigInt(keeper.GetInsuranceFundBalance(ctx)), - []gometrics.Label{}, ) } diff --git a/protocol/x/clob/keeper/deleveraging.go b/protocol/x/clob/keeper/deleveraging.go index 2f1e08269d..ec03bcd429 100644 --- a/protocol/x/clob/keeper/deleveraging.go +++ b/protocol/x/clob/keeper/deleveraging.go @@ -11,8 +11,6 @@ import ( errorsmod "cosmossdk.io/errors" - gometrics "github.com/armon/go-metrics" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/dydxprotocol/v4-chain/protocol/lib" "github.com/dydxprotocol/v4-chain/protocol/lib/metrics" @@ -42,11 +40,9 @@ func (k Keeper) MaybeDeleverageSubaccount( // Early return to skip deleveraging if the subaccount can't be deleveraged. if !canPerformDeleveraging { - telemetry.IncrCounter( + metrics.IncrCounter( + metrics.ClobPrepareCheckStateCannotDeleverageSubaccount, 1, - types.ModuleName, - metrics.PrepareCheckState, - metrics.CannotDeleverageSubaccount, ) return new(big.Int), nil } @@ -68,7 +64,7 @@ func (k Keeper) MaybeDeleverageSubaccount( deltaQuantums := new(big.Int).Neg(position.GetBigQuantums()) quantumsDeleveraged, err = k.MemClob.DeleverageSubaccount(ctx, subaccountId, perpetualId, deltaQuantums) - labels := []gometrics.Label{ + labels := []metrics.Label{ metrics.GetLabelForIntValue(metrics.PerpetualId, int(perpetualId)), metrics.GetLabelForBoolValue(metrics.IsLong, deltaQuantums.Sign() == -1), } @@ -80,22 +76,27 @@ func (k Keeper) MaybeDeleverageSubaccount( labels = append(labels, metrics.GetLabelForStringValue(metrics.Status, metrics.PartiallyFilled)) } // Record the status of the deleveraging operation. - telemetry.IncrCounterWithLabels([]string{types.ModuleName, metrics.DeleverageSubaccount}, 1, labels) + metrics.IncrCounterWithLabels( + metrics.ClobDeleverageSubaccount, + 1, + labels..., + ) if quoteQuantums, err := k.perpetualsKeeper.GetNetNotional( ctx, perpetualId, new(big.Int).Abs(deltaQuantums), ); err == nil { - telemetry.IncrCounterWithLabels( - []string{types.ModuleName, metrics.DeleverageSubaccount, metrics.TotalQuoteQuantums}, + metrics.IncrCounterWithLabels( + metrics.ClobDeleverageSubaccountTotalQuoteQuantums, metrics.GetMetricValueFromBigInt(quoteQuantums), - labels, + labels..., ) - gometrics.AddSampleWithLabels( - []string{types.ModuleName, metrics.DeleverageSubaccount, metrics.TotalQuoteQuantums, metrics.Distribution}, + + metrics.AddSampleWithLabels( + metrics.ClobDeleverageSubaccountTotalQuoteQuantumsDistribution, metrics.GetMetricValueFromBigInt(quoteQuantums), - labels, + labels..., ) } @@ -104,10 +105,11 @@ func (k Keeper) MaybeDeleverageSubaccount( new(big.Float).SetInt(new(big.Int).Abs(quantumsDeleveraged)), new(big.Float).SetInt(new(big.Int).Abs(deltaQuantums)), ).Float32() - gometrics.AddSampleWithLabels( - []string{metrics.Deleveraging, metrics.PercentFilled, metrics.Distribution}, + + metrics.AddSampleWithLabels( + metrics.DeleveragingPercentFilledDistribution, percentFilled, - labels, + labels..., ) return quantumsDeleveraged, err @@ -196,11 +198,10 @@ func (k Keeper) OffsetSubaccountPerpetualPosition( fills []types.MatchPerpetualDeleveraging_Fill, deltaQuantumsRemaining *big.Int, ) { - defer telemetry.ModuleMeasureSince( + defer metrics.ModuleMeasureSince( types.ModuleName, + metrics.ClobOffsettingSubaccountPerpetualPosition, time.Now(), - types.ModuleName, - metrics.OffsettingSubaccountPerpetualPosition, ) numSubaccountsIterated := uint32(0) @@ -282,29 +283,25 @@ func (k Keeper) OffsetSubaccountPerpetualPosition( k.GetPseudoRand(ctx), ) - labels := []gometrics.Label{ + labels := []metrics.Label{ metrics.GetLabelForIntValue(metrics.PerpetualId, int(perpetualId)), } - gometrics.AddSampleWithLabels( - []string{ - types.ModuleName, metrics.Deleveraging, metrics.NumSubaccountsIterated, metrics.Count, - }, + + metrics.AddSampleWithLabels( + metrics.ClobDeleveragingNumSubaccountsIteratedCount, float32(numSubaccountsIterated), - labels, + labels..., ) - gometrics.AddSampleWithLabels( - []string{ - types.ModuleName, metrics.Deleveraging, metrics.NonOverlappingBankruptcyPrices, metrics.Count, - }, + + metrics.AddSampleWithLabels( + metrics.ClobDeleveragingNonOverlappingBankrupcyPricesCount, float32(numSubaccountsWithNonOverlappingBankruptcyPrices), - labels, + labels..., ) - gometrics.AddSampleWithLabels( - []string{ - types.ModuleName, metrics.Deleveraging, metrics.NoOpenPositionOnOppositeSide, metrics.Count, - }, + metrics.AddSampleWithLabels( + metrics.ClobDeleveragingNoOpenPositionOnOppositeSideCount, float32(numSubaccountsWithNoOpenPositionOnOppositeSide), - labels, + labels..., ) return fills, deltaQuantumsRemaining } @@ -435,15 +432,16 @@ func (k Keeper) ProcessDeleveraging( perpetualId, new(big.Int).Abs(deltaQuantums), ); err == nil { - labels := []gometrics.Label{ + labels := []metrics.Label{ metrics.GetLabelForIntValue(metrics.PerpetualId, int(perpetualId)), metrics.GetLabelForBoolValue(metrics.CheckTx, ctx.IsCheckTx()), metrics.GetLabelForBoolValue(metrics.IsLong, deltaQuantums.Sign() == -1), } - gometrics.AddSampleWithLabels( - []string{types.ModuleName, metrics.DeleverageSubaccount, metrics.Filled, metrics.QuoteQuantums}, + + metrics.AddSampleWithLabels( + metrics.ClobDeleverageSubaccountFilledQuoteQuantums, metrics.GetMetricValueFromBigInt(deleveragedQuoteQuantums), - labels, + labels..., ) } diff --git a/protocol/x/clob/keeper/liquidations.go b/protocol/x/clob/keeper/liquidations.go index eb5d4190b8..8017370cfa 100644 --- a/protocol/x/clob/keeper/liquidations.go +++ b/protocol/x/clob/keeper/liquidations.go @@ -10,7 +10,6 @@ import ( errorsmod "cosmossdk.io/errors" - gometrics "github.com/armon/go-metrics" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/dydxprotocol/v4-chain/protocol/lib" @@ -28,12 +27,8 @@ func (k Keeper) LiquidateSubaccountsAgainstOrderbook( ) error { lib.AssertCheckTxMode(ctx) - gometrics.AddSample( - []string{ - metrics.Liquidations, - metrics.LiquidatableSubaccountIds, - metrics.Count, - }, + metrics.AddSample( + metrics.LiquidationsLiquidatableSubaccountIdsCount, float32(len(subaccountIds)), ) @@ -284,7 +279,7 @@ func (k Keeper) PlacePerpetualLiquidation( perpetualId, ) - labels := []gometrics.Label{ + labels := []metrics.Label{ metrics.GetLabelForIntValue(metrics.PerpetualId, int(perpetualId)), } if liquidationOrder.IsBuy() { @@ -298,10 +293,11 @@ func (k Keeper) PlacePerpetualLiquidation( new(big.Float).SetUint64(orderSizeOptimisticallyFilledFromMatchingQuantums.ToUint64()), new(big.Float).SetUint64(liquidationOrder.GetBaseQuantums().ToUint64()), ).Float32() - gometrics.AddSampleWithLabels( - []string{metrics.Liquidations, metrics.PercentFilled, metrics.Distribution}, + + metrics.AddSampleWithLabels( + metrics.LiquidationsPercentFilledDistribution, percentFilled, - labels, + labels..., ) if orderSizeOptimisticallyFilledFromMatchingQuantums == 0 { @@ -324,15 +320,16 @@ func (k Keeper) PlacePerpetualLiquidation( perpetualId, liquidationOrder.GetBaseQuantums().ToBigInt(), ); err == nil { - telemetry.IncrCounterWithLabels( - []string{metrics.Liquidations, metrics.PlacePerpetualLiquidation, metrics.QuoteQuantums}, + metrics.IncrCounterWithLabels( + metrics.LiquidationsPlacePerpetualLiquidationQuoteQuantums, metrics.GetMetricValueFromBigInt(totalQuoteQuantums), - labels, + labels..., ) - gometrics.AddSampleWithLabels( - []string{metrics.Liquidations, metrics.PlacePerpetualLiquidation, metrics.QuoteQuantums, metrics.Distribution}, + + metrics.AddSampleWithLabels( + metrics.LiquidationsPlacePerpetualLiquidationQuoteQuantumsDistribution, metrics.GetMetricValueFromBigInt(totalQuoteQuantums), - labels, + labels..., ) } @@ -581,19 +578,18 @@ func (k Keeper) GetFillablePrice( if !ctx.IsCheckTx() && !ctx.IsReCheckTx() { callback = metrics.DeliverTx } - telemetry.IncrCounterWithLabels( - []string{metrics.Liquidations, metrics.LiquidationMatchNegativeTNC}, + + metrics.IncrCounterWithLabels( + metrics.LiquidationsLiquidationMatchNegativeTNC, 1, - []gometrics.Label{ - metrics.GetLabelForIntValue( - metrics.PerpetualId, - int(perpetualId), - ), - metrics.GetLabelForStringValue( - metrics.Callback, - callback, - ), - }, + metrics.GetLabelForIntValue( + metrics.PerpetualId, + int(perpetualId), + ), + metrics.GetLabelForStringValue( + metrics.Callback, + callback, + ), ) ctx.Logger().Info( diff --git a/protocol/x/clob/keeper/mev.go b/protocol/x/clob/keeper/mev.go index f1015c4ecb..870dc0e0f1 100644 --- a/protocol/x/clob/keeper/mev.go +++ b/protocol/x/clob/keeper/mev.go @@ -6,8 +6,6 @@ import ( "runtime/debug" "time" - gometrics "github.com/armon/go-metrics" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/dydxprotocol/v4-chain/protocol/app/process" "github.com/dydxprotocol/v4-chain/protocol/lib" @@ -60,7 +58,11 @@ func (k Keeper) RecordMevMetrics( perpetualKeeper process.ProcessPerpetualKeeper, msgProposedOperations *types.MsgProposedOperations, ) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), metrics.Mev, metrics.Latency) + defer metrics.ModuleMeasureSince( + types.ModuleName, + metrics.MevLatency, + time.Now(), + ) // Recover from any panics that occur during MEV calculation. defer func() { @@ -99,7 +101,10 @@ func (k Keeper) RecordMevMetrics( msgProposedOperations.GetOperationsQueue(), ), ) - telemetry.IncrCounter(1, types.ModuleName, metrics.Mev, metrics.Error, metrics.Count) + metrics.IncrCounter( + metrics.ClobMevErrorCount, + 1, + ) return } if err := k.CalculateSubaccountPnLForMevMatches( @@ -114,7 +119,10 @@ func (k Keeper) RecordMevMetrics( blockProposerMevMatches, ), ) - telemetry.IncrCounter(1, types.ModuleName, metrics.Mev, metrics.Error, metrics.Count) + metrics.IncrCounter( + metrics.ClobMevErrorCount, + 1, + ) return } @@ -132,7 +140,10 @@ func (k Keeper) RecordMevMetrics( k.GetOperations(ctx).GetOperationsQueue(), ), ) - telemetry.IncrCounter(1, types.ModuleName, metrics.Mev, metrics.Error, metrics.Count) + metrics.IncrCounter( + metrics.ClobMevErrorCount, + 1, + ) return } if err := k.CalculateSubaccountPnLForMevMatches( @@ -147,7 +158,10 @@ func (k Keeper) RecordMevMetrics( validatorMevMatches, ), ) - telemetry.IncrCounter(1, types.ModuleName, metrics.Mev, metrics.Error, metrics.Count) + metrics.IncrCounter( + metrics.ClobMevErrorCount, + 1, + ) return } @@ -220,7 +234,10 @@ func (k Keeper) RecordMevMetrics( consensusRound, ok := ctx.Value(process.ConsensusRound).(int64) if !ok { k.Logger(ctx).Error("Failed to get consensus round") - telemetry.IncrCounter(1, types.ModuleName, metrics.Mev, metrics.Error, metrics.Count) + metrics.IncrCounter( + metrics.ClobMevErrorCount, + 1, + ) return } @@ -233,7 +250,10 @@ func (k Keeper) RecordMevMetrics( "proposer", proposerConsAddress.String(), ) - telemetry.IncrCounter(1, types.ModuleName, metrics.Mev, metrics.Error, metrics.Count) + metrics.IncrCounter( + metrics.ClobMevErrorCount, + 1, + ) return } @@ -280,19 +300,17 @@ func (k Keeper) RecordMevMetrics( ).String(), ) - telemetry.SetGaugeWithLabels( - []string{types.ModuleName, metrics.Mev}, + metrics.SetGaugeWithLabels( + metrics.ClobMev, mev, - []gometrics.Label{ - metrics.GetLabelForStringValue( - metrics.Proposer, - proposer.Description.Moniker, - ), - metrics.GetLabelForIntValue( - metrics.ClobPairId, - int(clobPairId.ToUint32()), - ), - }, + metrics.GetLabelForStringValue( + metrics.Proposer, + proposer.Description.Moniker, + ), + metrics.GetLabelForIntValue( + metrics.ClobPairId, + int(clobPairId.ToUint32()), + ), ) validatorVolumeQuoteQuantumsPerMarket[clobPairId] = new(big.Int).Div( diff --git a/protocol/x/clob/types/clob_pair.pb.go b/protocol/x/clob/types/clob_pair.pb.go index 46f2ee4077..49eab1563e 100644 --- a/protocol/x/clob/types/clob_pair.pb.go +++ b/protocol/x/clob/types/clob_pair.pb.go @@ -43,6 +43,11 @@ const ( // Clob pairs in this state only accept orders which are // both short-term and post-only. ClobPair_STATUS_INITIALIZING ClobPair_Status = 5 + // STATUS_FINAL_SETTLEMENT represents a clob pair which is deactivated + // and trading has ceased. All open positions will be closed by the + // protocol. Open stateful orders will be cancelled. Open short-term + // orders will be left to expire. + ClobPair_STATUS_FINAL_SETTLEMENT ClobPair_Status = 6 ) var ClobPair_Status_name = map[int32]string{ @@ -52,15 +57,17 @@ var ClobPair_Status_name = map[int32]string{ 3: "STATUS_CANCEL_ONLY", 4: "STATUS_POST_ONLY", 5: "STATUS_INITIALIZING", + 6: "STATUS_FINAL_SETTLEMENT", } var ClobPair_Status_value = map[string]int32{ - "STATUS_UNSPECIFIED": 0, - "STATUS_ACTIVE": 1, - "STATUS_PAUSED": 2, - "STATUS_CANCEL_ONLY": 3, - "STATUS_POST_ONLY": 4, - "STATUS_INITIALIZING": 5, + "STATUS_UNSPECIFIED": 0, + "STATUS_ACTIVE": 1, + "STATUS_PAUSED": 2, + "STATUS_CANCEL_ONLY": 3, + "STATUS_POST_ONLY": 4, + "STATUS_INITIALIZING": 5, + "STATUS_FINAL_SETTLEMENT": 6, } func (x ClobPair_Status) String() string { @@ -323,40 +330,41 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/clob/clob_pair.proto", fileDescriptor_178b475635886947) } var fileDescriptor_178b475635886947 = []byte{ - // 521 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xd1, 0x6b, 0xd3, 0x40, - 0x1c, 0xc7, 0x93, 0xae, 0xab, 0xe3, 0xb6, 0xd6, 0xf4, 0x74, 0xae, 0x22, 0x84, 0x2e, 0xfa, 0x50, - 0x44, 0x53, 0x98, 0xe2, 0xc3, 0x1e, 0x84, 0x34, 0x8b, 0x2e, 0x50, 0xbb, 0x98, 0xa4, 0x82, 0x43, - 0x08, 0x97, 0xe4, 0x70, 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 0xf8, 0x18, 0x28, 0x0b, 0xf5, 0xcc, 0xf3, 0xe7, 0xb4, 0x0a, 0x0f, 0xc0, 0xa3, - 0x92, 0xda, 0x03, 0xdb, 0xb7, 0x8d, 0xbe, 0x7d, 0x6e, 0x0f, 0x3e, 0x2a, 0xdb, 0x3d, 0x00, 0x76, - 0x16, 0x17, 0xd6, 0x73, 0x7e, 0x4f, 0x55, 0xf9, 0x76, 0xaa, 0xca, 0x7f, 0xa7, 0xaa, 0xfc, 0x73, - 0xa6, 0x4a, 0xb7, 0x33, 0x55, 0xfa, 0x33, 0x53, 0xa5, 0xf3, 0x77, 0xdf, 0x13, 0x7e, 0x91, 0x87, - 0x7a, 0x44, 0xc6, 0xdd, 0x3b, 0x8f, 0xe7, 0xfa, 0xed, 0xeb, 0xe8, 0x02, 0x25, 0x69, 0x77, 0x49, - 0x26, 0xf3, 0x07, 0xc5, 0x6f, 0x28, 0x66, 0x61, 0x4d, 0xe0, 0x37, 0xff, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xc5, 0xb8, 0x66, 0x12, 0x72, 0x03, 0x00, 0x00, + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xc1, 0x6a, 0xdb, 0x30, + 0x1c, 0xc6, 0xed, 0x34, 0xcd, 0x8a, 0xda, 0x64, 0x8e, 0xb6, 0x2e, 0x19, 0x05, 0x93, 0x7a, 0x3b, + 0x84, 0xb1, 0x39, 0xd0, 0x8d, 0x1d, 0x7a, 0x18, 0x38, 0xae, 0xbb, 0x1a, 0x52, 0xd7, 0xb3, 0x9d, + 0xc1, 0xca, 0xc0, 0xc8, 0xb6, 0x58, 0x4d, 0x13, 0xcb, 0xb5, 0xe4, 0x92, 0xbe, 0xc5, 0x9e, 0x63, + 0x4f, 0xb2, 0x63, 0x8f, 0x3b, 0x8e, 0xe4, 0x45, 0x86, 0x15, 0x27, 0x4b, 0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b, 0xd3, 0xfa, 0x2c, 0x6d, 0xc3, 0x03, 0xd0, + 0x2a, 0x85, 0x53, 0xd3, 0xd2, 0x06, 0xbe, 0x6b, 0x78, 0xde, 0xc0, 0x38, 0x37, 0x2c, 0x4f, 0xaa, + 0xf5, 0x01, 0xd8, 0x59, 0xdc, 0x66, 0xdf, 0xfe, 0x3d, 0x95, 0xc5, 0xfb, 0xa9, 0x2c, 0xfe, 0x9d, + 0xca, 0xe2, 0xcf, 0x99, 0x2c, 0xdc, 0xcf, 0x64, 0xe1, 0xcf, 0x4c, 0x16, 0x2e, 0x3f, 0xfe, 0x88, + 0xd9, 0x55, 0x1e, 0xa8, 0x21, 0x19, 0xf7, 0x1e, 0xbc, 0xac, 0xdb, 0x0f, 0xef, 0xc2, 0x2b, 0x14, + 0x27, 0xbd, 0x25, 0x99, 0xcc, 0x5f, 0x1b, 0xbb, 0x4b, 0x31, 0x0d, 0x6a, 0x1c, 0xbf, 0xff, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x96, 0xa7, 0xc6, 0x50, 0x8f, 0x03, 0x00, 0x00, } func (m *PerpetualClobMetadata) Marshal() (dAtA []byte, err error) { diff --git a/protocol/x/clob/types/matches.pb.go b/protocol/x/clob/types/matches.pb.go index 4ccfd0ebee..7eb76a91c3 100644 --- a/protocol/x/clob/types/matches.pb.go +++ b/protocol/x/clob/types/matches.pb.go @@ -339,6 +339,11 @@ type MatchPerpetualDeleveraging struct { PerpetualId uint32 `protobuf:"varint,2,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` // An ordered list of fills created by this liquidation. Fills []MatchPerpetualDeleveraging_Fill `protobuf:"bytes,3,rep,name=fills,proto3" json:"fills"` + // Flag denoting whether the deleveraging operation was for the purpose + // of final settlement. Final settlement matches are at the oracle price, + // whereas deleveraging happens at the bankruptcy price of the deleveraged + // subaccount. + IsFinalSettlement bool `protobuf:"varint,4,opt,name=is_final_settlement,json=isFinalSettlement,proto3" json:"is_final_settlement,omitempty"` } func (m *MatchPerpetualDeleveraging) Reset() { *m = MatchPerpetualDeleveraging{} } @@ -395,6 +400,13 @@ func (m *MatchPerpetualDeleveraging) GetFills() []MatchPerpetualDeleveraging_Fil return nil } +func (m *MatchPerpetualDeleveraging) GetIsFinalSettlement() bool { + if m != nil { + return m.IsFinalSettlement + } + return false +} + // Fill represents a fill between the liquidated and offsetting subaccount. type MatchPerpetualDeleveraging_Fill struct { // ID of the subaccount that was used to offset the liquidated subaccount's @@ -465,44 +477,46 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/clob/matches.proto", fileDescriptor_a5aa660bc05a1de4) } var fileDescriptor_a5aa660bc05a1de4 = []byte{ - // 592 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xb6, 0xdd, 0x24, 0xbf, 0x5f, 0xc6, 0x29, 0x12, 0x16, 0x20, 0xd7, 0xb4, 0x4e, 0xc8, 0x01, - 0x05, 0x89, 0x3a, 0x52, 0x40, 0x88, 0x2b, 0x29, 0xaa, 0x52, 0xa9, 0x85, 0xc8, 0xbd, 0x71, 0xb1, - 0xfc, 0x67, 0xe3, 0xac, 0xb0, 0xbd, 0xa9, 0xbd, 0xae, 0x9a, 0xbe, 0x44, 0x79, 0x02, 0x9e, 0x84, - 0x07, 0xe8, 0xb1, 0x47, 0x4e, 0x08, 0x25, 0x0f, 0xc0, 0x2b, 0xa0, 0x5d, 0x27, 0xb1, 0x93, 0x34, - 0x82, 0x48, 0xdc, 0xd6, 0xdf, 0xcc, 0x7c, 0xfb, 0xcd, 0xb7, 0x33, 0x86, 0xba, 0x37, 0xf6, 0xae, - 0x46, 0x31, 0xa1, 0xc4, 0x25, 0x41, 0xdb, 0x0d, 0x88, 0xd3, 0x0e, 0x6d, 0xea, 0x0e, 0x51, 0x62, - 0x70, 0x54, 0x79, 0x58, 0x4c,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0x78, 0x27, 0x9d, 0xad, 0xb6, 0xc3, 0x58, 0xeb, 0x4f, 0xbb, 0x11, 0xa1, 0xc4, 0x97, 0x60, 0x00, - 0x2a, 0x19, 0x0c, 0x12, 0x44, 0x29, 0x8e, 0x7c, 0x2b, 0x17, 0x9d, 0x4f, 0xe5, 0x76, 0x7d, 0x3d, - 0xc9, 0xd9, 0x8a, 0xd1, 0xd5, 0x65, 0x93, 0x56, 0x97, 0xad, 0xdb, 0xbf, 0x9d, 0xe8, 0xe2, 0xdd, - 0x44, 0x17, 0x7f, 0x4e, 0x74, 0xf1, 0xcb, 0x54, 0x17, 0xee, 0xa6, 0xba, 0xf0, 0x7d, 0xaa, 0x0b, - 0x9f, 0xde, 0xf8, 0x98, 0x0e, 0x53, 0xc7, 0x70, 0x49, 0xd8, 0x5e, 0xfa, 0x3b, 0x5e, 0xbe, 0x3e, - 0x74, 0x87, 0x36, 0x8e, 0xda, 0x0b, 0xe4, 0x2a, 0xfb, 0x63, 0xd2, 0xf1, 0x08, 0x25, 0x4e, 0x85, - 0xc3, 0xaf, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x86, 0x7f, 0x34, 0xa0, 0xc8, 0x05, 0x00, 0x00, + // 615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x4e, 0xdb, 0x40, + 0x10, 0xb6, 0xf3, 0x43, 0x61, 0x1c, 0x2a, 0xb1, 0xfd, 0x91, 0x71, 0xc1, 0xa4, 0x39, 0x54, 0x54, + 0x2a, 0x8e, 0x44, 0xab, 0xaa, 0xd7, 0x86, 0x0a, 0x81, 0x04, 0x2d, 0x32, 0xb7, 0x5e, 0x2c, 0xff, + 0x6c, 0xcc, 0xaa, 0x6b, 0x6f, 0xb0, 0xd7, 0x88, 0xf0, 0x12, 0xf4, 0x09, 0xda, 0x17, 0xe9, 0x03, + 0x70, 0xe4, 0xd8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x00, } func (m *ClobMatch) Marshal() (dAtA []byte, err error) { @@ -777,6 +791,16 @@ func (m *MatchPerpetualDeleveraging) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if m.IsFinalSettlement { + i-- + if m.IsFinalSettlement { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.Fills) > 0 { for iNdEx := len(m.Fills) - 1; iNdEx >= 0; iNdEx-- { { @@ -983,6 +1007,9 @@ func (m *MatchPerpetualDeleveraging) Size() (n int) { n += 1 + l + sovMatches(uint64(l)) } } + if m.IsFinalSettlement { + n += 2 + } return n } @@ -1689,6 +1716,26 @@ func (m *MatchPerpetualDeleveraging) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFinalSettlement", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMatches + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFinalSettlement = bool(v != 0) default: iNdEx = preIndex skippy, err := skipMatches(dAtA[iNdEx:]) diff --git a/protocol/x/clob/types/order_id.go b/protocol/x/clob/types/order_id.go index ee74f7aacf..8f629a1236 100644 --- a/protocol/x/clob/types/order_id.go +++ b/protocol/x/clob/types/order_id.go @@ -6,7 +6,6 @@ import ( errorsmod "cosmossdk.io/errors" - gometrics "github.com/armon/go-metrics" "github.com/dydxprotocol/v4-chain/protocol/lib/metrics" ) @@ -174,8 +173,8 @@ func MustSortAndHaveNoDuplicates(orderIds []OrderId) { } // GetOrderIdLabels returns the telemetry labels of this order ID. -func (o *OrderId) GetOrderIdLabels() []gometrics.Label { - return []gometrics.Label{ +func (o *OrderId) GetOrderIdLabels() []metrics.Label { + return []metrics.Label{ metrics.GetLabelForIntValue(metrics.OrderFlag, int(o.GetOrderFlags())), metrics.GetLabelForIntValue(metrics.ClobPairId, int(o.GetClobPairId())), }