Hawk High

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

Incorrect reviewCount Check in giveReview

Summary

Incorrect reviewCount limit of 5 allows a potential 5th review, violating the 4-review rule.

Vulnerability Details

The giveReview function in LevelOne.sol checks reviewCount[_student] < 5, but the invariant requires exactly 4 reviews. This allows a potential 5th review (if reviewCount were incremented), which is inconsistent with the 4-review limit.

Impact

Minor inconsistency, manageable if reviewCount is fixed.

Tools Used

Manual code review.

Recommendations

Change the check to require(reviewCount[_student] < 4, "Student review count exceeded!!!");.

Updates

Lead Judging Commences

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

reviewCount not updated

`reviewCount` for students is not updated after each review session

Support

FAQs

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