Description:
In the graduateAndUpgrade function, the contract correctly calculates and transfers USDC to both the principal and the teachers. However, it fails to update the bursary state variable to reflect the distributed funds. This means the internal accounting of the contract is incorrect: the bursary still shows 100% of the funds available, even though a large portion has already been paid out.
Impact:
Future calculations relying on the bursary value (e.g., further distributions or upgrades) will be completely inaccurate.
The contract may attempt to pay out more funds than it actually has, resulting in reverts or unexpected behavior.
It creates a false sense of available funds, which can be exploited or cause system malfunction in upgrades or dependent modules.
Proof of Concept:
A test that logs bursary before and after graduateAndUpgrade shows that the variable still unchanged.
The logs are showing that the bursary starts at 3e22 and finish at 3e22.
Recommended Mitigation:
Decrease bursary after payments are made:
Severity: High (Incorrect internal accounting leading to systemic financial inconsistency)
Manual Review
The bursary is not updated after wages have been paid in `graduateAndUpgrade()` function
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.