MKR, a token currently active in Aave, cannot be registered as a collateral token because it will revert. As a result, it cannot be used through the AaveDIVAWrapper protocol.
When registering a collateral token via registerCollateralToken(), there is a line in AaveDIVAWrapperCore.sol:_registerCollateralToken() that calls the symbol() function of the token being registered. This function is used when creating the wrapped version of the token, prefixing its symbol with a w:
The problem arises because the IERC20Metadata interface expects symbol() to return a string, but in the case of MKR, the return type is bytes32. As a result, attempting to register MKR as a collateral token in AaveDIVAWrapper will revert at this line.
Not integrating the collateral tokens that returns bytes32 in symbol() function.
As stated in the compatibilities section of the contest:
Supported collateral tokens:
Any ERC20 token supported by Aave V3, but mainly stablecoins like USDC, USDT are expected to be used for DIVA Donate.
Fee-on-transfer and rebaseable tokens are NOT supported.
Tokens must have between 6-18 decimals.
Since MKR is currently supported in Aave, it should be compatible with the protocol. However, due to the type mismatch in the symbol() function, registering MKR as a collateral token will revert. Consequently, a wrapped version of MKR cannot be created, preventing its use in the protocol.
Users won't be able to create a contingent pool with an Aave supported token (MKR) through AaveDIVAWrapper protocol.
Owner won't be able to create yield with an Aave supported token (MKR).
Integrate with code the collateral tokens that returns bytes32 in symbol() function.
Add the next two functions to AaveDIVAWrapperCore.sol:
Now change some lines on _registerCollateralToken():
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.