Judge has assessed an item in Issue #254 as 2 risk. The relevant finding follows:
[L-5] Chainlink's latestRoundData return stale or incorrect result
Impact
On PriceFeed.sol, you are using latestRoundData, but there is no check if the return value indicates stale data. The current check quoteAnswer > 0 not enough to ensure the staleness .
Judge has assessed an item in Issue #254 as 2 risk. The relevant finding follows:
[L-5] Chainlink's latestRoundData return stale or incorrect result
Impact
On PriceFeed.sol, you are using latestRoundData, but there is no check if the return value indicates stale data. The current check
quoteAnswer > 0
not enough to ensure the staleness .This could lead to stale prices according to the Chainlink documentation: https://docs.chain.link/data-feeds/price-feeds/historical-data Related report: https://github.com/code-423n4/2021-05-fairside-findings/issues/70
https://github.com/code-423n4/2024-05-predy/blob/a9246db5f874a91fb71c296aac6a66902289306a/src/PriceFeed.sol#L46-L52
Recommended Mitigation
Incorporate the required checks to ensure the staleness