Each teacher receives 35% of the total bursary instead of sharing the 35% among all teachers, leading to excessive payments and potential fund drainage.
Root Cause: In LevelOne.sol, the graduateAndUpgrade function incorrectly calculates teacher payments:
Initial State:
Multiple teachers registered
Bursary funds collected from students
Ready for graduation
Attack Flow:
Multiple teachers are added to the system
Each teacher receives 35% of total bursary
With just 3 teachers, 105% of bursary is paid out
Contract can be drained beyond available funds
Protocol pays out more than available funds
Contract can become insolvent
Teachers receive incorrect compensation
Breaks core economic model of the protocol
Manual review
Modify the payment calculation to divide the total teacher allocation by the number of teachers:
`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.