Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: medium

Lack of storage gap in the Distributor contract may result in storage slot collision

Summary

SPARKN have stated that the protocol will evolve over time and introduce new features. If true upgradeability is introduced a storage gap is required to allow the developers to add new state variables without compromising the storage compatibility with existing deployments. Without using storage gaps state variables may be overwritten causing serious consequences.

Vulnerability Details

Future versions of the implementation contract may introduce state variables to add new functionality. The implementation contract will need to reserve storage slots to ensure compatibility across new deployments.

Impact

Possible loss of funds or the contract may become unusable.

Tools Used

Manual review

Recommendations

Add appropriate storage gap to the upgradeable contract to prevent storage collision.

uint256[50] private __gap;

Support

FAQs

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