Skip to content

Commit

Permalink
update proto comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-dydx committed Dec 5, 2023
1 parent d7268ad commit b629cda
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ export interface MatchPerpetualDeleveraging {
/**
* Flag denoting whether the deleveraging operation was for the purpose
* of final settlement. Final settlement matches are at the oracle price,
* whereas deleveraging normally happens at the bankruptcy price.bool
* whereas deleveraging happens at the bankruptcy price of the deleveraged
* subaccount.
*/

isFinalSettlement: boolean;
Expand All @@ -153,7 +154,8 @@ export interface MatchPerpetualDeleveragingSDKType {
/**
* Flag denoting whether the deleveraging operation was for the purpose
* of final settlement. Final settlement matches are at the oracle price,
* whereas deleveraging normally happens at the bankruptcy price.bool
* whereas deleveraging happens at the bankruptcy price of the deleveraged
* subaccount.
*/

is_final_settlement: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ 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. */
Expand All @@ -474,6 +474,8 @@ export interface DeleveragingEventV1 {
/**
* `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;
Expand All @@ -499,7 +501,7 @@ 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. */
Expand All @@ -508,6 +510,8 @@ export interface DeleveragingEventV1SDKType {
/**
* `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;
Expand Down
3 changes: 2 additions & 1 deletion proto/dydxprotocol/clob/matches.proto
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ message MatchPerpetualDeleveraging {

// Flag denoting whether the deleveraging operation was for the purpose
// of final settlement. Final settlement matches are at the oracle price,
// whereas deleveraging normally happens at the bankruptcy price.bool
// whereas deleveraging happens at the bankruptcy price of the deleveraged
// subaccount.
bool is_final_settlement = 4;
}
4 changes: 3 additions & 1 deletion proto/dydxprotocol/indexer/events/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@ 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;
}

Expand Down
4 changes: 3 additions & 1 deletion protocol/indexer/events/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion protocol/x/clob/types/matches.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b629cda

Please sign in to comment.