QA Report #11
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Chainlink's latestRoundData might return stale or incorrect results
Lines of code
https://github.com/code-423n4/2022-06-connext/blob/4dd6149748b635f95460d4c3924c7e3fb6716967/contracts/contracts/core/connext/helpers/ConnextPriceOracle.sol#L125
Vulnerability details
Impact
On
ConnextPriceOracle.sol
, you are using latestRoundData, but there is no check if the return value indicates stale data.Proof of Concept
Tools Used
This could lead to stale prices according to the Chainlink documentation:
https://docs.chain.link/docs/historical-price-data/#historical-rounds
https://docs.chain.link/docs/faq/#how-can-i-check-if-the-answer-to-a-round-is-being-carried-over-from-a-previous-round
Recommended Mitigation Steps
Add some checks in function getPriceFromChainlink()
The text was updated successfully, but these errors were encountered: