Boxy Gingham Condor - Lack of Reserved Storage Slots for Future Upgrades #50
Labels
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Won't Fix
The sponsor confirmed this issue will not be fixed
Boxy Gingham Condor
Medium
Lack of Reserved Storage Slots for Future Upgrades
Summary
The
PriceOracleAggregator
contract inherits from theUUPSUpgradeable
andOwnable2StepUpgradeable
modules, enabling it to support upgrades. However, the contract does not include reserved storage slots to prevent storage layout collisions in future upgrades.When new state variables are added in a subsequent upgrade, they may overwrite storage occupied by other variables, resulting in unexpected behavior or loss of data. This issue is particularly critical for proxy-based upgradeable contracts, where the storage layout must remain consistent across versions.
Add reserved storage slots to the contract for future upgrades. This ensures that additional state variables can be safely introduced without affecting the storage layout.
The text was updated successfully, but these errors were encountered: