The cutOffScore
variable in the LevelOne
contract is intended to represent the minimum score a student must achieve to graduate or qualify for rewards. While it is set during the startSession
function, it is never actually used in any part of the graduation or reward logic, which in your upgraded design now resides in LevelTwo::graduate
. As a result, all students—regardless of performance—are allowed to graduate, and the intended score-based filtering is silently bypassed.
Unused Threshold
The cutOffScore
set in LevelOne is never read or enforced in the actual graduation function LevelTwo::graduate()
.
Bypassed Academic Requirements
Without checking studentScore
against cutOffScore
, students with failing performance still graduate.
Misleading Design
Stakeholders expect a score threshold to gate graduation, but the contract logic does not implement it, creating a deceptive interface.
Business Logic Flaw: Students who did not meet minimum performance requirements are still graduated.
Loss of Intended Incentive: Reviews and performance tracking have no real consequence.
User Confusion: Users and auditors assume the threshold is enforced, but it is not.
Manual Code Review
cutOffScore
in LevelTwo::graduate()Add a check in the graduate()
function to only graduate and distribute rewards to students whose score meets or exceeds the threshold:
If you still use LevelOne::graduateAndUpgrade
for the actual payout, add the same filtering there:
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.