The giveReview()
function in levelOne.sol
does not increment the reviewCount
for students, making it impossible to enforce the 4-review requirement before system upgrades. This breaks core protocol functionality where students must complete all reviews before graduation.
Location
File: levelOne.sol
Function: giveReview(address _student, bool review)
The function checks reviewCount[_student] < 5
but never increments the counter. This creates two critical problems:
Teachers cannot track how many reviews a student has received
The system cannot enforce the 4-review requirement before upgrades
First, we added a getter function to check reviewCount
:
Then ran this test (after 1 week warp):
Test Result:
Breaks the review tracking system entirely
Allows premature system upgrades (students can graduate without completing reviews)
Makes negative reviews (-10 score) repeatable indefinitely
Foundry (forge test)
Manual code review
Add the missing increment in giveReview()
:
`reviewCount` for students is not updated after each review session
`reviewCount` for students is not updated after each review session
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.