60% of collected school fees (bursary) are permanently locked in the contract with no mechanism to transfer them during upgrade.
Root Cause: The graduateAndUpgrade function in LevelOne.sol is intended to only distributes 40% of the bursary, leaving 60% locked in the contract permanently.
Initial State:
Contract deployed with bursary funds
Ready for upgrade to LevelTwo
Attack Flow:
Students pay school fees, increasing bursary
Principal triggers graduateAndUpgrade
Only 40% distributed (35% teachers + 5% principal)
60% remains locked forever
New contract gets deployed without access to old funds
Loss of 60% of all collected fees
Breaks core economic model
Protocol becomes financially unsustainable
Students and school lose significant funds
In the POC i left out the teachers payment because the code contains a bug that transfer 35% of the bursary to each teacher rather than sharing the 35% equally among all teachers.
but the POC is sufficient enough and proves that funds are locked up in the contract.
Manual Review
Foundry Testing Framework
Modify graduateAndUpgrade to transfer remaining funds:
2- Add receiving logic in LevelTwo:
3 - consider adding a function that only the principal or neccessary school admin can use to transfer funds from the bursary or the contract in other to repurpose the funds or use it for other meaning things.
Funds are stuck in `LevelOne()` contract after upgrade.
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.