The giveReview
function attempts to enforce a minimum one-week interval between student reviews. However, due to how lastReviewTime
is initialized and conditionally checked, the first review bypasses the intended timing restriction. This opens the door to review manipulation, particularly by dishonest or careless teachers.
require(
block.timestamp >= lastReviewTime[_student] + reviewTime,
"Reviews can only be given once per week"
);
When a student receives their first review, the value of lastReviewTime[_student]
is 0
(default for uninitialized uint256
).
This makes the condition:
block.timestamp >= 0 + 1 week // always true
As a result, a teacher can give the first review at any time—even if the session just started—bypassing the intended weekly interval.
Violation of game/session rules: Reviews may be clustered close together instead of spaced weekly.
Skewed review scores: Malicious teachers may rush all reviews quickly.
Bypassing review schedule: Undermines the school’s weekly evaluation structure and can lead to premature graduation or penalties.
Mannual Review
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.