DittoETH

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

BalancedVault

Summary

The bug was in the "YieldFacet" contract that allows VaultUser to easily deposit amount and automatically claimDittoMatchedReward

if (userReward > type(uint80).max) revert Errors.InvalidAmount();

must be

if (userReward > type(uint80).max)type(uint80).sub revert Errors.InvalidAmount();

Vulnerability Details

Impact

The impact is cause is underflow in an arithmetic operation which causes a revert in this line :
"userReward" can be bigger than "type(uint80)"

Tools Used

Manual check and vscode

Recommendations

The fix is simple

"userReward" must not be bigger than "type(uint80)"
in other words "type(uint80)" must be the max of itself and "userReward"

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.