Skip to main content

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

NameTypeDescription
configAddressaddressThe 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

NameTypeDescription
vaultAssetaddressThe address of the ERC4626-compliant vault.

Return Values

NameTypeDescription
priceuint256The raw price of one share in underlying asset decimals
decimalsuint8The number of decimals for the returned price (underlying asset decimals)