Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Storage Collision Risk Due to Inconsistent Storage Layout Between LevelOne and LevelTwo Contracts

Description

The LevelOne contract is designed to be upgradable, where graduateAndUpgrade() points to a new contract (LevelTwo) using UUPS (Universal Upgradeable Proxy Standard).

However, there is a storage layout mismatch between LevelOne and LevelTwo. Specifically

LevelOne includes:

uint256 public immutable reviewTime;
mapping(address => uint256) public reviewCount;
mapping(address => uint256) private lastReviewTime;

These fields are missing in LevelTwo.

Impact

1) Upgraded contract will read/write from incorrect storage slots.

2) Loss of data integrity

Tools Used

1) Vs code
2) Manual review

Recommendations

Always ensure that the storage layout in the upgraded contract matches exactly with the original one.

Updates

Lead Judging Commences

yeahchibyke Lead Judge 20 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
yeahchibyke Lead Judge 20 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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