Solidity API
OrionAssetERC4626PriceAdapter
Price adapter for ERC-4626 vaults sharing the same underlying asset as the Orion protocol.
This adapter assumes that the target vault and the Orion protocol use the same underlying asset. It is not safe to use this adapter with vaults that are based on a different asset.
config
contract IOrionConfig config
Orion Config contract address
underlyingAsset
address underlyingAsset
Underlying asset address
underlyingAssetDecimals
uint8 underlyingAssetDecimals
Decimals of the underlying asset
constructor
constructor(address configAddress) public
Constructor
Parameters
Name | Type | Description |
---|---|---|
configAddress | address | The address of the OrionConfig contract |
getPriceData
function getPriceData(address vaultAsset) external view returns (uint256 price, uint8 decimals)
Returns the raw price of one share of the given ERC4626 vault in underlying asset decimals.
The asset shall be whitelisted in the OrionConfig contract. The registry will handle normalization to priceAdapterDecimals.
Parameters
Name | Type | Description |
---|---|---|
vaultAsset | address | The address of the ERC4626-compliant vault. |
Return Values
Name | Type | Description |
---|---|---|
price | uint256 | The raw price of one share in underlying asset decimals |
decimals | uint8 | The number of decimals for the returned price (underlying asset decimals) |