HardhatDeFi
15,000 USDC
View results
Submission Details
Severity: medium
Invalid

Missing Pause Mechanism in AaveDIVAWrapper

Summary

The AaveDIVAWrapper / AaveDIVAWrapperCore contract lacks a pause or emergency-stop mechanism, preventing the swift suspension of all functions in emergency situations. This design deficiency heightens the risk to user funds and the overall system if a critical vulnerability is discovered, as there is no direct means to freeze or restrict potentially harmful operations until a proper resolution is implemented.

Vulnerability Details

The contract architecture does not include a pause or emergency-stop mechanism, preventing the owner from halting all functionality in critical scenarios. This design shortcoming can expose users’ funds to additional risk if a severe bug or vulnerability is discovered, as there would be no immediate way to stop potentially harmful transactions. Although this absence does not constitute a direct exploit on its own, it increases the contract’s attack surface by limiting the available response options in emergency situations.

Impact

Without a dedicated pause mechanism, the contract cannot quickly suspend operations in the event of a critical vulnerability or exploit attempt. This limitation could lead to prolonged exposure and potential fund loss, as it prevents an immediate interruption of damaging transactions.

Proof of Concept

The AaveDIVAWrapper contract (and its internal logic within AaveDIVAWrapperCore) does not implement any mechanism to pause or freeze all operations immediately. If a critical issue arises, it is impossible to quickly halt activity, potentially exposing user funds to heightened risk.

Code Analysis

Below is a summarized example of how the main contract functions (e.g., createContingentPool) are handled, demonstrating the absence of a pause check before executing the logic:

function createContingentPool(
PoolParams calldata _poolParams
) external override nonReentrant returns (bytes32) {
// ... Preliminary code ...
// (!) No pause state verification (no `require(!paused)` or similar)
// Direct call to internal logic that cannot be halted
// without a dedicated pause mechanism
return _createContingentPool(_poolParams);
// ... Subsequent code ...
}

The same pattern applies to other critical functions such as:

  • addLiquidity

  • removeLiquidity

  • redeemPositionToken

  • redeemWToken

  • etc.

In each case:

function addLiquidity(...) external override nonReentrant {
// ... Preliminary code ...
// (!) No pause check before execution
_addLiquidity(_poolId, _collateralAmount, _longRecipient, _shortRecipient);
// ... Subsequent code ...
}

Explanation

  • Absence of a pause mechanism: Because there is no global “paused” variable or modifier (e.g., paused or emergencyStop), the contract owner or administrator cannot instantly halt operations in an emergency.

  • Risk: In the event of a vulnerability or unexpected behavior, users may continue interacting with the contract and potentially lose funds, as there is no method to freeze the core functions.

Possible Scenario

A malicious actor identifies a vulnerability in the createContingentPool function. Exploiting the absence of a pause capability, they repeatedly invoke it to extract value or disrupt the system’s intended operation. With no pause() or emergencyStop() available, there is no immediate way to suspend contract interactions, thereby escalating potential losses.

Recommendations

Implement a pause mechanism (Pausable or emergencyStop) that allows an authorized role to halt all contract functions in case of critical issues, thereby mitigating further damage or fund loss.

Updates

Lead Judging Commences

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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