stake.link

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

NO STORAGE GAP FOR UPGRADEABLE CONTRACTS

Summary

NO STORAGE GAP FOR UPGRADEABLE CONTRACTS

Vulnerability Details

For IERC721Upgradeable and IERC721MetadataUpgradeable, which are upgradeable abstract contracts, inheriting contracts may introduce new variables. In order to be able to add new variables to the upgradeable abstract contract without causing storage collisions, a storage gap should be added to the upgradeable abstract contract.

If no storage gap is added, when the upgradable abstract contract introduces new variables, it may override the variables in the inheriting contract.

Impact

Tools Used

Recommendations

Consider adding a storage gap at the end of the upgradeable abstract contract

uint256[50] private __gap;
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.