The _handleTokenOperations function and batch operations in AaveDIVAWrapper are vulnerable to interruption if used with pausable tokens like BNB and ZIL that can be frozen mid-operation.
The issues arise because _handleTokenOperations performs multiple transfers:
https://github.com/Cyfrin/2025-01-diva/blob/main/contracts/src/AaveDIVAWrapperCore.sol#L423
This affects:
Pool creation
Liquidity addition
Both individual and batch operations
When a token pause occurs between the initial safeTransferFrom and the Aave supply operation, it traps collateral in the contract while preventing completion of the intended operation. This breaks the protocol's token flow by allowing a successful first transfer but failing the subsequent supply step, creating an unrecoverable state where collateral is locked but corresponding wTokens cannot be minted. In batch operations, this vulnerability is amplified as a mid-batch pause forces all subsequent operations to fail, potentially trapping multiple users' collateral and disrupting protocol operations at scale.
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.