Function: onSlash(uint256 slashedAmount, uint48 captureTimestamp)
This function slashes callback for burning collateral.
Inputs
slashedAmountControl: Completely controlled by the caller.
Constraints: N/A.
Impact: Amount to slash.
captureTimestampControl: Completely controlled by the caller.
Constraints: N/A.
Impact: Time when the stake was captured.
Branches and code coverage (including function calls)
Intended branches
Slashed amount of collateral is transferred to burner.
Active stake and the next epoch's withdrawals are slashed in proportion if
captureTimestampis in the current epoch.Active stake, current epoch's withdrawal, and next epoch's withdrawals are slashed in proportion if
captureTimestampis in the previous epoch.
Negative behavior
Reverts if
captureTimestampis not in the current or previous epoch.Reverts if the caller is not slasher.