DeFiHardhat
35,000 USDC
View results
Submission Details
Severity: low
Invalid

getEthUsdPrice function can have collision

Summary

getEthUsdPrice function can have collision

Vulnerability Details

Two functions has the same name and returns two different paameters
1.The first getEthUsdPrice returns the libChainlinkOracle
2. The second getEthUsdPrice returns the TWAP using look back and getPrice of chainlink Oracle as the first
one
The first returns getPrice from the chainlink Oracle The second getEthUsdPrice returns 2 parameters

Impact

Having two functions with the same name increases the risk of confusion among the users and devs of the contract. This can lead to potential collision between the functions and other uninetnded behaviours resulting in uncontrolled and unpredictable outcomes.

Tools Used

Manual Review

Recommendations

Remove the declared function of getPrice so that the Lib EthUsd can use only getEthUsdPrice which returns 2 parameters.

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Invalid

Support

FAQs

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