In the graduateAndUpgrade
function, the bursary pool is distributed to teachers and the principal based on predefined percentages. However, the bursary variable is never reset to zero after this distribution. This omission allows the function to be called multiple times, redistributing the same funds repeatedly, resulting in double payments and a critical financial vulnerability.
Bursary has 1000 USDC.
Principal calls graduateAndUpgrade
, distributing funds.
Since bursary
is not reset, calling the function again will distribute another 1000 USDC.
This continues until the contract’s balance is drained.
Severe Financial Loss: Contract funds can be emptied unfairly.
Abuse of Authority: The principal could maliciously or mistakenly exploit this to repeatedly extract funds.
Broken Upgrade Semantics: Misuse of graduateAndUpgrade
not only upgrades but continues payout cycles.
Manual review
Solidity state variable behavior
Contract flow analysis
Reset the bursary pool to zero after funds have been distributed:
Add a graduated
flag to prevent re-entry or multiple calls.
Add event logging for auditing bursary
values before and after distribution.
Include test coverage for double-call scenarios in test suites.
The bursary is not updated after wages have been paid in `graduateAndUpgrade()` function
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.