Checks Effect Interactions not applied in refund can lead to reentrancy
An external call is made to an address payable(msg.sender).sendValue(entranceFee) and if that address is a contract on receiving ETH can reenter the contract by calling refund and claim more refund as state is only updated after the external call.
sendValue forwards all gas unlike .transfer and .send which limit to 2300 so sendValue() is susceptible to reentrancy
Reentrancy can lead to draining and stealing of contract and user funds in raffle contract
Manual Analysis
Ensure CEI patter in followed e,g update state first before external calls
And or apply some nonReentrant modifer or protection mechanisms e.g make use of OpenZeppelin Reentrancy contracts and apply nonReentrant to function
reentrancy in refund() function
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.