Fund owner can use withdraw
function to get the contribution amount transferred indefinitely.
withdraw
function in lib.rs is used by owner of the fund to withdraw the contributed amount from the contributors. With this implementation anyone (Who is the owner) can withdraw the contributed amount for a good cause. However, with this following implementation of the withdraw
function
Here we can see, we can take the amount_raised
from the fund (if we are the owner), However there is no decrement of the amount_raised , this way a owner can call it indefinitely and potentially drain the contract.
The contract (Program) can be drained
Manual Analysis/Auditing
Accounting for decrement should be done after each withdraw by the owner
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.