Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

All students must have 4 reviews before upgrade

Summary

There’s no check in graduateAndUpgrade that every student has exactly 4 reviews.

Vulnerability Details

There is no code related to System upgrade should not occur if any student has not gotten 4 reviews (one for each week)

Impact

Contradicts sixth rule of invariants.

Tools Used

Manual Review

Recommendations

Before upgrade, iterate through listOfStudents and ensure reviewCount[student] == 4.

// Ensure all students have exactly 4 reviews
for (uint256 i = 0; i < listOfStudents.length; i++) {
address student = listOfStudents[i];
require(reviewCount[student] == 4, "Student missing reviews");
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

cut-off criteria not applied

All students are graduated when the graduation function is called as the cut-off criteria is not applied.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.