IRioLRTOperatorRegistry

IRioLRTOperatorRegistry

Functions

initialize

Initializes the contract.

function initialize(address initialOwner, address token) external;

Parameters

getOperatorDetails

Returns the operator details for the provided operator ID.

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

Parameters

getOperatorShareDetails

Returns the operator share cap and allocation for the provided operator ID and strategy.

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

Parameters

isValidStrategyExitRootForOperator

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

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

Parameters

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);

validatorKeyReviewPeriod

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

function validatorKeyReviewPeriod() external view returns (uint24);

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 returns (uint8 operatorId, address delegator);

Parameters

activateOperator

Activates an operator.

function activateOperator(uint8 operatorId) external;

Parameters

deactivateOperator

Deactivates an operator, exiting all remaining stake to the deposit pool.

function deactivateOperator(uint8 operatorId) external;

Parameters

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;

Parameters

removeValidatorDetails

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

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

Parameters

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
    returns (uint256 sharesAllocated, OperatorStrategyAllocation[] memory allocations);

Parameters

allocateETHDeposits

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

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

Parameters

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
    returns (uint256 sharesDeallocated, OperatorStrategyDeallocation[] memory deallocations);

Parameters

deallocateETHDeposits

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

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

Parameters

Events

OperatorAdded

Emitted when a new operator is added to the registry.

event OperatorAdded(
    uint8 indexed operatorId,
    address indexed operator,
    address indexed delegator,
    address initialManager,
    address initialEarningsReceiver,
    string initialMetadataURI
);

Parameters

OperatorActivated

Emitted when an operator is activated.

event OperatorActivated(uint8 indexed operatorId);

Parameters

OperatorDeactivated

Emitted when an operator is deactivated.

event OperatorDeactivated(uint8 indexed operatorId);

Parameters

OperatorStrategyShareCapSet

Emitted when an operator's strategy share allocation cap is set.

event OperatorStrategyShareCapSet(uint8 indexed operatorId, address strategy, uint128 cap);

Parameters

OperatorValidatorCapSet

Emitted when an operator's validator cap is set.

event OperatorValidatorCapSet(uint8 indexed operatorId, uint40 cap);

Parameters

SecurityDaemonSet

Emitted when the security daemon is set.

event SecurityDaemonSet(address securityDaemon);

Parameters

ProofUploaderSet

Emitted when the proof uploader is set.

event ProofUploaderSet(address proofUploader);

Parameters

MinStakerOptOutBlocksSet

Emitted when the min staker opt out blocks is set.

event MinStakerOptOutBlocksSet(uint24 minStakerOptOutBlocks);

ValidatorKeyReviewPeriodSet

Emitted when the validator key review period is set.

event ValidatorKeyReviewPeriodSet(uint24 validatorKeyReviewPeriod);

Parameters

OperatorStrategyExitQueued

Emitted when a strategy exit is queued for an operator.

event OperatorStrategyExitQueued(uint8 indexed operatorId, address strategy, uint256 sharesToExit, bytes32 exitRoot);

Parameters

OperatorStrategyExitCompleted

Emitted when a strategy exit is completed for an operator.

event OperatorStrategyExitCompleted(uint8 indexed operatorId, address strategy, bytes32 exitRoot);

Parameters

OperatorEarningsReceiverSet

Emitted when an operator's earnings receiver is set.

event OperatorEarningsReceiverSet(uint8 indexed operatorId, address earningsReceiver);

Parameters

OperatorPendingManagerSet

Emitted when an operator's pending manager is set.

event OperatorPendingManagerSet(uint8 indexed operatorId, address pendingManager);

Parameters

OperatorManagerSet

Emitted when an operator's manager is set.

event OperatorManagerSet(uint8 indexed operatorId, address manager);

Parameters

OperatorWithdrawalCredentialsVerified

Emitted following the verification of withdrawal credentials for one or more validators.

event OperatorWithdrawalCredentialsVerified(
    uint8 indexed operatorId, uint64 oracleTimestamp, uint40[] validatorIndices
);

Parameters

OperatorPendingValidatorDetailsAdded

Emitted when an operator uploads a new set of validator details (public keys and signatures).

event OperatorPendingValidatorDetailsAdded(uint8 indexed operatorId, uint256 validatorCount);

Parameters

OperatorPendingValidatorDetailsRemoved

Emitted when an operator removes pending validator details (public keys and signatures).

event OperatorPendingValidatorDetailsRemoved(uint8 indexed operatorId, uint256 validatorCount);

Parameters

StrategySharesAllocated

Emitted when strategy shares have been allocated to operators.

event StrategySharesAllocated(
    address indexed strategy, uint256 sharesAllocated, OperatorStrategyAllocation[] allocations
);

Parameters

ETHDepositsAllocated

Emitted when ETH deposits have been allocated to operators.

event ETHDepositsAllocated(uint256 depositsAllocated, OperatorETHAllocation[] allocations);

Parameters

StrategySharesDeallocated

Emitted when strategy shares have been deallocated from operators.

event StrategySharesDeallocated(
    address indexed strategy, uint256 sharesDeallocated, OperatorStrategyDeallocation[] deallocations
);

Parameters

ETHDepositsDeallocated

Emitted when ETH deposits have been deallocated from operators.

event ETHDepositsDeallocated(uint256 depositsDeallocated, OperatorETHDeallocation[] deallocations);

Parameters

Errors

ONLY_OPERATOR_MANAGER

Thrown when the caller is not the operator's manager.

error ONLY_OPERATOR_MANAGER();

ONLY_OPERATOR_MANAGER_OR_SECURITY_DAEMON

Thrown when the caller is not the operator's manager OR the security daemon.

error ONLY_OPERATOR_MANAGER_OR_SECURITY_DAEMON();

ONLY_OPERATOR_MANAGER_OR_PROOF_UPLOADER

Thrown when the caller is not the operator's manager OR the proof uploader.

error ONLY_OPERATOR_MANAGER_OR_PROOF_UPLOADER();

ONLY_OPERATOR_PENDING_MANAGER

Thrown when the caller is not the operator's pending manager.

error ONLY_OPERATOR_PENDING_MANAGER();

INVALID_OPERATOR

Thrown when the operator is address(0).

error INVALID_OPERATOR();

INVALID_MANAGER

Thrown when the manager is address(0).

error INVALID_MANAGER();

INVALID_EARNINGS_RECEIVER

Thrown when the operator's earnings receiver is address(0).

error INVALID_EARNINGS_RECEIVER();

INVALID_OPERATOR_DELEGATOR

Thrown when an invalid (non-existent) operator delegator contract address is provided.

error INVALID_OPERATOR_DELEGATOR();

INVALID_STRATEGY_LENGTH_FOR_EXIT

Thrown when the strategy length in a strategy exit is not equal to 1.

error INVALID_STRATEGY_LENGTH_FOR_EXIT();

INVALID_STRATEGY_EXIT_ROOT

Thrown when the provided strategy exit root is invalid.

error INVALID_STRATEGY_EXIT_ROOT();

INVALID_PENDING_MANAGER

Thrown when the pending manager is address(0).

error INVALID_PENDING_MANAGER();

INVALID_VALIDATOR_COUNT

Thrown when the provided validator count is invalid (zero).

error INVALID_VALIDATOR_COUNT();

INVALID_INDEX

Thrown when an invalid index is provided.

error INVALID_INDEX();

MAX_OPERATOR_COUNT_EXCEEDED

Thrown when the maximum number of operators has been reached.

error MAX_OPERATOR_COUNT_EXCEEDED();

MAX_ACTIVE_OPERATOR_COUNT_EXCEEDED

Thrown when the maximum number of active operators has been reached.

error MAX_ACTIVE_OPERATOR_COUNT_EXCEEDED();

OPERATOR_ALREADY_ACTIVE

Thrown when attempting to activate an operator that is already active.

error OPERATOR_ALREADY_ACTIVE();

OPERATOR_ALREADY_INACTIVE

Thrown when attempting to deactivate an operator that is already inactive.

error OPERATOR_ALREADY_INACTIVE();

CANNOT_EXIT_ZERO_SHARES

Thrown when attempting to queue the exit of zero shares.

error CANNOT_EXIT_ZERO_SHARES();

NO_AVAILABLE_OPERATORS_FOR_DEALLOCATION

Thrown when there are no available operators for deallocation.

error NO_AVAILABLE_OPERATORS_FOR_DEALLOCATION();

Structs

OperatorConfig

The information needed to add a new operator.

struct OperatorConfig {
    address operator;
    address initialManager;
    address initialEarningsReceiver;
    string initialMetadataURI;
    StrategyShareCap[] strategyShareCaps;
    uint40 validatorCap;
}

StrategyShareCap

Configuration used to track the maximum number of shares that can be allocated to an operator for a given strategy.

struct StrategyShareCap {
    address strategy;
    uint128 cap;
}

OperatorShareDetails

Tracks both the cap and current allocation of strategy shares for an operator.

struct OperatorShareDetails {
    uint128 cap;
    uint128 allocation;
}

OperatorValidatorDetails

Aggregate validator information for a single operator.

struct OperatorValidatorDetails {
    uint40 nextConfirmationTimestamp;
    uint40 cap;
    uint40 total;
    uint40 confirmed;
    uint40 deposited;
    uint40 exited;
}

OperatorDetails

Details for a single operator.

struct OperatorDetails {
    bool active;
    address delegator;
    address manager;
    address pendingManager;
    address earningsReceiver;
    OperatorValidatorDetails validatorDetails;
    mapping(address => OperatorShareDetails) shareDetails;
    mapping(bytes32 => bool) isValidStrategyExitRoot;
}

OperatorPublicDetails

Details for a single operator, excluding the share details, so we can expose externally.

struct OperatorPublicDetails {
    bool active;
    address delegator;
    address manager;
    address pendingManager;
    address earningsReceiver;
    OperatorValidatorDetails validatorDetails;
}

OperatorStrategyAllocation

An operator address and strategy share allocation.

struct OperatorStrategyAllocation {
    address operator;
    uint256 shares;
    uint256 tokens;
}

OperatorETHAllocation

An operator address, ETH deposit allocation, and validator details.

struct OperatorETHAllocation {
    address operator;
    uint256 deposits;
    bytes pubKeyBatch;
    bytes signatureBatch;
}

OperatorStrategyDeallocation

An operator address and strategy share deallocation.

struct OperatorStrategyDeallocation {
    address operator;
    uint256 shares;
    uint256 tokens;
}

OperatorETHDeallocation

An operator address and ETH deposit deallocation.

struct OperatorETHDeallocation {
    address operator;
    uint256 deposits;
}

Last updated