In AaveDIVAWrapperCore, there is currently no mechanism to safely increase WToken allowance of the DIVA pool which may brick certain core contract functionalities.
When registering a new collateral token (e.g. USDC), a corresponding maximum allowance of the collateral token will be approve to the Aave Pool and WToken will be approved to the DIVA pool.
The protocol implements _approveCollateralTokenForAave to safely increase the allowance of the collateral token for the Aave pool in the event its allowance is exhausted.
However, the same mechanism is not extended to the DIVA pool for WTokens. This means in the event that the DIVA pool has exhausted its allowance for a WToken, core protocol functionalities (e.g. adding liquidity, creating contigent pool) will not work since transferring WToken from the Wrapper to the pool contract is not possible.
Protocol functionality will not work in the event where WToken allowance is exhausted
Consider adding a mechanism to increase the allowance of WToken for the DIVA pool
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.