Skip to content

Commit

Permalink
Disable equity tier validation with height gating (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-dydx authored Oct 2, 2023
1 parent 1c30cda commit e80e8bd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions protocol/x/clob/keeper/orders.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package keeper

import (
errorsmod "cosmossdk.io/errors"
"fmt"
"math"
"math/big"
"time"

errorsmod "cosmossdk.io/errors"

"github.com/cometbft/cometbft/crypto/tmhash"
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -201,8 +202,10 @@ func (k Keeper) PlaceStatefulOrder(
}

// 3. Check that adding the order would not exceed the equity tier for the account.
if err := k.ValidateSubaccountEquityTierLimitForNewOrder(ctx, order); err != nil {
return err
if ctx.BlockHeight() < 956441 {
if err := k.ValidateSubaccountEquityTierLimitForNewOrder(ctx, order); err != nil {
return err
}
}

// 4. Perform a collateralization check for the full size of the order to mitigate spam.
Expand Down

0 comments on commit e80e8bd

Please sign in to comment.