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(bytes32 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
productIdbytes32Product for which to retrieve price

Return Values

NameTypeDescription
[0]FPUnsignedFPUnsigned Latest price for this product

notifyPerp

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