LevelOne::graduateAndUpgrade
does not check for protocol invariants before graduating and upgrading school system. As such, critical system invariants are allowed to be broken during graduation and upgrades.
From the project README
, there are several invariants of the system
Students must have gotten all reviews before system upgrade. System upgrade should not occur if any student has not gotten 4 reviews (one for each week)
Any student who doesn't meet thecutOffScore
should not be upgraded
System upgrade cannot take place unless school'ssessionEnd
has reached
However, LevelOne::graduateAndUpgrade
does not perform any checks prior to system upgrade. This results in the following impacts
System upgrade can happen before students have gotten all 4 reviews
Students not meeting the cutOffScore
are still upgraded
System upgrade can occur before sessionEnd
has reached
Place the following into LevelOne|AndGraduateTest.t.sol
and run
forge test --mt testBreakInvariants
System upgrade can happen before students have gotten all 4 reviews
Students not meeting the cutOffScore are still upgraded
System upgrade can occur before sessionEnd
has reached
Impact: High, invariants of the school system are broken
Likelihood: High, principal will upgrade school system at the end of school session (after 4 weeks)
Severity: High
Manual review
Perform invariant checks before allowing school system upgrades
LevelOne::graduateAndUpgrade
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
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.