15,000 USDC
View results
Submission Details
Severity: medium
Valid

Chainlink latestRoundData validation

Summary

Oracle price could be zero.

Vulnerability Details

function staleCheckLatestRoundData(AggregatorV3Interface priceFeed)
public
view
returns (uint80, int256, uint256, uint256, uint80)
{
(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) =
priceFeed.latestRoundData();
uint256 secondsSince = block.timestamp - updatedAt;
if (secondsSince > TIMEOUT) revert OracleLib__StalePrice();
return (roundId, answer, startedAt, updatedAt, answeredInRound);
}

Impact

The logic of staleCheckLatestRoundData allow to return a zero Price, it must be checked in order to avoid errors.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.