Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Invalid

Incorrect ReentrancyGuard Version Used in `StabilityPool` Upgradeable Contract

Summary

The contract imports ReentrancyGuard from OpenZeppelin's contracts, not the upgradeable version. Since this contract is upgradeable and uses Initializable, it should use the ReentrancyGuardUpgradeable to avoid storage clashes. However, the contract inherits from ReentrancyGuard, which is the non-upgradeable version. This could lead to storage layout issues when upgrading the contract, as the non-upgradeable ReentrancyGuard uses a different storage slot than the upgradeable version

Recommendations

To resolve this issue, replace the inheritance of the non-upgradeable ReentrancyGuard with the upgradeable version from OpenZeppelin, i.e., ReentrancyGuardUpgradeable. Make sure to call the __ReentrancyGuard_init function as part of the initialization process in the initializer function . Additionally, ensure that the contract abides by the storage gap requirements to maintain proper alignment and compatibility between contract upgrades.

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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