stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Valid

No storage gaps for upgradeable contracts might lead to storage slot collision

Summary

When implementing upgradable contracts that inherit it is important that there are storage gaps, incase new storage variables are later added to the inherited contracts. If a storage gap variable isn't added, when the upgradable contract introduces new variables ,it may override the variables in the inheriting contract. https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts

Tools Used

Manual Analysis

Recommendations

It is recommended to add a state variable named __gap as a reserved space
for future upgrades in every upgradeable contract

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

storage-gap

Lack of storage gaps in SDLPool might impact storage of SDLPoolPrimary and SDLPoolSecondary if new storage introduced in future.

Support

FAQs

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