The graduateAndUpgrade
function in the LevelOne
contract fails to enforce the minimum cutoff score requirement when graduating students to Level Two. This critical vulnerability allows students with scores below the established cutoff to still graduate, undermining the entire educational merit system. Breaking the protocol invariant.
When starting a session, the principal sets a cutoff score that should determine which students qualify for graduation:
However, in the graduateAndUpgrade
function, there is no verification that a student's score meets or exceeds this cutoff score before including them in the graduation process:
This implementation transfers all students to Level Two without filtering out those who failed to meet the minimum score requirements.
Academic integrity is compromised as unqualified students can advance
The cutoff score mechanism becomes meaningless despite being a core feature
Undermines the incentive for students to achieve higher scores
Could lead to unprepared students in Level Two, affecting the overall educational quality
Breaks a fundamental protocol invariant that student advancement should be merit-based
Manual code review
Business logic analysis
Modify the graduateAndUpgrade
function to only graduate students who meet or exceed the cutoff score: drop students from the listOfStudents
array who falls behind the cutOffScore
.
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.