IRioLRTAssetRegistry
Functions
initialize
Initializes the asset registry contract.
Parameters
initialOwner
address
The initial owner of the contract.
token
address
The address of the liquid restaking token.
priceFeedDecimals
uint8
The number of decimals that all price feeds must use.
initialAssets
AssetConfig[]
The initial supported asset configurations.
getTVL
Returns the total value of all assets in the unit of account.
getTVLForAsset
Returns the total value of the underlying asset in the unit of account.
Parameters
asset
address
The address of the asset.
getTotalBalanceForAsset
Returns the total balance of the asset, including the deposit pool and EigenLayer.
Parameters
asset
address
The address of the asset.
isSupportedAsset
Checks if a given asset is supported.
Parameters
asset
address
The address of the asset to check.
getAssetInfoByAddress
Returns information about an asset.
Parameters
asset
address
The address of the asset.
getAssetStrategy
Returns the asset's EigenLayer strategy.
Parameters
asset
address
The address of the asset.
getAssetSharesHeld
Returns the amount of EigenLayer shares held for an asset.
Parameters
asset
address
The address of the asset.
getAssetDepositCap
Returns the asset's current deposit cap.
Parameters
asset
address
The address of the asset.
getSupportedAssets
Returns an array of all supported assets.
getAssetStrategies
Returns the EigenLayer strategies for all supported assets.
increaseSharesHeldForAsset
Increases the number of EigenLayer shares held for an asset.
Parameters
asset
address
The address of the asset.
amount
uint256
The amount of EigenLayer shares to increase.
decreaseSharesHeldForAsset
Decreases the number of EigenLayer shares held for an asset.
Parameters
asset
address
The address of the asset.
amount
uint256
The amount of EigenLayer shares to decrease.
increaseUnverifiedValidatorETHBalance
Increases the unverified validator ETH balance.
Parameters
amount
uint256
The amount of ETH to increase.
decreaseUnverifiedValidatorETHBalance
Decreases the unverified validator ETH balance.
Parameters
amount
uint256
The amount of ETH to decrease.
convertToUnitOfAccountFromAsset
Converts an asset amount to its equivalent value in the unit of account. The unit of account is the price feed's quote asset.
Parameters
asset
address
The address of the asset to convert.
amount
uint256
The amount of the asset to convert.
convertFromUnitOfAccountToAsset
Converts the unit of account value to its equivalent in the asset. The unit of account is the price feed's quote asset.
Parameters
asset
address
The address of the asset to convert to.
value
uint256
The asset's value in the unit of account.
convertToSharesFromAsset
Converts an amount of an asset to the equivalent amount of EigenLayer shares.
Parameters
asset
address
The address of the asset to convert.
amount
uint256
The amount of the asset to convert.
convertFromSharesToAsset
Converts an amount of EigenLayer shares to the equivalent amount of an asset.
Parameters
strategy
address
The EigenLayer strategy.
shares
uint256
The amount of EigenLayer shares.
Events
AssetAdded
Emitted when a new asset is added.
Parameters
config
AssetConfig
The asset's configuration.
AssetRemoved
Emitted when an asset is removed.
Parameters
asset
address
The address of the asset.
forced
bool
True if the asset was removed by force, regardless of its balance.
AssetDepositCapSet
Emitted when an asset's EigenLayer strategy is set.
Parameters
asset
address
The address of the asset.
newDepositCap
uint96
The new deposit cap.
AssetPriceFeedSet
Emitted when an asset's price feed is set.
Parameters
asset
address
The address of the asset.
newPriceFeed
address
The new price feed.
AssetSharesIncreased
Emitted when the number of EigenLayer shares held for an asset is increased.
Parameters
asset
address
The address of the asset.
amount
uint256
The amount of EigenLayer shares to increase.
AssetSharesDecreased
Emitted when the number of EigenLayer shares held for an asset is decreased.
Parameters
asset
address
The address of the asset.
amount
uint256
The amount of EigenLayer shares to decrease.
UnverifiedValidatorETHBalanceIncreased
Emitted when the unverified validator ETH balance is increased.
Parameters
amount
uint256
The amount of ETH to increase.
UnverifiedValidatorETHBalanceDecreased
Emitted when the unverified validator ETH balance is decreased.
Parameters
amount
uint256
The amount of ETH to decrease.
Errors
ONLY_WITHDRAWAL_QUEUE_OR_DEPOSIT_POOL
Thrown when the caller is not the LRT withdrawal queue or deposit pool.
ASSET_NOT_SUPPORTED
Thrown when attempting an action on an unsupported asset.
Parameters
asset
address
The address of the asset.
ASSET_ALREADY_SUPPORTED
Thrown when attempting to add an asset that is already supported.
Parameters
asset
address
The address of the asset.
ASSET_HAS_BALANCE
Thrown when attempting to remove an asset with a non-zero balance.
INVALID_ASSET_ADDRESS
Thrown when attempting to add an asset with an invalid address.
INVALID_ASSET_DECIMALS
Thrown when an asset has greater than 18 decimals.
INVALID_STRATEGY
Thrown when a srategy's underlying token does not match the asset.
INVALID_PRICE_FEED_DECIMALS
Thrown when a provided price feed has an unexpected amount of decimals.
INVALID_PRICE_FEED
Thrown when a price feed is provided when not needed, or not provided when required.
Structs
AssetConfig
The configuration used to add a new asset.
AssetInfo
Information about a supported asset.
Last updated