IRioLRTAssetRegistry

Git Source

Functions

initialize

Initializes the asset registry contract.

function initialize(address initialOwner, address token, uint8 priceFeedDecimals, AssetConfig[] calldata initialAssets)
    external;

Parameters

getTVL

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

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

getTVLForAsset

Returns the total value of the underlying asset in the unit of account.

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

Parameters

getTotalBalanceForAsset

Returns the total balance of the asset, including the deposit pool and EigenLayer.

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

Parameters

isSupportedAsset

Checks if a given asset is supported.

function isSupportedAsset(address asset) external view returns (bool);

Parameters

getAssetInfoByAddress

Returns information about an asset.

function getAssetInfoByAddress(address asset) external view returns (AssetInfo memory);

Parameters

getAssetStrategy

Returns the asset's EigenLayer strategy.

function getAssetStrategy(address asset) external view returns (address);

Parameters

getAssetSharesHeld

Returns the amount of EigenLayer shares held for an asset.

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

Parameters

getAssetDepositCap

Returns the asset's current deposit cap.

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

Parameters

getSupportedAssets

Returns an array of all supported assets.

function getSupportedAssets() external view returns (address[] memory);

getAssetStrategies

Returns the EigenLayer strategies for all supported assets.

function getAssetStrategies() external view returns (address[] memory);

increaseSharesHeldForAsset

Increases the number of EigenLayer shares held for an asset.

function increaseSharesHeldForAsset(address asset, uint256 amount) external;

Parameters

decreaseSharesHeldForAsset

Decreases the number of EigenLayer shares held for an asset.

function decreaseSharesHeldForAsset(address asset, uint256 amount) external;

Parameters

increaseUnverifiedValidatorETHBalance

Increases the unverified validator ETH balance.

function increaseUnverifiedValidatorETHBalance(uint256 amount) external;

Parameters

decreaseUnverifiedValidatorETHBalance

Decreases the unverified validator ETH balance.

function decreaseUnverifiedValidatorETHBalance(uint256 amount) external;

Parameters

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.

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

Parameters

convertFromUnitOfAccountToAsset

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

function convertFromUnitOfAccountToAsset(address asset, uint256 value) external view returns (uint256);

Parameters

convertToSharesFromAsset

Converts an amount of an asset to the equivalent amount of EigenLayer shares.

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

Parameters

convertFromSharesToAsset

Converts an amount of EigenLayer shares to the equivalent amount of an asset.

function convertFromSharesToAsset(address strategy, uint256 shares) external view returns (uint256 amount);

Parameters

Events

AssetAdded

Emitted when a new asset is added.

event AssetAdded(AssetConfig config);

Parameters

AssetRemoved

Emitted when an asset is removed.

event AssetRemoved(address indexed asset, bool forced);

Parameters

AssetDepositCapSet

Emitted when an asset's EigenLayer strategy is set.

event AssetDepositCapSet(address indexed asset, uint96 newDepositCap);

Parameters

AssetPriceFeedSet

Emitted when an asset's price feed is set.

event AssetPriceFeedSet(address indexed asset, address newPriceFeed);

Parameters

AssetSharesIncreased

Emitted when the number of EigenLayer shares held for an asset is increased.

event AssetSharesIncreased(address indexed asset, uint256 amount);

Parameters

AssetSharesDecreased

Emitted when the number of EigenLayer shares held for an asset is decreased.

event AssetSharesDecreased(address indexed asset, uint256 amount);

Parameters

UnverifiedValidatorETHBalanceIncreased

Emitted when the unverified validator ETH balance is increased.

event UnverifiedValidatorETHBalanceIncreased(uint256 amount);

Parameters

UnverifiedValidatorETHBalanceDecreased

Emitted when the unverified validator ETH balance is decreased.

event UnverifiedValidatorETHBalanceDecreased(uint256 amount);

Parameters

Errors

ONLY_WITHDRAWAL_QUEUE_OR_DEPOSIT_POOL

Thrown when the caller is not the LRT withdrawal queue or deposit pool.

error ONLY_WITHDRAWAL_QUEUE_OR_DEPOSIT_POOL();

ASSET_NOT_SUPPORTED

Thrown when attempting an action on an unsupported asset.

error ASSET_NOT_SUPPORTED(address asset);

Parameters

ASSET_ALREADY_SUPPORTED

Thrown when attempting to add an asset that is already supported.

error ASSET_ALREADY_SUPPORTED(address asset);

Parameters

ASSET_HAS_BALANCE

Thrown when attempting to remove an asset with a non-zero balance.

error ASSET_HAS_BALANCE();

INVALID_ASSET_ADDRESS

Thrown when attempting to add an asset with an invalid address.

error INVALID_ASSET_ADDRESS();

INVALID_ASSET_DECIMALS

Thrown when an asset has greater than 18 decimals.

error INVALID_ASSET_DECIMALS();

INVALID_STRATEGY

Thrown when a srategy's underlying token does not match the asset.

error INVALID_STRATEGY();

INVALID_PRICE_FEED_DECIMALS

Thrown when a provided price feed has an unexpected amount of decimals.

error INVALID_PRICE_FEED_DECIMALS();

INVALID_PRICE_FEED

Thrown when a price feed is provided when not needed, or not provided when required.

error INVALID_PRICE_FEED();

Structs

AssetConfig

The configuration used to add a new asset.

struct AssetConfig {
    address asset;
    uint96 depositCap;
    address priceFeed;
    address strategy;
}

AssetInfo

Information about a supported asset.

struct AssetInfo {
    uint96 depositCap;
    address priceFeed;
    uint256 shares;
    address strategy;
    uint8 decimals;
}

Last updated