IOracleMiddlewareWithDataStreams
Inherits: ICommonOracleMiddleware, IChainlinkDataStreamsOracle
The oracle middleware is a contract that is used by the USDN protocol to validate price data. Using a middleware allows the protocol to later upgrade to a new oracle logic without having to modify the protocol's contracts.
This middleware uses Chainlink Data Streams and Pyth as the low-latency oracle, and Chainlink Data Feeds as fallback. For liquidations, either Pyth or Data Streams can be used. For validations, only Data Streams is accepted.
Functions
setDataStreamsRecentPriceDelay
Sets the amount of time after which we do not consider a price as recent for Chainlink.
function setDataStreamsRecentPriceDelay(uint64 newDelay) external;
Parameters
Name | Type | Description |
---|---|---|
newDelay | uint64 | The maximum age of a price to be considered recent. |