RioLRTOperatorRegistry

Git Source

Inherits: OwnableUpgradeable, UUPSUpgradeable, RioLRTCore, RioLRTOperatorRegistryStorageV1

State Variables

strategyManager

The primary entry and exit-point for funds into and out of EigenLayer.

IStrategyManager public immutable strategyManager;

operatorDelegatorBeacon

The operator delegator beacon contract.

address public immutable operatorDelegatorBeacon;

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 strategyManager_, address operatorDelegatorBeacon_) RioLRTCore(issuer_);

Parameters

NameTypeDescription

issuer_

address

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

strategyManager_

address

The primary entry and exit-point for funds into and out of EigenLayer.

operatorDelegatorBeacon_

address

The operator delegator beacon contract.

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.

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 deposit pool.

function deactivateOperator(uint8 operatorId) external onlyOwner;

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

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 (newProofUploader).

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 or confirmed 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.

reportOutOfOrderValidatorExits

Reports validator exits that occur prior to instruction by the protocol.

function reportOutOfOrderValidatorExits(uint8 operatorId, uint256 fromIndex, uint256 validatorCount) external;

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

fromIndex

uint256

The index of the first validator to report.

validatorCount

uint256

The number of validators to report.

syncStrategyShares

Syncs the stored strategy share allocations for the provided operator IDs with EigenLayer.

function syncStrategyShares(uint8[] memory operatorIds, address strategy) external;

Parameters

NameTypeDescription

operatorIds

uint8[]

The operator IDs to sync.

strategy

address

The strategy to sync.

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)

_hashValidatorBLSPubKey

Hashes a validator's BLS public key and returns the hash.

function _hashValidatorBLSPubKey(bytes memory pubKey) internal pure returns (bytes32 pubKeyHash);

Parameters

NameTypeDescription

pubKey

bytes

The validator's BLS public key.

_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