diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index af9a5d9a6ab4..b7253b8d44f4 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -369,7 +369,7 @@ func (k msgServer) BeginRedelegate(ctx context.Context, msg *types.MsgBeginRedel } // If this is a validator self-bond, the new liquid delegation cannot fall below the self-bond * bond factor - // The delegation on the new validator will not a validator bond + // The delegation on the new validator will not be a validator bond if srcDelegation.ValidatorBond { if err := k.SafelyDecreaseValidatorBond(ctx, valSrcAddr, srcShares); err != nil { return nil, err diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 38d2c484fc75..95ba395ecfc8 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -414,6 +414,29 @@ func (k Keeper) SlashRedelegation(ctx context.Context, srcValidator types.Valida } } + delegation, err := k.GetDelegation(ctx, delegatorAddress, valDstAddr) + if err != nil { + return math.ZeroInt(), err + } + + // if the delegator holds a validator bond to destination validator, decrease the destination validator bond shares + if delegation.ValidatorBond { + if err := k.SafelyDecreaseValidatorBond(ctx, valDstAddr, math.LegacyDec(totalSlashAmount)); err != nil { + return math.ZeroInt(), err + } + } + + // if this delegation is from a liquid staking provider (identified if the delegator + // is an ICA account), the global and validator liquid totals should be decremented + if k.DelegatorIsLiquidStaker(delegatorAddress) { + if err := k.DecreaseTotalLiquidStakedTokens(ctx, totalSlashAmount); err != nil { + return math.ZeroInt(), err + } + if _, err := k.DecreaseValidatorLiquidShares(ctx, valDstAddr, math.LegacyDec(totalSlashAmount)); err != nil { + return math.ZeroInt(), err + } + } + if err := k.burnBondedTokens(ctx, bondedBurnedAmount); err != nil { return math.ZeroInt(), err }