IPriceFeed
IPriceFeed
Intermediary between oracle(s) and DomFiPerp.
Addresses
Chain | Address |
---|
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
Name | Type | Description |
---|---|---|
productId | ProductId | Product for which to retrieve price |
Return Values
Name | Type | Description |
---|---|---|
[0] | FPUnsigned | FPUnsigned Latest price for this product |
notifyPerp
function notifyPerp(ProductId productId, FPUnsigned value, uint64 timestamp) external