IRioLRTOperatorDelegator

IRioLRTOperatorDelegator

Functions

initialize

Initializes the contract by delegating to the provided EigenLayer operator.

function initialize(address token, address operator) external;

Parameters

NameTypeDescription

token

address

The address of the liquid restaking token.

operator

address

The operator's address.

eigenPod

The operator delegator's EigenPod.

function eigenPod() external view returns (IEigenPod);

getEigenPodShares

Returns the number of shares in the operator delegator's EigenPod.

function getEigenPodShares() external view returns (int256);

getETHUnderManagement

Returns the total amount of ETH under management by the operator delegator.

This includes EigenPod shares (verified validator balances minus queued withdrawals) and ETH in the operator delegator's EigenPod.

function getETHUnderManagement() external view returns (uint256);

verifyWithdrawalCredentials

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

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

Parameters

NameTypeDescription

oracleTimestamp

uint64

The Beacon Chain timestamp whose state root the proof will be proven against.

stateRootProof

IBeaconChainProofs.StateRootProof

Proves a beaconStateRoot against a block root fetched from the oracle.

validatorIndices

uint40[]

The list of indices of the validators being proven, refer to consensus specs.

validatorFieldsProofs

bytes[]

Proofs against the beaconStateRoot for each validator in validatorFields.

validatorFields

bytes32[][]

The fields of the "Validator Container", refer to consensus specs.

stakeERC20

Approve EigenLayer to spend an ERC20 token, then stake it into an EigenLayer strategy.

function stakeERC20(address strategy, address token, uint256 amount) external returns (uint256 shares);

Parameters

NameTypeDescription

strategy

address

The strategy to stake the tokens into.

token

address

The token to stake.

amount

uint256

The amount of tokens to stake.

stakeETH

Stake ETH via the operator delegator's EigenPod, using the provided validator information.

function stakeETH(uint256 validatorCount, bytes calldata pubkeyBatch, bytes calldata signatureBatch) external payable;

Parameters

NameTypeDescription

validatorCount

uint256

The number of validators to deposit into.

pubkeyBatch

bytes

Batched validator public keys.

signatureBatch

bytes

Batched validator signatures.

queueWithdrawal

Queue a withdrawal of the given amount of shares to the withdrawer from the provided strategy.

function queueWithdrawal(address strategy, uint256 shares, address withdrawer) external returns (bytes32 root);

Parameters

NameTypeDescription

strategy

address

The strategy to withdraw from.

shares

uint256

The amount of shares to withdraw.

withdrawer

address

The address who has permission to complete the withdrawal.

Errors

ONLY_COORDINATOR_OR_OPERATOR_REGISTRY

Thrown when the caller is not the LRT's coordinator or the operator registry.

error ONLY_COORDINATOR_OR_OPERATOR_REGISTRY();

INVALID_EARNINGS_RECEIVER

Thrown when the earnings receiver is not set to the reward distributor.

error INVALID_EARNINGS_RECEIVER();

INVALID_DELEGATION_APPROVER

Thrown when the delegation approver is not the zero address.

error INVALID_DELEGATION_APPROVER();

INVALID_STAKER_OPT_OUT_BLOCKS

Thrown when the operator's staker opt out blocks is below the minimum.

error INVALID_STAKER_OPT_OUT_BLOCKS();

INVALID_VALIDATOR_COUNT

Thrown when the validator count is 0 or does not match the provided ETH value.

error INVALID_VALIDATOR_COUNT();

INVALID_PUBLIC_KEYS_BATCH_LENGTH

Thrown when the public keys batch length does not match the validator count.

error INVALID_PUBLIC_KEYS_BATCH_LENGTH(uint256 actual, uint256 expected);

Parameters

NameTypeDescription

actual

uint256

The actual length of the batch.

expected

uint256

The expected length of the batch.

INVALID_SIGNATURES_BATCH_LENGTH

Thrown when the signatures batch length does not match the validator count.

error INVALID_SIGNATURES_BATCH_LENGTH(uint256 actual, uint256 expected);

Parameters

NameTypeDescription

actual

uint256

The actual length of the batch.

expected

uint256

The expected length of the batch.

Last updated