RioLRTWithdrawalQueue

Git Source

Inherits: IRioLRTWithdrawalQueue, OwnableUpgradeable, UUPSUpgradeable, RioLRTCore

State Variables

currentEpochsByAsset

Current asset withdrawal epochs. Incoming withdrawals are included in the current epoch.

mapping(address asset => uint256 epoch) internal currentEpochsByAsset;

epochWithdrawalsByAsset

The amount of assets owed to users in a given epoch, as well as the state of the epoch's withdrawals.

mapping(address asset => mapping(uint256 epoch => EpochWithdrawals withdrawals)) internal epochWithdrawalsByAsset;

sharesOwedByAsset

The total amount of shares owed to withdrawers across all epochs for asset, excluding the current epoch.

mapping(address asset => uint256 sharesOwed) internal sharesOwedByAsset;

Functions

constructor

constructor(address issuer_) RioLRTCore(issuer_);

Parameters

initialize

Initializes the contract.

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

Parameters

getCurrentEpoch

Retrieve the current withdrawal epoch for a given asset.

function getCurrentEpoch(address asset) public view returns (uint256);

Parameters

getRestakingTokensInCurrentEpoch

Get the amount of restaking tokens requested for withdrawal in the current epoch for asset.

function getRestakingTokensInCurrentEpoch(address asset) external view returns (uint256 amountIn);

Parameters

getTotalSharesOwed

Get the total amount of shares owed to withdrawers across all epochs for asset.

function getTotalSharesOwed(address asset) external view returns (uint256);

Parameters

getEpochWithdrawalSummary

Retrieve withdrawal epoch information for a given asset and epoch.

function getEpochWithdrawalSummary(address asset, uint256 epoch)
    external
    view
    returns (EpochWithdrawalSummary memory);

Parameters

getUserWithdrawalSummary

Retrieve a user's withdrawal information for a given asset and epoch.

function getUserWithdrawalSummary(address asset, uint256 epoch, address user)
    external
    view
    returns (UserWithdrawalSummary memory);

Parameters

claimWithdrawalsForEpoch

Withdraws all asset owed to the caller in a given epoch.

function claimWithdrawalsForEpoch(ClaimRequest calldata request) public returns (uint256 amountOut);

Parameters

claimWithdrawalsForManyEpochs

Withdraws owed assets owed to the caller from many withdrawal requests.

function claimWithdrawalsForManyEpochs(ClaimRequest[] calldata requests)
    external
    returns (uint256[] memory amountsOut);

Parameters

queueWithdrawal

Queue withdrawal of asset to withdrawer in the current epoch. The withdrawal can be claimed as the underlying asset by the withdrawer once the current epoch is settled.

function queueWithdrawal(address withdrawer, address asset, uint256 amountIn) external onlyCoordinator;

Parameters

settleCurrentEpochFromDepositPool

Settle the current epoch for asset using assetsReceived from the deposit pool.

function settleCurrentEpochFromDepositPool(address asset, uint256 assetsReceived) external onlyCoordinator;

Parameters

queueCurrentEpochSettlementFromEigenLayer

Queues the current epoch for asset settlement via EigenLayer and record the amount of assets received from the deposit pool.

function queueCurrentEpochSettlementFromEigenLayer(
    address asset,
    uint256 assetsReceived,
    uint256 shareValueOfAssetsReceived,
    uint256 totalShareValueAtRebalance,
    bytes32 aggregateRoot
) external onlyCoordinator;

Parameters

completeEpochSettlementFromEigenLayer

Settle epoch for asset using queuedWithdrawals from EigenLayer.

function completeEpochSettlementFromEigenLayer(
    address asset,
    uint256 epoch,
    IDelegationManager.Withdrawal[] calldata queuedWithdrawals,
    uint256[] calldata middlewareTimesIndexes
) external;

Parameters

receive

Receives ETH for withdrawals.

receive() external payable;

_getEpochWithdrawals

function _getEpochWithdrawals(address asset, uint256 epoch) internal view returns (EpochWithdrawals storage);

_authorizeUpgrade

Allows the owner to upgrade the withdrawal queue implementation.

function _authorizeUpgrade(address newImplementation) internal override onlyOwner;

Parameters

Last updated