validate oracle data properly #90
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
invalid
This doesn't seem right
out of scope
Lines of code
https://github.com/code-423n4/2022-08-frax/blob/main/src/contracts/FraxlendPairCore.sol#L524
https://github.com/code-423n4/2022-08-frax/blob/main/src/contracts/FraxlendPairCore.sol#L532
Vulnerability details
Impact
You should check how recent the Chainlink Oracle's data is. Recently we had the UST oracle that was paused which some protocols didn't handle properly: https://ambcrypto.com/chainlink-how-a-price-discrepancy-resulted-in-millions-lost-from-defi-protocols/
Currently, you only check whether the price is 0 or negative. Here's Chainlink's documentation on risk mitigation
Tools Used
none
Recommended Mitigation Steps
At least verify that the data is recent. This depends on the oracle. They push updates at different time intervals.
The text was updated successfully, but these errors were encountered: