The principal can call the graduateAndUpgrade()
function to upgrade the system and graduate students. However, it does not check whether each student has received exactly 4 reviews — one for each week of the school session. According to the contract's design and invariants, all students must be reviewed 4 times before being considered for graduation
1) Students may graduate without receiving all required reviews
The graduateAndUpgrade()
function does not contain a loop to check if all students have received the required 4 reviews. As a result, the contract can proceed with the upgrade even if some students have not met the review requirement. This breaks the logic of the system and could lead to students graduating without fulfilling the conditions
1) Vs code
2) Manual review
To ensure that all students meet the review condition before graduation, a loop should be added to check each student's review count. Only if all students have received 4 reviews should the system proceed with the upgrade.
`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.