In some extreme cases, oracles can be taken offline or token prices can fall to zero. Therefore a call to chainlink’s latestRoundData
could potentially revert and none of the circuit breakers would fallback to query any prices automatically.
The chainlink oracle is used in the system to convert the tokens into USD and convert USD to EUR value while liquidating the vault. But the protocols assume that chainlink oracle never reverts and always returns something as answer
when calling latestRoundData
. The issue arises from the possibility that Chainlink multisignature entities might intentionally block access to the price feed. In such a scenario, the invocation of the latestRoundData
function could potentially trigger a revert, which will make liquidation process failed, as they would be incapable of querying any price data or specific information.
LiquidationPool
contract:
function distributeAssets(ILiquidationPoolManager.Asset[] memory _assets, uint256 _collateralRate, uint256 _hundredPC) external payable {
. . . . . . . . . . . . .
(,int256 priceEurUsd,,,) = Chainlink.AggregatorV3Interface(eurUsd).latestRoundData();
. . . . . . . . . . . . .
(,int256 assetPriceUsd,,,) = Chainlink.AggregatorV3Interface(asset.token.clAddr).latestRoundData()
. . . . . . . . . . . . .
}
In certain exceptional circumstances, Chainlink has already taken the initiative to temporarily suspend specific oracles. As an illustrative instance, during the UST collapse incident, Chainlink opted to halt the UST/ETH price oracle to prevent the dissemination of erroneous data to various protocols.
Additionally, these dangerous oracle's scenarios are very well documented by OpenZeppelin in https://blog.openzeppelin.com/secure-smart-contract-guidelines-the-dangers-of-price-oracles.
If a configured Oracle feed has malfunctioned or ceased operating, it will produce a revert when checking for latestRoundData that would need to be manually handled by the system.
Manual review
Using other off-chain oracle providers, or using Uniswap's TWAP when chainlink failed to get price.
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.