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

Collateral Tokens which does not support approve type(uint256).max amount cannot be registered

Summary

AaveDIVAWrapperCore::_registerCollateralToken function will not work for some tokens that don't support approve type(uint256).max amount.

Vulnerability Details

There are tokens that doesn't support approve spender type(uint256).max amount. So the AaveDIVAWrapperCore::_registerCollateralToken will not work for some tokens like UNI or COMP who will revert when approve type(uint256).max amount.

_collateralTokenContract.approve(_aaveV3Pool, type(uint256).max); < =
emit CollateralTokenRegistered(_collateralToken, _wToken);
return _wToken;

Impact

Tokens that don't support approve type(uint256).max amount could not be registered as a collateral token and be deposited by users.

Tools Used

Manual Review

Recommendations

Try approving a very large amount instead of type(uint256).max

Updates

Lead Judging Commences

bube Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Appeal created

topptiger Submitter
5 months ago
bube Lead Judge
5 months ago
bube Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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