Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Contract can be upgraded even when required conditions are not met

Summary

Function LevelOne::graduateAndUpgrade does not check the requirements mentioned in the contract invariants.

Vulnerability Details

The contract invarialts say:

  • System upgrade cannot take place unless school's sessionEnd has reached

  • System upgrade should not occur if any student has not gotten 4 reviews (one for each week)

However, these requirements are not checked on the contract upgrade in function LevelOne::graduateAndUpgrade.

Impact

Contract invariants are broken.

Tools Used

Manual review

Recommendations

Check the requirements from the contract invariants.

Updates

Lead Judging Commences

yeahchibyke Lead Judge
6 months ago
yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

cut-off criteria not applied

All students are graduated when the graduation function is called as the cut-off criteria is not applied.

can graduate without session end

`graduateAndUpgrade()` can be called successfully even when the school session has not ended

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.