The AaveDIVAWrapper contract passes constructor parameters in the wrong order, swapping aaveV3Pool_ and diva_, causing address mismatches. This misconfiguration leads to failed interactions with the Aave V3 Pool and Diva protocol, resulting in a protocol-wide DoS.
While the test suite works correctly due to manually passing the right order, the deployment script remains the incorrect order.
The AaveDIVAWrapper contract inherits from AaveDIVAWrapperCore, which expects three parameters in its constructor: diva_, aaveV3Pool_, and owner_. However, in the AaveDIVAWrapper constructor, these parameters are passed in an incorrect order as aaveV3Pool_, diva_, and owner_, leading to a mismatch.
The test suite in AaveDIVAWrapper.test.ts still works correctly because it correctly passes diva_, aaveV3Pool_, and owner_ to the constructor. However, if the order of diva_ and aaveV3Pool_ is swapped and the tests are rerun, most test cases will fail.
The parameter order of AaveDIVAWrapperCore is diva_, aaveV3Pool_, and owner_.
However, the parameter order of AaveDIVAWrapper constructor is aaveV3Pool_, diva_, and owner_.
Due to the parameter mismatch, the diva_ contract address stored in AaveDIVAWrapper will be incorrectly set to the address of the Aave V3 Pool, while the aaveV3Pool_ address will be set to the Diva protocol address. As a result, all operations that interact with the Aave V3 Pool and Diva protocol will fail, as the contract will attempt to execute calls against the wrong addresses. Since these interactions are critical for the protocol’s functionality, this issue effectively causes a protocol-wide denial of service (DoS).
This issue is highly likely to happen, as the parameter order in the deployment file deployAaveDIVAWrapper.ts is incorrect.
Manual Review
Pass the correct order of the parameter to the AaveDIVAWrapper constructor:
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.