The graduateAndUpgrade() function in the LevelOne contract incorrectly calculates the payment amount for each teacher. The function calculates payPerTeacher as 35% of the total bursary, but then pays this full amount to each teacher instead of dividing it among all teachers.
According to the documentation, teachers should share 35% of all school fees as their wages, not each receive 35%. This means that if there are two teachers, they will collectively receive more than the intended 35% of the bursary. If there are more than two, the entire transaction will revert due to insufficient balance, no one will receive payment, and the contract upgrade will fail
1) If there are two teachers they will receive more then expected
2) If there are more than two teachers (more likely) than the whole tx will revert:
no one will receive payment
upgrade will fail
Modify the wage calculation to divide the total teacher allocation 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.