49626 sc insight modulo bias in winner selection in raffle
Description
Vulnerability Description
Vulnerable Code Snippet
// Line 247 in handleWinnerSelection function
uint256 winningTicketIndex = (rng[0] % totalTickets[prizeId]) + 1;Proof of Concept
1
2
3
4
5
Remediation
Previous50225 sc low user can bypass minstakeamount checking Next51651 sc insight redundant array access in removestakerfromvalidator
Was this helpful?