The graduateAndUpgrade() function in the LevelOne contract does not verify that the current time has reached or exceeded the sessionEnd value before allowing the system upgrade. According to the protocol's invariants, a system upgrade should not take place unless the school's sessionEnd has been reached.
This oversight allows the principal to upgrade the system at any time, even in the middle of an ongoing school session.
The principal can prematurely upgrade the system before the 4-week session has completed
Students may not receive all their required reviews before the upgrade
The educational process can be cut short, violating the core protocol invariant that "A school session lasts 4 weeks"
Wages might be distributed before the full session's work has been completed
Add a check at the beginning of the graduateAndUpgrade function to ensure the session has ended
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
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.