DittoETH

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

Downcating can cause unexpected gas and impact function behaviour

Summary

Downcating can cause unexpected gas and impact function behaviour

Vulnerability Details

Unsafe downcasting of base m.gasFee in _performForcedBid() function results in breaking of accounting that impact the gasFee once it exceeds uint88.

Impact

Converting uint256 values into uint88 will clearly cause breaking of accounting result in overflow that will break the functionality of the whole function.

Tools Used

Manual code review.

Recommendations

Simply remove uint88 and used default values to avoid breakage of gasfee.

- m.gasFee = uint88(gasUsed * block.basefee); // @dev(safe-cast)
+ m.gasFee = gasUsed * block.basefee; // @dev(safe-cast)
Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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