(, int basePrice, , , ) = baseAggregator.latestRoundData();
On ChainlinkPriceOracle.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:
Lines of code
https://github.com/code-423n4/2022-04-phuture/blob/594459d0865fb6603ba388b53f3f01648f5bb6fb/contracts/ChainlinkPriceOracle.sol#L83
Vulnerability details
https://github.com/code-423n4/2022-04-phuture/blob/594459d0865fb6603ba388b53f3f01648f5bb6fb/contracts/ChainlinkPriceOracle.sol#L83
On
ChainlinkPriceOracle.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: