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

Uniswap token is supported by AAVE but will revert on registerCollateralToken

Summary

In case of Uniswap UNI token _collateralTokenContract.approve(_aaveV3Pool, type(uint256).max); will revert as Uniswap only supports max value of < 2**96 as per their contract.

function approve(address spender, uint rawAmount) external returns (bool) {
uint96 amount;
if (rawAmount == uint(-1)) {
amount = uint96(-1);
} else {
amount = safe96(rawAmount, "Uni::approve: amount exceeds 96 bits");
}
allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
  • https://etherscan.io/address/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#code

Impact

UNI token can not be used as collateral but is supported by AAVA V3.

Tools Used

Manual Review

Recommendations

If UNI should be supported by Diva Donate then add a custom handling for it.

Updates

Lead Judging Commences

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

Appeal created

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

Support

FAQs

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