LevelTwo contract is missing critical functions, modifiers, events, error declaration that exist in LevelOne, including addTeacher, removeTeacher, expel, startSession, and giveReview. This creates a severe functionality gap and potential security issues.
The missing functions in LevelTwo include:
Access Control Functions:
addTeacher
removeTeacher
expel
startSession
Core Business Logic:
giveReview (critical for student scoring)
getSessionStatus
getSessionEnd
getSchoolFeesCost
Financial Functions:
graduateAndUpgrade (handles teacher and principal payments)
Modifiers (all)
Events (all)
Errors (all)
This creates several issues:
Teachers cannot be added or removed after upgrade
Students cannot be expelled
New sessions cannot be started
Reviews cannot be given
Teachers and principal cannot be paid
Critical state checks are missing
Key invariants that are broken:
Access Control Invariants:
onlyPrincipal checks for critical functions
onlyTeacher checks for review functions
notYetInSession checks for enrollment
State Invariants:
Student score bounds (100 to 0)
Review frequency limits (once per week)
Maximum review count (5 reviews)
Session timing constraints
Financial Invariants:
Teacher wage distribution (35%)
Principal wage distribution (5%)
Bursary management
The impact is severe:
Functionality Loss: Core school operations become impossible after upgrade
Financial Impact:
Teachers cannot be paid
Principal cannot be paid
Bursary funds become locked
Access Control Issues:
No way to manage teachers
No way to manage students
No way to control sessions
Business Logic Disruption:
Student scoring system breaks
Session management breaks
School operations halt
Manual code review
Function comparison analysis
Implement all missing functions in LevelTwo:
Add proper access control modifiers:
Add missing state variables:
Add proper error handling:
Add proper events:
This vulnerability is particularly dangerous because it combines with the previous vulnerabilities (storage collision and missing UUPS inheritance) to create a perfect storm of issues that could completely break the contract's functionality after upgrade.
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.