Chainlink’s multisigs can immediately block access to price feeds at will. Therefore, to prevent denial of service scenarios, it is recommended to query Chainlink price feeds using a defensive approach with Solidity’s try/catch structure. In this way, if the call to the price feed fails, the caller contract is still in control and can handle any errors safely and explicitly.
Call to latestRoundData
could potentially revert and make it impossible to query any prices. Feeds cannot be changed after they are configured in vaults (calculator is immutable)
https://github.com/Cyfrin/2023-12-the-standard/blob/91132936cb09ef9bf82f38ab1106346e2ad60f91/contracts/SmartVaultV3.sol#L24-L40
https://github.com/Cyfrin/2023-12-the-standard/blob/91132936cb09ef9bf82f38ab1106346e2ad60f91/contracts/LiquidationPool.sol#L22-L39
See https://medium.com/cyfrin/chainlink-oracle-defi-attacks-93b6cb6541bf#e100 for more details
Already created Vaults are locked (burn, mint, swap, liquidate, removeCollateral, removeCollateralNative all call oracle)
Loss of funds because can't withdraw, can't liquidate, funds are locked on the contract
N/A
Manual review
Surround the call to latestRoundData()
with try/catch
instead of calling it directly. In a scenario where the call reverts, the catch block can be used to call a fallback oracle or handle the error in any other suitable way.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.