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

Incorrect Allowance Handling for Non-Standard Tokens

Summary

Initial approve calls during collateral registration may fail for tokens requiring allowance resets (e.g., USDT).

Vulnerability Details

In _registerCollateralToken, approve(_aaveV3Pool, type(uint256).max) is used. Tokens like USDT on Ethereum require allowance to be reset to zero before approval, causing the transaction to revert.

Impact

Collateral tokens requiring allowance resets cannot be registered, limiting protocol compatibility.

Tools Used

  • Manual Review

Recommendations

Replace approve with safeIncreaseAllowance in AaveDIVAWrapperCore._registerCollateralToken:

IERC20(_collateralToken).safeIncreaseAllowance(_aaveV3Pool, type(uint256).max);
Updates

Lead Judging Commences

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

Support

FAQs

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