There is an unfair payout logic in graduateAndUpgrade function where the pyout share for teacher can exceed the total amount of bursary itself.
In the graduateAndUpgrade function the logic behind payment share is calculated in a way that it may even exceed the total amount of bursary in the contract. The code below has flaw in its logic:
According to the above code line let's assume Total Bursary amount is 1000usdc and there are 3 teachers to be paid than according to the code
1000 * 35 = 35000 / 100 = 350. And to be paid to 3 teachers 350 * 3 = 1050 which exceeds the total bursary amount itself.
This flaw in the code can pay the teachers the amount that they are not suppose to recieve and may even drain all the amount in the contract itself to one teacher itself.
Manual Testing
Instead of that we can add the following line of code:
`payPerTeacher` in `graduateAndUpgrade()` is incorrectly calculated.
`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.