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

`override` used throughout `AaveDivaWrapper` but there is nothing to override nor functions labeled virtual

Summary

Each function in AaveDivaWrapperis labeled with override- implying that it is overriding and potentially adding its own logic to a function that is inherited from its parent contract.

The issue is that there is no reason for the functions to have override.

Vulnerability Details

The parent contract of AaveDivaWrapperis AaveDivaWrapperCore- so the use of overridewould mean that AaveDivaWrapperis adding its own logic to some functions in AaveDivaWrapperCore.

The issue is:

  1. None of the functions in AaveDivaWrapperCoreare labeled as virtual- so they can not be overriden anyways.

  2. The functions in AaveDivaWrapperdo not have the same name as the functions in AaveDivaWrapperCore- so they have no function to override.

  3. The functions in AaveDivaWrappersimply call the interal functions of AaveDivaWrapperCore

function addLiquidity(
bytes32 _poolId,
uint256 _collateralAmount,
address _longRecipient,
address _shortRecipient
) external override nonReentrant {
_addLiquidity(_poolId, _collateralAmount, _longRecipient, _shortRecipient);
function removeLiquidity(
bytes32 _poolId,
uint256 _positionTokenAmount,
address _recipient
) external override nonReentrant returns (uint256) {
return _removeLiquidity(_poolId, _positionTokenAmount, _recipient);
function redeemPositionToken(
address _positionToken,
uint256 _positionTokenAmount,
address _recipient
) external override nonReentrant returns (uint256) {
return _redeemPositionToken(_positionToken, _positionTokenAmount, _recipient);

Impact

This can cause some compilation issues or confusion.

Tools Used

Manual review

Recommendations

remove overridefrom the functions within AaveDivaWrapper

Updates

Lead Judging Commences

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.