The graduateAndUpgrade() function in the LevelOne contract does not verify that all students have received the required number of reviews (4) before allowing the system upgrade:
According to the documentation, there is a strict requirement about system upgrades:
> Students must have gotten all reviews before system upgrade. System upgrade should not occur if any student has not gotten 4 reviews (one for each week)
1. The principal can upgrade the system prematurely, before all students have received their required 4 reviews
2. This violates a core invariant of the system, potentially leading to unfair treatment of students who haven't received all their reviews
Add a check in the graduateAndUpgrade() function to ensure all students have received exactly 4 reviews before allowing the upgrade
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
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.