Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

Storage collision in Implementation contracts

summary

Wrong storage slots usage or storage collision

vulnerability details

In LevelTwo which is the v2 implementation contract , the below state variable has been removed

uint256 schoolFees;
uint256 public immutable reviewTime = 1 weeks;
uint256 public sessionEnd;
mapping(address => uint256) private reviewCount;
mapping(address => uint256) private lastReviewTime;

-> Proxy stores data based on the storage slots of the implementation contract , but here when we have removed some of the state variables then there is a problem of overwriting one state varialbe with another

-> We only need to add a new variables at the end of the state variables , but should not delete or add any in the miidle of the storage slots (state variables)

impact - High

likelyhood - High

Recommendations

-> Follow this one for storage slots in proxy contracts

Updates

Lead Judging Commences

yeahchibyke Lead Judge 2 months ago
Submission Judgement Published
Validated
Assigned finding tags:

storage collision

Support

FAQs

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