IRioLRTCoordinator
Functions
initialize
Initializes the contract.
Parameters
initialOwner
address
The owner of the contract.
token
address
The address of the liquid restaking token.
DEPOSIT_ROOT_TYPEHASH
Returns the EIP-712 typehash for DepositRoot
message.
ethPOS
The Ethereum POS deposit contract address.
getTVL
Returns the total value of all underlying assets in the unit of account.
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.
Parameters
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.
Parameters
value
uint256
The restaking token's value in the unit of account.
convertFromAssetToRestakingTokens
Converts an asset amount to its equivalent value in restaking tokens.
Parameters
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.
Parameters
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.
Parameters
asset
address
The address of the asset whose EigenLayer shares to convert to.
amount
uint256
The amount of restaking tokens to convert.
hashTypedData
EIP-712 helper.
Parameters
structHash
bytes32
The hash of the struct.
depositERC20
Deposits ERC20 tokens and mints restaking token(s) to the caller.
Parameters
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.
requestWithdrawal
Requests a withdrawal to asset
for amountIn
restaking tokens.
Parameters
asset
address
The asset being withdrawn.
amountIn
uint256
The amount of restaking tokens requested for withdrawal.
rebalanceETH
Rebalances ETH by processing outstanding withdrawals and depositing remaining ETH into EigenLayer.
This function requires a guardian signature prior to depositing ETH into EigenLayer. If the guardian doesn't provide a signature within 24 hours, then the rebalance will be allowed without a signature, but only for withdrawals. In the future, this may be extended to allow a rebalance without a guardian signature without waiting 24 hours if withdrawals outnumber deposits.
Parameters
root
bytes32
The deposit merkle root.
signature
bytes
The guardian signature.
rebalanceERC20
Rebalances the provided ERC20 token
by processing outstanding withdrawals and depositing remaining tokens into EigenLayer.
Parameters
token
address
The token to rebalance.
Events
Deposited
Emitted when a user deposits an asset into Rio.
Parameters
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 both withdrawals and deposits succeed during a rebalance, or when withdrawals succeed and a deposit was not needed.
Parameters
asset
address
The address of the asset.
PartiallyRebalanced
Emitted when withdrawals succeed, but deposits fail or were unable to be attempted during an asset rebalance.
Parameters
asset
address
The address of the asset.
RebalanceDelaySet
Emitted when the rebalance delay is set.
Parameters
newRebalanceDelay
uint24
The new rebalance delay.
GuardianSignerSet
Emitted when the guardian signer is set.
Parameters
newGuardianSigner
address
The address of the new guardian signer.
Errors
ASSET_NOT_SUPPORTED
Thrown when attempting an action on an unsupported asset.
Parameters
asset
address
The address of the asset.
AMOUNT_MUST_BE_GREATER_THAN_ZERO
Thrown when attempting to deposit an amount of zero.
DEPOSIT_CAP_REACHED
Thrown when attempting to deposit an amount that would exceed the deposit cap.
Parameters
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 share value available.
CALLER_MUST_BE_EOA
Thrown when the msg.sender
is a contract.
INVALID_TOKEN_ADDRESS
Thrown when the ETH pseudo-address is passed to the ERC20 rebalance function.
INVALID_GUARDIAN_SIGNATURE
Thrown when the guardian signer is invalid.
STALE_DEPOSIT_ROOT
Thrown when the guardian deposit root is stale.
REBALANCE_DELAY_NOT_MET
Thrown when attempting rebalance before the rebalance delay has elapsed.
REBALANCE_DELAY_TOO_LONG
Thrown when attempting to set the rebalance delay to a value greater than the maximum.
NO_REBALANCE_NEEDED
Thrown when attempting to rebalance an asset that does not need to be rebalanced.
NO_OPERATOR_UNDELEGATED
Thrown when attempting to pause the coordinator due to forceful undelegation when no operator has forcefully undelegated.
Last updated