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

Direct Interface Inheritance Enhances Clarity and Maintainability in `AaveDIVAWrapper` Contract`

Summary

The AaveDIVAWrapper contract does not directly inherit the IAaveDIVAWrapper interface, relying on indirect inheritance through AaveDIVAWrapperCore. While this approach is functional, direct inheritance of the interface in AaveDIVAWrapper would make the contract’s relationship to the interface explicit. This enhances clarity, reduces ambiguity, and improves code maintainability.

Vulnerability Details

The AaveDIVAWrapper contract relies solely on AaveDIVAWrapperCore for its interface implementation without directly declaring its dependency on IAaveDIVAWrapper.

Impact

  • Readability: Developers reviewing the AaveDIVAWrapper contract might need to trace through its inheritance tree to confirm that it adheres to the IAaveDIVAWrapper interface.

  • Maintainability: Changes to AaveDIVAWrapperCore that affect the implementation of IAaveDIVAWrapper could introduce unintended side effects in AaveDIVAWrapper.

  • Auditability: Indirect inheritance adds complexity for auditors verifying interface compliance.

Tools Used

Manuel Review

Recommendations

Refactor AaveDIVAWrapper to directly inherit IAaveDIVAWrapper. This ensures that the contract’s relationship with the interface is clear and explicitly stated in its declaration.

+ import {IAaveDIVAWrapper} from "./interfaces/IAaveDIVAWrapper.sol";
- contract AaveDIVAWrapper is AaveDIVAWrapperCore, ReentrancyGuard {
+ contract AaveDIVAWrapper is IAaveDIVAWrapper, AaveDIVAWrapperCore, ReentrancyGuard {

While this finding primarily affects developer experience, readability, and future maintenance, it does not create an immediate functional vulnerability. However, in complex systems like AaveDIVAWrapper, clarity and explicitness are valuable for long-term sustainability, especially in protocols with multiple contributors.

Updates

Lead Judging Commences

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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