HardhatDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

Chekinng if some amount is equal to type(uint256).max is wrong

Vulnerability Details

The checks in `AaveDIVAWrapperCore`, that checks if some amount is greater than the maximum uint256 is wrong.

because, if the user don't pass the maximum uint256, but pass a number bigger than his balance, the if statement won't execute, and may call the transfer with a wrong amount, making the transfer to revert, for example:

in this case

if (someAmount == type(uint256).max) {
someAmount = _userBalance;
}
This check is wrong and should be replace by:
if (someAmount > _userBalance) {
someAmount = _userBalance;
}
Updates

Lead Judging Commences

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Appeal created

fishy Submitter
6 months ago
bube Lead Judge
6 months ago
bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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