Skip to Content
EvmContract ReferenceExtensionISLAYOracle

ISLAYOracle

Interface for the SatLayer Oracle contract to manage and retrieve price data for vaults.

Functions

getPriceId

Returns the price ID for a given asset.

function getPriceId(address asset) external view returns (bytes32);

Parameters

NameTypeDescription
assetaddressThe asset address to query.

Returns

NameTypeDescription
<none>bytes32priceId The price feed identifier for the asset.

setPriceId

Sets or updates the price ID for an asset.

Only callable by the contract owner.

function setPriceId(address asset, bytes32 priceId) external;

Parameters

NameTypeDescription
assetaddressThe asset address as key.
priceIdbytes32The price feed identifier to associate with the asset.

getPrice

Fetches the price for a given price ID.

function getPrice(bytes32 priceId) external view returns (uint256);

Parameters

NameTypeDescription
priceIdbytes32The price feed identifier to query.

Returns

NameTypeDescription
<none>uint256price The price in minor units (18 decimals).

getPrice

Fetches the price for a given asset

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

Parameters

NameTypeDescription
assetaddressThe asset address to query.

Returns

NameTypeDescription
<none>uint256price The price in minor units (18 decimals).

getOperatorAUM

Computes an operator’s total Assets Under Management (AUM) in USD minor units (18 decimals).

Any underlying asset with more than 18 decimals might lose precision.

function getOperatorAUM(address operator) external view returns (uint256 aum);

Parameters

NameTypeDescription
operatoraddressThe operator address whose vaults will be aggregated.

Returns

NameTypeDescription
aumuint256Total AUM in USD expressed with 18 decimals.

getVaultAUM

Computes a vault’s Assets Under Management (AUM) in USD minor units (18 decimals).

Any underlying asset with more than 18 decimals might lose precision.

function getVaultAUM(address vault) external view returns (uint256);

Parameters

NameTypeDescription
vaultaddressThe vault address to query.

Returns

NameTypeDescription
<none>uint256aum Vault AUM in USD expressed with 18 decimals.

Events

PriceIdSet

Emitted when a price ID is set or updated for an asset.

event PriceIdSet(address indexed asset, bytes32 indexed priceId);

Parameters

NameTypeDescription
assetaddressThe asset address.
priceIdbytes32The price feed identifier associated with the asset.

Errors

PriceIdNotSet

Emitted when a price ID is not set for an asset.

error PriceIdNotSet(address asset);

Parameters

NameTypeDescription
assetaddressThe asset address.
Last updated on