Function: onSlash(uint256 slashedAmount, uint48 captureTimestamp)
This function slashes callback for burning collateral.
Inputs
slashedAmount
Control: Completely controlled by the caller.
Constraints: N/A.
Impact: Amount to slash.
captureTimestamp
Control: 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
captureTimestamp
is in the current epoch.Active stake, current epoch's withdrawal, and next epoch's withdrawals are slashed in proportion if
captureTimestamp
is in the previous epoch.
Negative behavior
Reverts if
captureTimestamp
is not in the current or previous epoch.Reverts if the caller is not slasher.