stake.link

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

Upgradeable contract is missing a gap storage variable

Summary

The missing gap storage variable in upgradeable contracts, like in the SDLPool.sol file, is a vulnerability that limits future flexibility and can lead to storage collisions or incompatibilities if the contract is upgraded or extended.

Vulnerability Details

If a contract is extended, a gap storage variable will allow to freely add new state variables in the future, without compromising the storage compatibility with existing deployments.

OpenZeppelin docs.

contract SDLPool is RewardsPoolController, IERC721Upgradeable, IERC721MetadataUpgradeable {
IERC20Upgradeable public sdlToken;

Impact

Without gap storage variables, upgrading the contract can lead to storage collisions, which can corrupt the contract's state, lead to loss of data, or make the contract behave unpredictably.

Tools Used

Manual review

Recommendations

Add gap storage

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.