The graduateAndUpgrade
function does not validate whether students meet the cutOffScore
before allowing system upgrades. This violates the invariant that only students with scores ≥ cutOffScore
should progress.
Key Issues:
No Score Checks During Upgrade:
The graduateAndUpgrade
function lacks logic to verify studentScore[student] >= cutOffScore
.
Example: A student with a score of 50 (below a cutOffScore
of 70) will still be included in the upgrade.
Invalid Graduations: Students below the cutOffScore
can graduate, undermining academic standards.
Protocol Integrity Loss: The system fails to enforce its core eligibility rule, eroding trust.
Manual code review
Add CutOff Validation in graduateAndUpgrade
. Note that you cannot directly iterate over the student list to check if they meet the cut off since this will lead to a Dos if the array gets too big, I recommend adding a state to the contract that checks if all student score has been validated. This state will be toggoled by a function that allows this validation to occur in batches.
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
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.