Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: medium
Valid

No functionality to update/reset token price feed in `ChainlinkARBOracle`

Vulnerability Details

For the function:

function addTokenPriceFeed(address token, address feed) external onlyOwner {
if (token == address(0)) revert Errors.ZeroAddressNotAllowed();
if (feed == address(0)) revert Errors.ZeroAddressNotAllowed();
if (feeds[token] != address(0)) revert Errors.TokenPriceFeedAlreadySet();
feeds[token] = feed;
}

In case when incorrect price feed is set by the owner for a token (it can happen), then it is not possible to reset to correct one and the token will become permanently unusable for the protocol.

Impact

feeds[token] cannot be reset once it is set.

Tools Used

Manual

Recommendations

Add a function called updateTokenPriceFeed() so this never becomes an issue.

Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

Chainlink price feed can not be updated

Impact: High Likelihood: Low

Support

FAQs

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