The specification states:
“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).”
LevelOne::graduateAndUpgrade never inspects the reviewCount mapping. As a result, the principal can upgrade the proxy even if every student has zero reviews.
Violates a core academic‑performance invariant; un‑evaluated students advance.
Subsequent logic that assumes reviewCount == 4 (e.g. scholarship gates, score averaging, expulsion) runs on invalid state.
While no funds are stolen immediately, contract behaviour diverges from the published business rules, which can later translate into economic loss or mis‑distribution of rewards.
Severity: Medium (state‑integrity breach without direct fund loss).
Add the test to LevelOneAndGraduateTest.t.sol and run: forge test --match-test test_graduateWithZeroReviews -vvv The test will pass, proving that students graduate without the required four reviews.
For testing add the following getter to LevelOne.sol (needed as reviewCount is private):
Add a guard that rejects the upgrade unless every student has exactly four reviews:
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.