Incorrect teacher payment calculation overpays teachers and fails to retain 60% of the bursary.
The graduateAndUpgrade function in LevelOne.sol calculates payPerTeacher as (bursary * TEACHER_WAGE) / PRECISION (35%) and transfers this amount to each teacher. With multiple teachers, the total payout exceeds 35%, violating the invariant that teachers should share 35% of the bursary. Additionally, the remaining 60% is not explicitly retained in bursary.
Leads to financial loss and incorrect bursary balance post-upgrade.
Manual code review and simulated calculations.
Calculate total teacher pay as (bursary * TEACHER_WAGE) / PRECISION, divide by the number of teachers, and update bursary to (bursary * 60) / PRECISION after transfers.
`payPerTeacher` in `graduateAndUpgrade()` is incorrectly calculated.
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.