The withdraw() function transfers the full fund amount to the fund creator but does not reset the amount_raised variable after withdrawal. This allows the fund creator to repeatedly withdraw funds, leading to inconsistencies in accounting. As there is no deadline check in this function, it will also allow creator to call this function multiple times draing the funds from the contributors before the goals and deadline is reached
The function retrieves the fund’s balance and transfers it to the creator. However, after the transfer, fund.amount_raised is not reset to 0, meaning the same amount can be withdrawn multiple times.
Fund accounting becomes inconsistent, as amount_raised does not reflect actual withdrawals
Fund creator can repeatedly call withdraw() function. As there is no deadline check here, it will also allow creator to call this function multiple times.
Manual review
Reset fund.amount_raised to 0 after the withdrawal to prevent multiple withdrawals
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.