In getPrice()
function when aggregator.minAnswer()
and aggregator.maxAnswer()
are called they will return min. and max. answer values in price range. When the answer
came from priceFeed.latestRoundData()
will be equal to one of these values that should be considered valid price. Since it is within the range
But currently when answer
is equal to minAnswer
or maxAnswer
the function will revert with Errors.OraclePriceFeedOutOfRange(address(priceFeed))
error. This is wrong. The minAnswer
or maxAnswer
allowed prices from range that's why when answer
is equal to one of these the answer
must be considered valid. But currently it will be considered invalid and function will revert.
Valid answer
value will be considered invalid. When answer
is equal to minAnswer
or maxAnswer
the function will revert with Errors.OraclePriceFeedOutOfRange(address(priceFeed))
error.
Manual review
Do not revert it when answer
is equal to minAnswer
or maxAnswer
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.