Description: In function LevelOne::graduateAndUpgrade the payPerTeacher is calculated as the whole share of USDC that is supposed to be divided for every teacher, not as the actual share for each teacher. Variable payPerTeacher should be divided also by the number of teachers that are currently in the protocol so that it pays each teacher their share of the USDC and not the whole 35% each.
Impact: Teachers are paid more USDC than they should be, leaving the protocol with less than 60% USDC after upgrade.
Proof of Concept:
Protocol is upgraded
Amount of USDC expected to be left in the protocol after upgrading is less than it actually is
Put this in the LevelOneAndGraduateTest.t.sol:
Recommended Mitigation: Easiest fix is to also divide the payPerTeacher variable by the number of teachers in the protocol.
`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.