The LevelOne::graduateAndUpgrade() function miscalculates teacher compensation by allocating 35% of the bursary to each teacher, rather than splitting 35% among all teachers. This violates a critical protocol invariant and results in excessive fund distribution, potentially depleting the bursary.
The intent of the protocol is to allocate:
35% of the total bursary to all teachers combined
5% to the principal
However, the current implementation distributes 35% to each teacher:
This means:
With 2 teachers: they receive 35% + 35% = 70% of bursary
With 3 teachers: 105% — exceeding available funds
And so on.
This breaks the invariant and drains the bursary.
Can lead to:
Bursary depletion
Principal underpayment
Protocol imbalance
Causes overpayment to each teachers
Manual Code Review
Custom test written in Foundry
Update the teacher payment calculation to divide the allocated 35% evenly 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.