The vulnerability arises from the initialization process of Contract 2, which requires an address (specifically this—the address of Contract 1) to function properly. However, Contract 1 does not initialize Contract 2 with address, preventing Contract 1 from interacting with Contract 2 to mint wrapped tokens. As a result, Contract 1 lacks the permission to mint using Contract 2, leading to an authorization issue. Since Contract 2 expects address(this) which will assign himself (the contract) onlyOwner permissions.
This issue comes from WToken.sol, since as seen in the comment here for _owner it expects address(this). It would be correct if AaveDivaWrapperCore.sol was setting the constructor value.
Hence, when User is trying to addLiqudity or createContingentPool it will always fail
Medium mint logic is unusable since aaveDivaWrapperCore.sol has no permissions to call mint
Manual Review
set WToken.sol constructor when initializing the AaveDIVAWrapperCore.sol
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.