The contribute function makes an external call to transfer funds and then modifies the status of the contract. Because of this, there is a chance that an attacker will repeatedly call contribute before the state update, which could result in them taking out more money than they had planned.
There is a potential for reentrancy attacks caused by the contribute function which allows external calls before updating the contract's state.
By repeatedly calling the contribute function before the state is updated, an attacker could take advantage of this and accumulate funds without authorization.
Update state before external calls.
To stop sensitive functions from being executed repeatedly at the same time, implement a reentrancy guard mechanism.
The reentrancy attacks occur when the contract modifies state and makes an external call, allowing the attacker to reenter. The `contribute` function doesn't perform an external call. For the SOL transfer the function uses a system program, not an external call to another smart contract. Therefore, there is no attack vector for reentrancy.
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.