Parte 2·86g fa
Fairness has two layers: transparent rules and suitable randomness. For casual drawings, a cryptographically secure source such as crypto.getRandomValues() is preferable to Math.random(), especially when prizes or money are involved. Mapping random bytes into a range should avoid modulo bias; rejection sampling is the standard fix. Freeze the participant list and rules before the draw, then record the time and result so the process can be audited afterward.