When the Principal
execute the LevelOne :: graduateAndUpgrade
, from the school's budget 5% has to be transferred to the principal and 35% has to be distributed between all teachers` .
But the LevelOne :: graduateAndUpgrade
will transfer 35% to each individual teacher instead of splitting the 35% to the number of teachers .
If there's only 1 teacher -> They correctly receive the whole 35% .
If there are 2 teachers -> The smart contract tries to pay out 2 * 35% which is 70% of the school's budger to the teachers .
If there are 6 teachers -> The smart contract tries to pay out 6 * 35% which is 210% that is greater than 100% .
Modify the functionality related with the distribution of money to teachers within LevelOne :: graduateAndUpgrade
.
There is not a PoC . The issue can be understood easily .
`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.