The teacher is able to claim more than his deserved wage (exactly N times more with N being the total number of teachers).
In the LevelOne.sol contract, the teacherWage is specified as follows:
Where the amount is not being divided by the total number of teacher, which in this case, allows the teacher to claim N times more than his salary.
Example:
If we have 2 teachers alice and bob with a totaly bursery balance of 30k USDC, alice will be claiming 10500 USDC (35%) instead of just 5250 USDC (35% / 2= 17.5%).
Proof of Concept:
Teachers can acquire more than they deserve from the bursary balance which can lead to:
Graduation and upgrading function reverting due to no more funds to give to other teacher/principal.
Loss of funds
Manual source code review
Update the payPerTeacher variable inside the graduateAndUpgrade function to:
`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.