Description: After wages are paid out from the total funds available in LevelOne::bursary
(35% to teachers and 5% to the Principal), no funds are actually deducted from the bursary balance.
Impact: When a new session begins, the bursary from the previous session is not overwritten or updated. As a result, students pay new fees into the same existing balance. Eventually, at the end of the new session, the Principal and teachers receive more than they are supposed to, since the bursary has accumulated across multiple sessions without proper resets.
Proof of Concept:
The Principal
calls `LevelOne::graduateAndUpgrade.
Wages are payed to the teachers
and principal
.
The amount paid is not subtracted from the bursary.
Students pay school fees for the new session.
Previous bursary gets updated with previous balance.
At the end of the session wages are disbursed to teachers and principal.
The wages that the teachers
and principal
will receive will be greater than intended.
Recommended Mitigation: Subtract the total of the funds sent to the principal and the teacher(that is 40% of the bursary) from the bursary before paying out the wages.
The bursary is not updated after wages have been paid in `graduateAndUpgrade()` function
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.