The protocol attempts to approve type(uint256).max for collateral tokens, but since tokens like UNI enforces a 96-bit limit on approvals, this call will always revert, preventing tokens like UNI from being registered as a collateral token even though they are supported by Aave.
The protocol states in the README that supported collateral tokens are:
Any ERC20 token supported by Aave V3, but mainly stablecoins like USDC, USDT are expected to be used for DIVA Donate.
UNI is a token supported by Aave. When UNI.approve() is called, UNI reverts if the approval amount is 2^96 or larger. Here's the code from the UNI contract on Ethereum:
https://etherscan.io/address/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#code
In AaveDIVAWrapperCore::_registerCollateralToken, type(uint256).max is passed as the approval amount for collateral token which will always revert when trying to register UNI as a collateral token:
Tokens like UNI that are Aave supported aren't compatible with the protocol.
Manual review
If you want to really support all tokens Aave supports, use uint96 - 1 and then update the increase allowance functions to increase to uint96 - 1
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.