IRioLRTCoordinator

IRioLRTCoordinator

Functions

initialize

Initializes the contract.

function initialize(address initialOwner, address token) external;

Parameters

NameTypeDescription

initialOwner

address

The owner of the contract.

token

address

The address of the liquid restaking token.

getTVL

Returns the total value of all underlying assets in the unit of account.

function getTVL() external view returns (uint256);

convertToUnitOfAccountFromRestakingTokens

Converts an amount of restaking tokens to its equivalent value in the unit of account. The unit of account is the price feed's quote asset.

function convertToUnitOfAccountFromRestakingTokens(uint256 amount) external view returns (uint256);

Parameters

NameTypeDescription

amount

uint256

The amount of restaking tokens to convert.

convertFromUnitOfAccountToRestakingTokens

Converts the unit of account value to its equivalent in restaking tokens. The unit of account is the price feed's quote asset.

function convertFromUnitOfAccountToRestakingTokens(uint256 value) external view returns (uint256);

Parameters

NameTypeDescription

value

uint256

The restaking token's value in the unit of account.

convertFromAssetToRestakingTokens

Converts an asset amount to its equivalent value in restaking tokens.

function convertFromAssetToRestakingTokens(address asset, uint256 amount) external view returns (uint256);

Parameters

NameTypeDescription

asset

address

The address of the asset to convert.

amount

uint256

The amount of the asset to convert.

convertToAssetFromRestakingTokens

Converts an amount of restaking tokens to the equivalent in the asset.

function convertToAssetFromRestakingTokens(address asset, uint256 amount) external view returns (uint256);

Parameters

NameTypeDescription

asset

address

The address of the asset to convert to.

amount

uint256

The amount of restaking tokens to convert.

convertToSharesFromRestakingTokens

Converts an amount of restaking tokens to the equivalent in the provided asset's EigenLayer shares.

function convertToSharesFromRestakingTokens(address asset, uint256 amount) external view returns (uint256);

Parameters

NameTypeDescription

asset

address

The address of the asset whose EigenLayer shares to convert to.

amount

uint256

The amount of restaking tokens to convert.

deposit

Deposits ERC20 tokens and mints restaking token(s) to the caller.

function deposit(address asset, uint256 amountIn) external returns (uint256);

Parameters

NameTypeDescription

asset

address

The asset being deposited.

amountIn

uint256

The amount of the asset being deposited.

depositETH

Deposits ETH and mints restaking token(s) to the caller.

function depositETH() external payable returns (uint256);

requestWithdrawal

Requests a withdrawal to asset for amountIn restaking tokens.

function requestWithdrawal(address asset, uint256 amountIn) external returns (uint256);

Parameters

NameTypeDescription

asset

address

The asset being withdrawn.

amountIn

uint256

The amount of restaking tokens being redeemed.

rebalance

Rebalances the provided asset by processing outstanding withdrawals and depositing remaining assets into EigenLayer.

function rebalance(address asset) external;

Parameters

NameTypeDescription

asset

address

The asset to rebalance.

Events

Deposited

Emitted when a user deposits an asset into Rio.

event Deposited(address indexed user, address indexed asset, uint256 amountIn, uint256 amountOut);

Parameters

NameTypeDescription

user

address

The address of the user.

asset

address

The address of the asset.

amountIn

uint256

The amount of the asset deposited.

amountOut

uint256

The amount of restaking tokens minted.

Rebalanced

Emitted when an asset is rebalanced.

event Rebalanced(address indexed asset);

Parameters

NameTypeDescription

asset

address

The address of the asset.

RebalanceDelaySet

Emitted when the rebalance delay is set.

event RebalanceDelaySet(uint24 newRebalanceDelay);

Parameters

NameTypeDescription

newRebalanceDelay

uint24

The new rebalance delay.

Errors

ASSET_NOT_SUPPORTED

Thrown when attempting an action on an unsupported asset.

error ASSET_NOT_SUPPORTED(address asset);

Parameters

NameTypeDescription

asset

address

The address of the asset.

AMOUNT_MUST_BE_GREATER_THAN_ZERO

Thrown when attempting to deposit an amount of zero.

error AMOUNT_MUST_BE_GREATER_THAN_ZERO();

DEPOSIT_CAP_REACHED

Thrown when attempting to deposit an amount that would exceed the deposit cap.

error DEPOSIT_CAP_REACHED(address asset, uint256 depositCap);

Parameters

NameTypeDescription

asset

address

The address of the asset.

depositCap

uint256

The asset's deposit cap.

INSUFFICIENT_SHARES_FOR_WITHDRAWAL

Thrown when attempting to request a withdrawal for an amount that would exceed the total number of shares in EigenLayer.

error INSUFFICIENT_SHARES_FOR_WITHDRAWAL();

REBALANCE_DELAY_NOT_MET

Thrown when attempting rebalance before the rebalance delay has elapsed.

error REBALANCE_DELAY_NOT_MET();

NO_REBALANCE_NEEDED

Thrown when attempting to rebalance an asset that does not need to be rebalanced.

error NO_REBALANCE_NEEDED();

Last updated