Skip to main content

IPriceFeed

IPriceFeed

Intermediary between oracle(s) and DomFiPerp.

Addresses

ChainAddress

Functions

getPrice

Retrieve the latest price for a product

function getPrice(ProductId productId) external view returns (FPUnsigned)
Dev note

Once this method has succeeded for a particular productId, it should always succeed. Intermittent reverts will prevent users from closing positions and otherwise stop DomFiPerp from operating properly.

Parameters

NameTypeDescription
productIdProductIdProduct for which to retrieve price

Return Values

NameTypeDescription
[0]FPUnsignedFPUnsigned Latest price for this product

notifyPerp

function notifyPerp(ProductId productId, FPUnsigned value, uint64 timestamp) external