This is a logic bug where the Principal
will not only get paid by 5% of all school fees, but also they will share with the other teachers the 35% of all school fees. giving the Principal
the ability to Increase their earning above what they suppose to get paid.
1- Navigate to test/LeveOnelAndGraduateTest.t.sol
file
2- add the following PoC code to the test
file:
3- in the command line, run the following command: forge test --match-test testPrincipalCanBeATeacher -vvv
4- the output will be as following --> Suite result: ok. 1 passed; 0 failed; 0 skipped
sharing with other teachers their fees will decrease the other teachers earning which is for sure is not indented by the protocol, in the same time it will increase the Principal
total earning after every session than it supposed to be, which is in both cases breaks the protocol rules and implementations.
manual Recon
foundry test suite
add a restriction to force preventing that the Principal
to be a part of listOfTeachers
in the LevelOne::addTeacher
function, for example as following
Principal can add themselves as teacher and share in teacher pay upon graduation
Principal can add themselves as teacher and share in teacher pay upon graduation
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.