Description: The graduateAndUpgrade() function does not enforce that the current time (block.timestamp) is greater than or equal to sessionEnd. This means the principal can perform a system upgrade at any time, including during an active academic session. Although the sessionEnd timestamp is set in startSession(), it is never used to gate the upgrade path.
This breaks the logical flow of the contract, where a full session (spanning 4 weeks) is expected to complete before a graduation or system transition takes place.
Impact: Premature upgrades can:
Cut the session short before all reviews are complete,
Undermine scoring and timing assumptions across the contract,
Allow bypass of time-locked evaluation and scoring mechanisms.
Proof of Concept: Paste the following test in the test suite
Logs:
Recommended Mitigation: Enforce a time check at the beginning of graduateAndUpgrade():
`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.