diff --git a/x/lsnative/staking/keeper/slash.go b/x/lsnative/staking/keeper/slash.go index 834a3e3c2..14e9c8b4a 100644 --- a/x/lsnative/staking/keeper/slash.go +++ b/x/lsnative/staking/keeper/slash.go @@ -131,7 +131,12 @@ func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeigh validator = k.RemoveValidatorTokens(ctx, validator, tokensToBurn) // Proportionally deduct any liquid tokens from the global total - validatorLiquidRatio := validator.TotalLiquidShares.Quo(validator.DelegatorShares) + var validatorLiquidRatio sdk.Dec + if validator.TotalLiquidShares.IsNil() { + validatorLiquidRatio = sdk.ZeroDec() + } else { + validatorLiquidRatio = validator.TotalLiquidShares.Quo(validator.DelegatorShares) + } slashedLiquidTokens := validatorLiquidRatio.Mul(sdk.NewDecFromInt(slashAmount)).TruncateInt() k.DecreaseTotalLiquidStakedTokens(ctx, slashedLiquidTokens)