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

Collision can occur with precision parameters

Summary

Collision can occur with precision variable

Vulnerability Details

In the Lib Oracle contract it importing C. Sol Internal PRECISION vlaue and it declared in the protocol/contracts/libraries/Oracle/LibChainlinkOracle.sol.
The Libchainlinloracle Lib = 1e6, The Constant.Sol = 1e18

Impact

Different precision values for PRECISION and the imported Constant.sol can cause cause confusion among developers collision can occur between the functions that rely on these values leading to errors and unintended behaviour in the codebase

Tools Used

Manual Review

Recommendations

Remove the declared PRECISION in the LibChainlinkOracle and set the imported Constant.sol to 1e6 instead of 1e18 since the goal of getTwap and getPrice will be scaled down to. 1e6 because of bean token.

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.