Large Orchid Seal
Medium
DebitaChainlink::getPrice
is not checking answeredInRound
value. The data returned can be incorrect due to an incomplete round.
answeredInRound
returns the round ID of the round in which the answer was computed. We should verify that answeredInRound >= roundId
to ensure that the data we are seeing is fresh.
Incorrect price returned by oracle can be very damaging to the protocol.
Manual Review
Add the check require(answeredInRound >= roundId)
in getPrice
.