Absence of a 4-review check in graduateAndUpgrade allows upgrades with incomplete reviews, violating the 4-review invariant.
The graduateAndUpgrade function in LevelOne.sol does not verify that each student has received exactly 4 reviews before initiating an upgrade, despite the invariant requiring all students to have 4 reviews. Combined with the missing increment of reviewCount (Issue #1), this allows upgrades to proceed with incomplete review cycles, compromising the system's integrity.
Permits invalid upgrades, potentially graduating students without proper evaluation.
Manual code review and Foundry testing.
Add a loop in graduateAndUpgrade to check require(reviewCount[listOfStudents[i]] == 4, "All students must have 4 reviews"); for each student before proceeding with 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.