Protocol uses Chainlink as one of the oracles that provides prices for the assets. Chainlink's latestRoundData is used but the implementation is missing important security checks that can result in stale and incorrect prices being returned.
It is recommended to add checks on the returned data of latestRoundData with proper revert messages if the price is stale or the round is incomplete, for example:
Lines of code
Vulnerability details
Impact
Protocol uses Chainlink as one of the oracles that provides prices for the assets. Chainlink's
latestRoundData
is used but the implementation is missing important security checks that can result in stale and incorrect prices being returned.Proof of Concept
Tools Used
Manual Review / VSCode
Recommended Mitigation Steps
It is recommended to add checks on the returned data of
latestRoundData
with proper revert messages if the price is stale or the round is incomplete, for example: