Skip to content

Commit

Permalink
disable liquidation
Browse files Browse the repository at this point in the history
  • Loading branch information
jayy04 committed May 28, 2024
1 parent 0d5d594 commit 7162b72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
TestVolatileExchangeParams = VolatileExchangeParams{
AveragePrice: 100,
Amplitude: 0.95,
Frequency: 1,
Frequency: 24,
}
TestVolatileExchangeDetails = types.ExchangeQueryDetails{
Exchange: exchange_common.EXCHANGE_ID_TEST_VOLATILE_EXCHANGE,
Expand Down
10 changes: 5 additions & 5 deletions protocol/x/clob/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ func PrepareCheckState(
}

// 6. Get all potentially liquidatable subaccount IDs and attempt to liquidate them.
liquidatableSubaccountIds := keeper.DaemonLiquidationInfo.GetLiquidatableSubaccountIds()
_, err := keeper.LiquidateSubaccountsAgainstOrderbook(ctx, liquidatableSubaccountIds)
if err != nil {
panic(err)
}
// liquidatableSubaccountIds := keeper.DaemonLiquidationInfo.GetLiquidatableSubaccountIds()
// _, err := keeper.LiquidateSubaccountsAgainstOrderbook(ctx, liquidatableSubaccountIds)
// if err != nil {
// panic(err)
// }

// Add subaccounts with open positions in final settlement markets to the slice of subaccounts/perps
// to be deleveraged.
Expand Down
2 changes: 1 addition & 1 deletion protocol/x/clob/keeper/deleveraging.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (k Keeper) DeleverageEntireSubaccount(
subaccountId satypes.SubaccountId,
) {
metrics.IncrCounter(metrics.ClobNextTickDeleveragedSubaccount, 1)
k.Logger(ctx).Info(
k.Logger(ctx).Error(
"Next Tick Deleverage Subaccount",
"subaccountId", subaccountId,
"nextTickDeleverage", true,
Expand Down

0 comments on commit 7162b72

Please sign in to comment.