RioLRTAssetRegistry
Inherits: IRioLRTAssetRegistry, OwnableUpgradeable, UUPSUpgradeable, RioLRTCore
State Variables
priceFeedDecimals
The number of decimals that all asset price feeds must use.
priceScale
The price scale used for all assets (max of 18 decimals).
supportedAssets
All supported assets.
assetInfo
Information about a supported asset.
ethBalanceInUnverifiedValidators
The amount of ETH held in unverified validators.
Functions
onlyWithdrawalQueueOrDepositPool
Require that the caller is the withdrawal queue or deposit pool.
constructor
Parameters
Name | Type | Description |
---|---|---|
|
| The LRT issuer that's authorized to deploy this contract. |
initialize
Initializes the asset registry contract.
Parameters
Name | Type | Description |
---|---|---|
|
| The initial owner of the contract. |
|
| The address of the liquid restaking token. |
|
| The number of decimals that all price feeds must use. |
|
| The initial supported asset configurations. |
getTVL
Returns the total value of all underlying assets in the unit of account.
getTVLForAsset
Returns the total value of the underlying asset in the unit of account.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getTotalBalanceForAsset
Returns the total balance of the asset, including the deposit pool and EigenLayer.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getETHBalanceInEigenLayer
Returns the ETH balance held in EigenLayer. This includes the ETH held in unverified validators, EigenPod shares, and ETH that's queued for withdrawal.
isSupportedAsset
Checks if a given asset is supported.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to check. |
getAssetInfoByAddress
Returns information about an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetStrategy
Returns the asset's EigenLayer strategy.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetSharesHeld
Returns the amount of EigenLayer shares held for an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetPriceFeed
Returns the asset's current price feed.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetDepositCap
Returns the asset's current deposit cap.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetDecimals
Returns the asset's decimal precision.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetPrice
Returns the asset's current price.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getSupportedAssets
Returns an array of all supported assets.
getAssetStrategies
Returns the EigenLayer strategies for all supported assets.
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
Name | Type | Description |
---|---|---|
|
| The address of the asset to convert. |
|
| 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
Name | Type | Description |
---|---|---|
|
| The address of the asset to convert to. |
|
| The asset's value in the unit of account. |
convertToSharesFromAsset
Converts an amount of an asset to the equivalent amount of EigenLayer shares.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to convert. |
|
| The amount of the asset to convert. |
convertFromSharesToAsset
Converts an amount of EigenLayer shares to the equivalent amount of an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The EigenLayer strategy. |
|
| The amount of EigenLayer shares. |
getPrice
Get the current price from the provided price feed. This function performs no checks on the price feed. Its output should not be trusted unless the price feed parameter is known and trusted.
Parameters
Name | Type | Description |
---|---|---|
|
| The price feed contract address. |
addAsset
Adds a new underlying asset to the liquid restaking token.
Parameters
Name | Type | Description |
---|---|---|
|
| The asset's configuration. |
removeAsset
Removes an underlying asset from the liquid restaking token.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to remove. |
forceRemoveAsset
Force removes an underlying asset from the liquid restaking token regardless of its balance.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to force remove. |
setAssetDepositCap
Sets the asset's deposit cap.
Parameters
Name | Type | Description |
---|---|---|
|
| |
|
| The new rebalance delay. |
setAssetPriceFeed
Sets the asset's price feed.
Parameters
Name | Type | Description |
---|---|---|
|
| |
|
| The new price feed. |
increaseSharesHeldForAsset
Increases the number of EigenLayer shares held for an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The amount of EigenLayer shares to increase. |
decreaseSharesHeldForAsset
Decreases the number of EigenLayer shares held for an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The amount of EigenLayer shares to decrease. |
increaseUnverifiedValidatorETHBalance
Increases the unverified validator ETH balance.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to increase. |
decreaseUnverifiedValidatorETHBalance
Decreases the unverified validator ETH balance.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to decrease. |
_addAsset
Adds a new underlying asset to the liquid restaking token.
Parameters
Name | Type | Description |
---|---|---|
|
| The asset's configuration. |
_removeAsset
Removes an underlying asset from the liquid restaking token.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to remove. |
|
| If true, the asset will be removed regardless of its balance. |
_findAssetIndex
Returns the index of the asset in the supported assets array.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
_normalizeDecimals
Normalizes an amount from one decimal precision to another.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount to normalize. |
|
| The amount's current decimal precision. |
|
| The amount's target decimal precision. |
_authorizeUpgrade
Allows the owner to upgrade the asset registry implementation.
Parameters
Name | Type | Description |
---|---|---|
|
| The implementation to upgrade to. |
Last updated