diff --git a/x/vaults/types/msgs.go b/x/vaults/types/msgs.go index 20b3c5a..0dc5b77 100644 --- a/x/vaults/types/msgs.go +++ b/x/vaults/types/msgs.go @@ -139,6 +139,10 @@ func (msg *MsgActiveCollateral) ValidateBasic() error { return fmt.Errorf("minCollateralRatio cannot be less than 0") } + if msg.StabilityFee.LTE(math.LegacyZeroDec()) { + return fmt.Errorf("StabilityFee cannot be less than 0") + } + if msg.LiquidationPenalty.LT(math.LegacyZeroDec()) { return fmt.Errorf("minCollateralRatio cannot be less than 0") } @@ -174,6 +178,10 @@ func (msg *MsgUpdatesCollateral) ValidateBasic() error { return fmt.Errorf("minCollateralRatio cannot be less than 0") } + if msg.StabilityFee.LTE(math.LegacyZeroDec()) { + return fmt.Errorf("StabilityFee cannot be less than 0") + } + if msg.LiquidationPenalty.LT(math.LegacyZeroDec()) { return fmt.Errorf("minCollateralRatio cannot be less than 0") } diff --git a/x/vaults/types/params.go b/x/vaults/types/params.go index 9292db5..d333699 100644 --- a/x/vaults/types/params.go +++ b/x/vaults/types/params.go @@ -13,7 +13,6 @@ var ( DefaultLiquidationPenalty = math.LegacyMustNewDecFromStr("0.05") DefaultMinInitialDebt = math.NewInt(50_000_000) DefaultRecalculateDebtPeriod = time.Hour - DefaultLiquidatePeriod = time.Hour DefaultMintDenom = []string{"nomUSD"} KeyMintingFee = []byte("MintingFee")