The graduateAndUpgrade() function incorrectly calculates teacher wages by assigning 35% of the total bursary to each teacher rather than evenly splitting 35% among all teachers. This results in a significant overpayment when multiple teachers exist, draining more than the intended 35% allocation.
uint256 payPerTeacher = (bursary * TEACHER_WAGE) / PRECISION;
This is the calculation used for assigning 35% of the entire bursary to each teacher. If there are N teachers, the total payout to teachers becomes:
N * (35% of bursary) = bursary * 0.35 * N
This violates the intended constraint: teachers should collectively receive 35% of the bursary
Causes overpayment to teachers
Manual Review
Update the teacher payment calculation to divide the allocated 35% evenly among all teachers:
`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.