The LevelTwo contract introduces state variables in an incompatible order with LevelOne, risking storage collisions during upgrades.
When upgrading from LevelOne to LevelTwo, the storage layout differs. For example:
LevelOne has schoolFees as the third variable, while LevelTwo replaces it with sessionEnd.
LevelTwo omits variables like reviewCount and lastReviewTime.
This mismatch causes critical variables (e.g., principal, bursary) to reference incorrect storage slots, leading to data corruption.
Storage corruption could reset principal to a wrong address, lock funds, or break core functionalities like fee distribution.
Maintain identical storage layouts between upgraded contracts. Use @openzeppelin/contracts-upgradeable’s StorageGap pattern to reserve slots for future variables.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.