On ChainlinkOracle.sol, we are using latestRoundData, but there is no check if the return value indicates stale data. This could lead to stale prices according to the Chainlink documentation:
Agree with the finding, while you can get started with Chainlink's feed can be used with one line of code, in a production environment it is best to ensure that the data is fresh and within rational bounds
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-12-perennial/blob/fd7c38823833a51ae0c6ae3856a3d93a7309c0e4/protocol/contracts/oracle/ChainlinkOracle.sol#L50-L60
On
ChainlinkOracle.sol
, we are usinglatestRoundData
, but there is no check if the return value indicates stale data. This could lead to stale prices according to the Chainlink documentation:Recommendation
Consider adding missing checks for stale data.
For example: