No storage gap for upgradeable contracts #535
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
invalid
This doesn't seem right
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2022-10-blur/blob/2fdaa6e13b544c8c11d1c022a575f16c3a72e3bf/contracts/BlurExchange.sol#L30
Vulnerability details
Impact
BlurExchange.sol
BlurExchange
is an upgradeable contract inheriting some other contract. In case the contract need to be upgraded and inheriting new contract that use storage, the current storage slot may be collising . To prevent overriden storage slot, the contract should added a storage gap.if storage gap ain't added, the contract may not introduce new variable at the inheriting contract.
Proof of Concept
BlurExchange
Tools Used
VSCode
Recommended Mitigation Steps
Consider adding a storage gap at the start of the upgradeable contract
The text was updated successfully, but these errors were encountered: