IRioLRTDepositPool

Git Source

Functions

initialize

Initializes the deposit pool contract.

function initialize(address initialOwner, address token) external;

Parameters

NameTypeDescription

initialOwner

address

The initial owner of the contract.

token

address

The address of the liquid restaking token.

depositBalanceIntoEigenLayer

Deposits the entire deposit pool balance of the specified asset into EigenLayer.

function depositBalanceIntoEigenLayer(address asset) external returns (uint256, bool);

Parameters

NameTypeDescription

asset

address

The address of the asset to be deposited.

transferMaxAssetsForShares

Transfers the maximum possible amount of assets based on the available pool balance and requested shares.

This function handles asset transfer by converting the share value to assets and ensures that either the requested amount or the maximum possible amount is transferred.

function transferMaxAssetsForShares(address asset, uint256 sharesRequested, address recipient)
    external
    returns (uint256, uint256);

Parameters

NameTypeDescription

asset

address

The address of the asset to be transferred.

sharesRequested

uint256

The number of shares to convert into assets for transfer.

recipient

address

The address of the recipient of the transferred assets.

completeOperatorWithdrawalForAsset

Completes a withdrawal from EigenLayer for the specified asset and operatorId. Withdrawals directly to the deposit pool can occur for two reasons:

  1. The operator has exited the strategy and the assets have been returned to the deposit pool.

  2. Excess ETH from full withdrawals had accumulated in the EigenPod and was scraped to the deposit pool.

function completeOperatorWithdrawalForAsset(
    address asset,
    uint8 operatorId,
    IDelegationManager.Withdrawal calldata queuedWithdrawal,
    uint256 middlewareTimesIndex
) external;

Parameters

NameTypeDescription

asset

address

The address of the asset to be withdrawn.

operatorId

uint8

The ID of the operator from which the asset is being withdrawn.

queuedWithdrawal

IDelegationManager.Withdrawal

The withdrawal to be completed.

middlewareTimesIndex

uint256

The index of the middleware times to use for the withdrawal.

Events

OperatorAssetWithdrawalCompleted

Emitted when an operator's asset withdrawal to the deposit pool is completed.

event OperatorAssetWithdrawalCompleted(uint8 indexed operatorId, address asset, bytes32 withdrawalRoot);

Parameters

NameTypeDescription

operatorId

uint8

The ID of the operator from which the asset was withdrawn.

asset

address

The address of the asset that was withdrawn.

withdrawalRoot

bytes32

The root of the withdrawal that was completed.

Errors

INVALID_WITHDRAWAL_ORIGIN

Thrown when a withdrawal was not queued through an operator delegator.

error INVALID_WITHDRAWAL_ORIGIN();

INVALID_WITHDRAWAL_STRATEGY_LENGTH

Thrown when the length of the strategies array is not 1.

error INVALID_WITHDRAWAL_STRATEGY_LENGTH();

Last updated