MultiRaffle icon indicating copy to clipboard operation
MultiRaffle copied to clipboard

Can claim Raffle be exploited?

Open sssubik opened this issue 2 years ago • 0 comments

Hey nice stuff!

uint256 winningTickets = nftCount - tmpCount;

 if (winningTickets != tickets.length) {
            // Payout value equal to number of bought tickets - paid for winning tickets
            (bool sent, ) = payable(msg.sender).call{
                value: (tickets.length - winningTickets) * MINT_COST
            }("");
            require(sent, "Unsuccessful in refund");
        }

here there is cpmparison of winning ticket != tickets.length.

What if number of tickets is 100 and nobody is a winner. since there is no winner winningTickets is 0. And the function will transfer the money as refund?

Am I missing something?

sssubik avatar Jan 03 '22 06:01 sssubik