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

Wrong parameter order calling to the Core constructor in `AaveDIVAWrapper`

Description:
The contract `AaveDIVAWrapper`, inherits from `AaveDIVAWrapperCore` wich is an abstract contract that handles all the logic of the contract. As it is inheriting of the contract, it should initialize the constructor what is done but the problem is that parameters are beeing passed in a wrong order.
Impact:
The contract won't be util so it will require to re-deploy the contract.
Proof Of Concept:
The `AaveDIVAWrapperCore` contract gets 3 parameters in the constructor:
```
constructor(address diva_, address aaveV3Pool_, address owner_) Ownable(owner_)
```
But in the `AaveDIVAWrapper` we are calling the same constructor in this way:
```
constructor(address _aaveV3Pool, address _diva, address _owner) AaveDIVAWrapperCore(_aaveV3Pool, _diva, _owner)
```
Wich is wrong
Reccomened Mitigation:
Should change the order in wich the constructor parameters are called
```diff
- constructor(address _aaveV3Pool, address _diva, address _owner) AaveDIVAWrapperCore(_aaveV3Pool, _diva, _owner)
+ constructor(address _aaveV3Pool, address _diva, address _owner) AaveDIVAWrapperCore(_diva,_aaveV3Pool, _owner)
```
Updates

Lead Judging Commences

bube Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Constructor arguments mismatch

Support

FAQs

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