DittoETH

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

Combined short record might exceed the maximum collateral ratio (CRATIO_MAX)

Summary

The combined short record might exceed the maximum collateral ratio (CRATIO_MAX).

Vulnerability Details

The collateral of a short record can be increased in two distinct manners:

  1. Boosting collateral (Refer to ShortRecordFacet#increaseCollateral)

  2. Merging short records (Refer to ShortRecordFacet#combineShorts)

While there's a cap in place for CR in the first method, ensuring it doesn't surpass CRATIO_MAX, the same restriction is absent in the second method.

Impact

A short record formed via the merging of other short records might result in a CR that surpasses the CRATIO_MAX limit.

Tools Used

Manual

Recommendations

Add the subsequent validation to ShortRecordFacet#combineShorts

if (cRatio >= Constants.CRATIO_MAX) revert Errors.CollateralHigherThanMax();
Updates

Lead Judging Commences

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

finding-411

Support

FAQs

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