Skip to content

Commit

Permalink
[feat][protocol]: gate withdrawals if negative TNC subaccount encount…
Browse files Browse the repository at this point in the history
…ered after liquidation and deleveraging steps (#936)
  • Loading branch information
lucas-dydx authored Jan 10, 2024
1 parent 2bfcb31 commit 04b7323
Show file tree
Hide file tree
Showing 11 changed files with 511 additions and 117 deletions.
19 changes: 10 additions & 9 deletions protocol/lib/metrics/metric_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ const (
LiquidationsPlacePerpetualLiquidationQuoteQuantumsDistribution = "liquidations_place_perpetual_liquidation_quote_quantums_distribution"

// Measure Since
ClobOffsettingSubaccountPerpetualPosition = "clob_offsetting_subaccount_perpetual_position"
DaemonGetPreviousBlockInfoLatency = "daemon_get_previous_block_info_latency"
DaemonGetAllMarketPricesLatency = "daemon_get_all_market_prices_latency"
DaemonGetMarketPricesPaginatedLatency = "daemon_get_market_prices_paginated_latency"
DaemonGetAllLiquidityTiersLatency = "daemon_get_all_liquidity_tiers_latency"
DaemonGetLiquidityTiersPaginatedLatency = "daemon_get_liquidity_tiers_paginated_latency"
DaemonGetAllPerpetualsLatency = "daemon_get_all_perpetuals_latency"
DaemonGetPerpetualsPaginatedLatency = "daemon_get_perpetuals_paginated_latency"
MevLatency = "mev_latency"
ClobOffsettingSubaccountPerpetualPosition = "clob_offsetting_subaccount_perpetual_position"
DaemonGetPreviousBlockInfoLatency = "daemon_get_previous_block_info_latency"
DaemonGetAllMarketPricesLatency = "daemon_get_all_market_prices_latency"
DaemonGetMarketPricesPaginatedLatency = "daemon_get_market_prices_paginated_latency"
DaemonGetAllLiquidityTiersLatency = "daemon_get_all_liquidity_tiers_latency"
DaemonGetLiquidityTiersPaginatedLatency = "daemon_get_liquidity_tiers_paginated_latency"
DaemonGetAllPerpetualsLatency = "daemon_get_all_perpetuals_latency"
DaemonGetPerpetualsPaginatedLatency = "daemon_get_perpetuals_paginated_latency"
MevLatency = "mev_latency"
GateWithdrawalsIfNegativeTncSubaccountSeen = "gate_withdrawals_if_negative_tnc_subaccount_seen"
)
72 changes: 22 additions & 50 deletions protocol/mocks/MemClob.go

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

Loading

0 comments on commit 04b7323

Please sign in to comment.