DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Wrong `REPORT_PRICE_DECIMALS` in `BaseKeeper`

Summary

The src\external\chainlink\keepers\BaseKeeper.sol contract holds a constant variable

uint8 internal constant REPORT_PRICE_DECIMALS = 8;

Vulnerability Details

The contract assumes every price reported by a Chainlink data stream report will have 8 decimals.

However that is not always the case and these price will most likely have 18 decimals.

Impact

This variable is not yet used in the protocol however, in a future implementation, this value should be retrieved from the stream contract that is being used.

Tools Used

Manual review

Recommendations

In a future implementation, make sure to retrieve the decimals number from the stream before and scaled it correctly before using it in Zaros.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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