DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: low
Valid

Incorrect check for cRation_MAX

Summary

The current implementation of the check stops the user for increasing the collateral with the exact max amount.

Vulnerability Details

However this is not a problem and funds are not at risk, it may be confusing for the user, the error he is going to see states that the amount sent by him is higher than the maximum, as it will still revert if it is equal to the maximum.

Impact

Tools Used

Manual Review

Recommendations

Change this code:
if (cRatio >= Constants.CRATIO_MAX) revert Errors.CollateralHigherThanMax();
to this code
if (cRatio > Constants.CRATIO_MAX) revert Errors.CollateralHigherThanMax();

or implement a better error message if this is the intended behavior.

Updates

Lead Judging Commences

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

finding-326

Support

FAQs

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