No Return Data Checks on Chainlink's latestRoundData() Might Return Stale Prices #296
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/c4189a3a98b38c8c962c5ea72f1a322fbc2ae45f/src/contracts/FraxlendPairCore.sol#L524
https://github.com/code-423n4/2022-08-frax/blob/c4189a3a98b38c8c962c5ea72f1a322fbc2ae45f/src/contracts/FraxlendPairCore.sol#L532
Vulnerability details
Impact
The _updateExchangeRate function of FraxlendPairCore contract gets price using
chainlink latestRoundData function. However it lacks the check on the return data and
this might lead to stale prices.
Proof of Concept
Tools Used
Manual Analysis
Recommended Mitigation Steps
I recommend adding checks on the return data as following.
The text was updated successfully, but these errors were encountered: