The StabilityPool contract inherits OpenZeppelin’s ReentrancyGuard but does not properly initialize it in the constructor. As a result, the reentrancy protection mechanism remains inactive, exposing the contract to potential reentrancy attacks on functions handling external calls.
Issue:
The contract inherits ReentrancyGuard, but it does not invoke _initialize in the constructor or initialization function. This omission leaves the contract’s anti-reentrancy mechanisms disabled, potentially allowing attackers to exploit vulnerable functions.
Root Cause:
The missing initialization of ReentrancyGuard prevents it from properly enforcing its protection.
Affected Code:
The constructor or initialization function should include the following missing initialization:
Reentrancy Attack Risk:
Without proper initialization, functions that should be protected by nonReentrant remain unguarded, potentially allowing attackers to repeatedly call them before state changes finalize.
Potential Financial Exploits:
If an attacker can manipulate contract balances before an update occurs, they may drain funds or create unexpected behavior in the system.
Initialize ReentrancyGuard Properly:
Ensure ReentrancyGuard is activated during contract setup by adding:
Modify the initialize Function:
Add the missing initialization in the setup process:
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.