Core Contracts

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

Use ReentrancyGuardUpgradeable for Upgradable StabilityPool Contract

Summary

The StabilityPool contract inherits from ReentrancyGuard, which is not compatible with upgradable contracts. To ensure compatibility with upgradable proxy patterns, the contract should use ReentrancyGuardUpgradeable instead. This will allow the contract to avoid potential issues when upgrading via proxy, where state variables from the base contract might conflict.

Vulnerability Details

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/StabilityPool/StabilityPool.sol#L21

Currently, the contract inherits from ReentrancyGuard, however, ReentrancyGuard is not designed to be used in upgradable contracts. For upgradable contracts, you should use the ReentrancyGuardUpgradeable from OpenZeppelin, which is specifically designed to be compatible with proxies.

Impact

If the contract is upgraded in the future, the reentrancy guard may not work as intended.

Tools Used

Maual review

Recommendations

Modify the inheritance to use ReentrancyGuardUpgradeable instead of ReentrancyGuard

Updates

Lead Judging Commences

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

Support

FAQs

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