Skip to main content

Ejector

Ejector is a supplementary contract that triggers validator exits through Lido's TriggerableWithdrawalsGateway (TWG) using EIP-7002 execution-layer withdrawal requests. It supports voluntary ejections initiated by Node Operators and forced ejections initiated by ValidatorStrikes for validators that have exceeded the strike threshold.

Upgradability​

The contract is immutable.

State Variables​

MODULE​

IBaseModule public immutable MODULE

STRIKES​

address public immutable STRIKES

stakingModuleId​

uint256 public stakingModuleId

Functions​

onlyStrikes​

modifier onlyStrikes() ;

constructor​

constructor(address module, address strikes, address admin) ;

voluntaryEject​

Request triggerable full withdrawals for Node Operator validator keys

Called by the node operator

function voluntaryEject(uint256 nodeOperatorId, uint256[] calldata keyIndices, address refundRecipient)
external
payable
whenResumed;

Parameters

NameTypeDescription
nodeOperatorIduint256ID of the Node Operator
keyIndicesuint256[]Array of indices of the keys to withdraw
refundRecipientaddressAddress to send the refund to

ejectBadPerformer​

Eject Node Operator's key as a bad performer

Called by the ValidatorStrikes contract. See ValidatorStrikes.processBadPerformanceProof to use this method permissionless

function ejectBadPerformer(uint256 nodeOperatorId, uint256 keyIndex, address refundRecipient)
external
payable
whenResumed
onlyStrikes;

Parameters

NameTypeDescription
nodeOperatorIduint256ID of the Node Operator
keyIndexuint256Index of deposited key to eject
refundRecipientaddressAddress to send the refund to

triggerableWithdrawalsGateway​

TriggerableWithdrawalsGateway implementation used by the contract.

function triggerableWithdrawalsGateway() public view returns (ITriggerableWithdrawalsGateway);

_getOrCacheStakingModuleId​

function _getOrCacheStakingModuleId() internal returns (uint256 moduleId);

_msgSenderIfEmpty​

function _msgSenderIfEmpty(address input) internal view returns (address);

_onlyStrikes​

function _onlyStrikes() internal view;

_onlyNodeOperatorOwner​

Verifies that the sender is the owner of the node operator

function _onlyNodeOperatorOwner(uint256 nodeOperatorId) internal view;

_onlyRecoverer​

function _onlyRecoverer() internal view override;

__checkRole​

function __checkRole(bytes32 role) internal view override;