The graduate() function in LevelTwo.sol lacks state migration logic, causing loss of critical data (students, teachers, bursary) during UUPS proxy upgrades. This breaks contract continuity and violates upgrade pattern requirements.
Affected Files:
LevelTwo.sol (Line 26: function graduate() public reinitializer(2) {})
LevelOne.sol (Lines 284-302: graduateAndUpgrade function)
Technical Analysis:
The UUPS upgrade pattern requires explicit state migration when changing implementations. The current implementation:
Empty Hook: LevelTwo::graduate() contains no logic to copy storage from previous implementation
State Isolation: Proxy storage remains isolated from new implementation
Critical Data Loss:
Student/teacher lists reset to empty arrays
Bursary balance becomes zero
Access control roles are not preserved
PoC Result:
Permanent loss of student records and funds
Broken access control system
Contract becomes unusable post-upgrade
Requires emergency snapshot restoration
Foundry (Forge)
Manual code review
Implement explicit state migration in LevelTwo::graduate():
The system doesn't implement UUPS properly.
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.