The refund
function sends the entranceFee
to the player at the index of the array and if they are the message sender. However that player may not be the one who bought in.
To enter a raffle an array of addresses is given and the entry fee is paid for by the msg.sender
not necessarly by the player who calls for the refund
. A player who did not pay for the entranceFee
can calim a refund and basically steal the funds from the raffle and will likey hurt the feelings of the player who bought them their entrance to the raffle. On the flip side, someone who paid for multiple entries will only get a partial refund from calling this function.
Loss of funds from the raffle pool and hurt feelings.
Manual Review
Track the address that paid for a player's entrance and refund that player if a player wishes to leave the raffle.
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.