The way the wage distribution is currently structured limits how many teachers can be paid.
For example if there are more than 2 teachers:
[0] Teacher -> 35% ✅
[1] Teacher -> 70% ✅
[2] Teacher -> 105% ❌
The issue is that TEACHER_WAGE is treated as 35% per teacher out of bursary, but should be considered as 35% of bursary for all teachers.
If the distribution is "fixed percentages per-teacher", only 2 teachers can be paid.
Tranasaction reverts due to insufficient balance
The rest of the teachers can not be paid.
One of the main functionalities of the contract, paying teachers, is not working properly.
Manual Code Review
Divide a fixed total wage among all teachers.
TEACHER_WAGE becomes the total budget for 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.