Skip to main content

ExitPenalties

ExitPenalties is a supplementary contract that records exit-related penalties and charges for individual validators. It can track:

  • a delayed-exit penalty after the allowed exit window;
  • a bad-performance penalty reported by ValidatorStrikes;
  • the execution-layer withdrawal request fee paid for a non-voluntary triggered exit.

Applicable amounts and limits are obtained from ParametersRegistry for the Node Operator's bond curve. When a validator withdrawal is processed, CuratedModule applies the relevant penalties and charges to the Node Operator's bond through Accounting.

State Variables​

MODULE​

IBaseModule public immutable MODULE

PARAMETERS_REGISTRY​

IParametersRegistry public immutable PARAMETERS_REGISTRY

ACCOUNTING​

IAccounting public immutable ACCOUNTING

STRIKES​

address public immutable STRIKES

_exitPenaltyInfo​

mapping(bytes32 keyPointer => ExitPenaltyInfo info) private _exitPenaltyInfo

Functions​

onlyModule​

modifier onlyModule() ;

onlyStrikes​

modifier onlyStrikes() ;

constructor​

constructor(address module, address strikes) ;

processExitDelayReport​

Handles tracking and penalization logic for a validator that remains active beyond its eligible exit window.

See IStakingModule.reportValidatorExitDelay for details.

function processExitDelayReport(uint256 nodeOperatorId, bytes calldata publicKey, uint256 eligibleToExitInSec)
external
onlyModule;

Parameters

NameTypeDescription
nodeOperatorIduint256The ID of the node operator whose validator's status is being delivered.
publicKeybytesThe public key of the validator being reported.
eligibleToExitInSecuint256The duration (in seconds) indicating how long the validator has been eligible to exit but has not exited.

processTriggeredExit​

Process the triggered exit report

function processTriggeredExit(
uint256 nodeOperatorId,
bytes calldata publicKey,
uint256 elWithdrawalRequestFeePaid,
uint256 exitType
) external onlyModule;

Parameters

NameTypeDescription
nodeOperatorIduint256ID of the Node Operator
publicKeybytesPublic key of the validator
elWithdrawalRequestFeePaiduint256The fee paid for the withdrawal request
exitTypeuint256The type of the exit; only VOLUNTARY_EXIT_TYPE_ID skips recording EL withdrawal request fee

processStrikesReport​

Process the strikes report

function processStrikesReport(uint256 nodeOperatorId, bytes calldata publicKey) external onlyStrikes;

Parameters

NameTypeDescription
nodeOperatorIduint256ID of the Node Operator
publicKeybytesPublic key of the validator

isValidatorExitDelayPenaltyApplicable​

Determines whether a validator exit status should be updated and will have an effect on the Node Operator.

There is a onlyModule modifier to prevent using it from outside as it gives a false-positive information for non-existent node operators. Use isValidatorExitDelayPenaltyApplicable in the BaseModule.sol instead.

function isValidatorExitDelayPenaltyApplicable(
uint256 nodeOperatorId,
bytes calldata publicKey,
uint256 eligibleToExitInSec
) external view onlyModule returns (bool);

Parameters

NameTypeDescription
nodeOperatorIduint256The ID of the node operator.
publicKeybytesValidator's public key.
eligibleToExitInSecuint256The number of seconds the validator was eligible to exit but did not.

Returns

NameTypeDescription
<none>boolReturns true if contract should receive updated validator's status.

getExitPenaltyInfo​

Get delayed exit penalty info for the given Node Operator

function getExitPenaltyInfo(uint256 nodeOperatorId, bytes calldata publicKey)
external
view
returns (ExitPenaltyInfo memory);

Parameters

NameTypeDescription
nodeOperatorIduint256ID of the Node Operator
publicKeybytesPublic key of the validator

Returns

NameTypeDescription
<none>ExitPenaltyInfopenaltyInfo Delayed exit penalty info

_onlyModule​

function _onlyModule() internal view;

_onlyStrikes​

function _onlyStrikes() internal view;