Closed sherlock-admin3 closed 8 months ago
3 comment(s) were left on this issue during the judging contest.
panprog commented:
invalid, chainlink oracle is trusted
tsvetanovv commented:
According to Smilee Readme and Sherlock documentation this issue type is invalid
takarez commented:
invalid
mgf15
medium
Chainlink's
latestRoundData
might return stale or incorrect resultsSummary
Chainlink's latestRoundData() is used but there is no check if the return value indicates stale data. This could lead to stale prices according to the Chainlink documentation:
https://docs.chain.link/docs/historical-price-data/#historical-rounds
Vulnerability Detail
The
ChainlinkPriceOracle._getFeedValue
function uses Chainlink's latestRoundData() to get the latest price. However, there is no check if the return value indicates stale data.Impact
The Pricer could return stale price data for the underlying asset.
Code Snippet
https://github.com/sherlock-audit/2024-02-smilee-finance/blob/3241f1bf0c8e951a41dd2e51997f64ef3ec017bd/smilee-v2-contracts/src/providers/chainlink/ChainlinkPriceOracle.sol#L110
Tool used
Manual Review
Recommendation
Consider adding checks for stale data.