Platform: Code4rena
Start Date: 19/04/2022
Pot Size: $30,000 USDC
Total HM: 10
Participants: 43
Period: 3 days
Judges: moose-code, JasoonS
Total Solo HM: 7
Id: 90
League: ETH
Rank: 41/43
Findings: 1
Award: $22.05
🌟 Selected for report: 0
🚀 Solo Findings: 0
22.0499 USDC - $22.05
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.
Manual Review / VSCode
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:
( roundId, rawPrice, , updateTime, answeredInRound ) = baseAggregator.latestRoundData(); require(rawPrice > 0, "price <= 0"); require(updateTime != 0, "incomplete round"); require(answeredInRound >= roundId, "stale price");
#0 - olivermehr
2022-05-02T20:30:53Z
Duplicate issue of #1