The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

In some extreme cases, oracles can be taken offline or token prices can fall to zero. Therefore a call to `latestRoundData()` could potentially revert.

Summary

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.

Vulnerability Details

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.

Impact

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.

Tools Used

Manual review

Recommendations

Using other off-chain oracle providers, or using Uniswap's TWAP when chainlink failed to get price.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Chainlink-price

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

Chainlink-price

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.