The withdraw()
function comment declares "Organizer withdraws ETH" but the function uses the onlyOwner
modifier, preventing the organizer from accessing the funds despite being responsible to manage the event. which represents either a bad design or a small error when writing the contract
In addition, the target parameter allows funds to be sent to any address without validation, creating a potential scenario of accidental fund loss due to incorrect address input.
Likelihood:
Reason 1 // When the organizer attempts to withdraw ETH he will not be able to do so and will need to coordinate with the contract owner to withdraw the funds.
Reason 2 // Whoever is responsible to call the function can set incorrectly the destination address when calling the function.
Impact:
Impact 1: Due both organizer / owner are trusted, this design creates delays when the organizer needs the funds
Impact 2: An incorrect destination address may result in loss of funds.
I'm adding two modifications of a current test in the test suite. One for a case when the Organizer tries to withdraw the ETH and another if an incorrect address is input.
Set the onlyOrganizer
modifier instead onlyOwner
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.