RioLRTOperatorRegistry

RioLRTOperatorRegistry

Inherits: OwnableUpgradeable, UUPSUpgradeable, RioLRTCore, RioLRTOperatorRegistryStorageV1

State Variables

VALIDATOR_DETAILS_POSITION

The validator details storage position.

bytes32 internal constant VALIDATOR_DETAILS_POSITION = keccak256('RIO.OPERATOR_REGISTRY.VALIDATOR_DETAILS');

operatorDelegatorBeaconImpl

The operator beacon contract implementation.

address public immutable operatorDelegatorBeaconImpl;

delegationManager

The primary delegation contract for EigenLayer.

IDelegationManager public immutable delegationManager;

Functions

onlyOperatorManager

Require that the caller is the operator's manager.

modifier onlyOperatorManager(uint8 operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

onlyOperatorManagerOrSecurityDaemon

Require that the caller is the operator's manager OR the security daemon's wallet that has been configured by the security council.

modifier onlyOperatorManagerOrSecurityDaemon(uint8 operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

onlyOperatorManagerOrProofUploader

Require that the caller is the operator's manager OR the proof uploader

modifier onlyOperatorManagerOrProofUploader(uint8 operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

constructor

constructor(address issuer_, address initialBeaconOwner, address operatorDelegatorImpl_, address delegationManager_)
    RioLRTCore(issuer_);

Parameters

NameTypeDescription

issuer_

address

The LRT issuer that's authorized to deploy this contract.

initialBeaconOwner

address

The initial owner who can upgrade the operator beacon contract.

operatorDelegatorImpl_

address

The operator contract implementation.

delegationManager_

address

The primary delegation contract for EigenLayer.

initialize

Initializes the contract.

function initialize(address initialOwner, address token_) external initializer;

Parameters

NameTypeDescription

initialOwner

address

The initial owner of the contract.

token_

address

The address of the liquid restaking token.

operatorCount

Returns the total number of operators in the registry.

function operatorCount() external view returns (uint8);

activeOperatorCount

Returns the total number of active operators in the registry.

function activeOperatorCount() external view returns (uint8);

minStakerOptOutBlocks

The minimum acceptable delay between an operator signaling intent to register

function minStakerOptOutBlocks() external view returns (uint24);

securityDaemon

The security daemon, which is responsible for removal of duplicate or invalid validator keys.

function securityDaemon() external view returns (address);

validatorKeyReviewPeriod

The amount of time (in seconds) before uploaded validator keys are considered "vetted".

function validatorKeyReviewPeriod() external view returns (uint24);

getOperatorDetails

Returns the operator details for the provided operator ID.

function getOperatorDetails(uint8 operatorId) external view returns (OperatorPublicDetails memory);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

getOperatorShareDetails

Returns the operator's share details for the provided operator ID and strategy.

function getOperatorShareDetails(uint8 operatorId, address strategy)
    external
    view
    returns (OperatorShareDetails memory);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

strategy

address

The strategy to get the share details for.

isValidStrategyExitRootForOperator

Returns true if the exit root is valid for the provided operator ID.

function isValidStrategyExitRootForOperator(uint8 operatorId, bytes32 exitRoot) public view returns (bool);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

exitRoot

bytes32

The exit root to check.

addOperator

Adds a new operator to the registry, deploying a delegator contract and delegating to the provided operator address.

function addOperator(OperatorConfig calldata config) external onlyOwner returns (uint8 operatorId, address delegator);

Parameters

NameTypeDescription

config

OperatorConfig

The new operator's configuration.

activateOperator

Activates an operator.

function activateOperator(uint8 operatorId) external onlyOwner;

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

deactivateOperator

Deactivates an operator, exiting all remaining stake to the asset manager.

function deactivateOperator(uint8 operatorId) external onlyOwner;

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

completeOperatorStrategyExit

Completes an exit from an EigenLayer strategy for the provided operatorId.

function completeOperatorStrategyExit(
    uint8 operatorId,
    IDelegationManager.Withdrawal calldata queuedWithdrawal,
    uint256 middlewareTimesIndex
) external;

Parameters

NameTypeDescription

operatorId

uint8

The ID of the operator who is exiting the strategy.

queuedWithdrawal

IDelegationManager.Withdrawal

The queued strategy withdrawal for the operator.

middlewareTimesIndex

uint256

The index of the middleware times for the operator.

setOperatorStrategyShareCaps

Sets the operator's strategy share allocation caps.

function setOperatorStrategyShareCaps(uint8 operatorId, StrategyShareCap[] calldata newStrategyShareCaps)
    external
    onlyOwner;

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

newStrategyShareCaps

StrategyShareCap[]

The new strategy share allocation caps.

setOperatorValidatorCap

Sets the operator's maximum active validator cap.

function setOperatorValidatorCap(uint8 operatorId, uint40 newValidatorCap) external onlyOwner;

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

newValidatorCap

uint40

The new maximum active validator cap.

setSecurityDaemon

Sets the security daemon to a new account (newSecurityDaemon).

function setSecurityDaemon(address newSecurityDaemon) external onlyOwner;

Parameters

NameTypeDescription

newSecurityDaemon

address

The new security daemon address.

setProofUploader

Sets the proof uploader to a new account (newSecurityDaemon).

function setProofUploader(address newProofUploader) external onlyOwner;

Parameters

NameTypeDescription

newProofUploader

address

The new proof uploader address.

setMinStakerOptOutBlocks

Sets the minimum acceptable delay between an operator signaling intent to register

function setMinStakerOptOutBlocks(uint24 newMinStakerOptOutBlocks) external onlyOwner;

Parameters

NameTypeDescription

newMinStakerOptOutBlocks

uint24

The new min staker opt out blocks.

setValidatorKeyReviewPeriod

Sets the amount of time (in seconds) before uploaded validator keys are considered "vetted".

function setValidatorKeyReviewPeriod(uint24 newValidatorKeyReviewPeriod) external onlyOwner;

Parameters

NameTypeDescription

newValidatorKeyReviewPeriod

uint24

The new validator key review period.

setOperatorEarningsReceiver

Sets an operator's earnings receiver.

function setOperatorEarningsReceiver(uint8 operatorId, address newEarningsReceiver)
    external
    onlyOperatorManager(operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

newEarningsReceiver

address

The new reward address of the operator.

setOperatorPendingManager

Sets an operator's pending manager.

function setOperatorPendingManager(uint8 operatorId, address newPendingManager)
    external
    onlyOperatorManager(operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

newPendingManager

address

The new pending manager of the operator.

confirmOperatorManager

Confirms an operator's pending manager.

function confirmOperatorManager(uint8 operatorId) external;

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

verifyWithdrawalCredentials

Verifies withdrawal credentials of validator(s) owned by the provided operator's EigenPod. It also verifies the effective balance of the validator(s).

function verifyWithdrawalCredentials(
    uint8 operatorId,
    uint64 oracleTimestamp,
    IBeaconChainProofs.StateRootProof calldata stateRootProof,
    uint40[] calldata validatorIndices,
    bytes[] calldata validatorFieldsProofs,
    bytes32[][] calldata validatorFields
) external onlyOperatorManagerOrProofUploader(operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

oracleTimestamp

uint64

The timestamp of the oracle that submitted the proof.

stateRootProof

IBeaconChainProofs.StateRootProof

The state root proof.

validatorIndices

uint40[]

The indices of the validators to verify.

validatorFieldsProofs

bytes[]

The validator fields proofs.

validatorFields

bytes32[][]

The validator fields.

addValidatorDetails

Adds pending validator details (public keys and signatures) to storage for the provided operator. Each added batch extends the timestamp at which the details will be considered confirmed.

function addValidatorDetails(
    uint8 operatorId,
    uint256 validatorCount,
    bytes calldata publicKeys,
    bytes calldata signatures
) external onlyOperatorManager(operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

validatorCount

uint256

The number of validators in the batch.

publicKeys

bytes

The validator public keys.

signatures

bytes

The validator signatures.

removeValidatorDetails

Removes pending validator details (public keys and signatures) from storage for the provided operator.

function removeValidatorDetails(uint8 operatorId, uint256 fromIndex, uint256 validatorCount)
    external
    onlyOperatorManagerOrSecurityDaemon(operatorId);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

fromIndex

uint256

The index of the first validator to remove.

validatorCount

uint256

The number of validator to remove.

allocateStrategyShares

Allocates a specified amount of shares for the provided strategy to the operators with the lowest utilization.

function allocateStrategyShares(address strategy, uint256 sharesToAllocate)
    external
    onlyDepositPool
    returns (uint256 sharesAllocated, OperatorStrategyAllocation[] memory allocations);

Parameters

NameTypeDescription

strategy

address

The strategy to allocate the shares to.

sharesToAllocate

uint256

The amount of shares to allocate.

allocateETHDeposits

Allocates a specified amount of ETH deposits to the operators with the lowest utilization.

function allocateETHDeposits(uint256 depositsToAllocate)
    external
    onlyDepositPool
    returns (uint256 depositsAllocated, OperatorETHAllocation[] memory allocations);

Parameters

NameTypeDescription

depositsToAllocate

uint256

The amount of deposits to allocate (32 ETH each)

deallocateStrategyShares

Deallocates a specified amount of shares for the provided strategy from the operators with the highest utilization.

function deallocateStrategyShares(address strategy, uint256 sharesToDeallocate)
    external
    onlyCoordinator
    returns (uint256 sharesDeallocated, OperatorStrategyDeallocation[] memory deallocations);

Parameters

NameTypeDescription

strategy

address

The strategy to deallocate the shares from.

sharesToDeallocate

uint256

The amount of shares to deallocate.

deallocateETHDeposits

Deallocates a specified amount of ETH deposits from the operators with the highest utilization.

function deallocateETHDeposits(uint256 depositsToDeallocate)
    external
    onlyCoordinator
    returns (uint256 depositsDeallocated, OperatorETHDeallocation[] memory deallocations);

Parameters

NameTypeDescription

depositsToDeallocate

uint256

The amount of deposits to deallocate (32 ETH each)

receive

Receives ETH from operator exits.

receive() external payable;

_authorizeUpgrade

Allows the owner to upgrade the operator registry implementation.

function _authorizeUpgrade(address newImplementation) internal override onlyOwner;

Parameters

NameTypeDescription

newImplementation

address

The implementation to upgrade to.

Last updated