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

[L-02] Lack of access control in approveCollateralTokenForAave Function

Summary

The approveCollateralTokenForAave function in the AaveDIVAWrapper contract is designed to be publicly accessible, allowing any user to reset token allowances for Aave. While this is an intentional design choice, it warrants documentation for transparency and user awareness.

Recommendations

Add clearer documentation and consider implementing event logging for allowance modifications

/// @notice Approves collateral tokens for Aave protocol
/// @dev Intentionally public to allow users to reset allowances when needed
/// @dev Only works with registered collateral tokens and Aave protocol address
function approveCollateralTokenForAave(address _collateralToken) external override {
_approveCollateralTokenForAave(_collateralToken);
emit CollateralTokenApproved(_collateralToken, msg.sender);
}
Updates

Lead Judging Commences

bube Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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