Hawk High

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

No State Update for Bursary

Summary
The contract does not update the bursary after payments are made.

Vulnerability Details
Root Cause: The graduateAndUpgrade function does not update the bursary:

bursary -= (payPerTeacher * totalTeachers + principalPay);
Initial State: The contract holds funds in the bursary.

Step 1: Payments are made to teachers and the principal.

Outcome: The bursary remains unchanged, leading to incorrect calculations.

Implications: This could lead to double-spending or mismanagement of funds.

Impact

Who is affected: The school system.

How they are affected: Incorrect fund management could lead to financial issues.

Tools Used
manuel review

Recommendations
Update the bursary after payments:

bursary -= (payPerTeacher * totalTeachers + principalPay);

Updates

Lead Judging Commences

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

bursary not updated

The bursary is not updated after wages have been paid in `graduateAndUpgrade()` function

Support

FAQs

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