Algorithm Transparency

Every winner is chosen
100% fairly

Our open-source algorithm ensures complete fairness. More entries = better odds, but every participant has a real chance to win. Zero manipulation, zero bias, zero exceptions.

Our Transparency Promise

We believe trust is earned through transparency. Every aspect of our winner selection is open for inspection. No black boxes, no hidden algorithms, no secret parameters. What you see is exactly what happens.

The Algorithm Behind the Magic

Every winner is drawn by this code, straight from our codebase. Cryptographically secure randomness, no hidden functions, no secret parameters.

WinnerSelection.ts
1
2// src/lib/services/WinnerSelection.ts
3import { randomInt } from 'crypto';
4import { GiveawayEntry } from '@/components/dashboard/giveaways/types';
5
6/**
7 * Select winners using weighted random selection.
8 * @param entries All entries, each with a user_id and entries_count
9 * @param winnerCount Number of winners to draw
10 * @param hasFraudDetection Premium+ servers exclude fraud-flagged entries
11 * @param cooldownExcludedUserIds Users on winner cooldown (recent wins)
12 * @returns Array of selected winner user IDs
13 */
14export function selectWinners(
15 entries: GiveawayEntry[],
16 winnerCount: number,
17 hasFraudDetection: boolean = true,
18 cooldownExcludedUserIds: string[] = []
19): string[] {
20 if (!entries || entries.length === 0) {
21 return [];
22 }
23
24 // 1. Exclude fraud-flagged entries (premium+) and users on winner cooldown.
25 // Flags are set only by automated fraud detection; a server admin can never
26 // manually flag, unflag, or hand-pick who gets excluded from the draw.
27 // Free servers keep every entry; fraud flags are ignored.
28 const cooldownExcluded = new Set(cooldownExcludedUserIds);
29 const eligibleEntries = (hasFraudDetection
30 ? entries.filter(entry => entry.fraud_flag !== 'red')
31 : entries
32 ).filter(entry => !cooldownExcluded.has(entry.user_id));
33
34 if (eligibleEntries.length === 0) {
35 return [];
36 }
37
38 // 2. Build a weighted pool: one slot per entry earned.
39 // 5 entries = 5 slots = 5 chances to win.
40 const entryPool: string[] = [];
41 for (const entry of eligibleEntries) {
42 for (let i = 0; i < entry.entries_count; i++) {
43 entryPool.push(entry.user_id);
44 }
45 }
46
47 // 3. Draw winners with cryptographically secure randomness.
48 const winners: string[] = [];
49 const winnerSet = new Set<string>();
50
51 // A user can only win once, so never draw more winners than unique people.
52 const uniqueParticipants = new Set(eligibleEntries.map(entry => entry.user_id));
53 const availableWinnerCount = Math.min(winnerCount, uniqueParticipants.size);
54
55 if (availableWinnerCount === 0 || entryPool.length === 0) {
56 return [];
57 }
58
59 while (winners.length < availableWinnerCount && entryPool.length > 0) {
60 // crypto.randomInt is a CSPRNG: no seed, no bias, not manipulable.
61 const randomIndex = randomInt(entryPool.length);
62 const selectedUserId = entryPool[randomIndex];
63
64 // Only add first-time winners; duplicates are skipped.
65 if (!winnerSet.has(selectedUserId)) {
66 winners.push(selectedUserId);
67 winnerSet.add(selectedUserId);
68 }
69
70 // Remove the drawn slot via swap-and-pop (O(1)).
71 entryPool[randomIndex] = entryPool[entryPool.length - 1];
72 entryPool.pop();
73 }
74
75 return winners;
76}

Key Algorithm Steps

Click on any step below to see its implementation in the code

Line 3

Secure Randomness

Winners are drawn with Node's crypto.randomInt, a cryptographically secure generator. There's no seed to predict and nothing to manipulate, not even by us.

Line 30

Fraud & Cooldown Filtering

Before the draw, fraud-flagged entries are removed on fraud-detection servers, and anyone on winner cooldown is set aside. Free servers keep every entry.

Line 43

Weighted Pool Creation

Fairness starts here. Each user is added to the pool once per entry they earned, so 5 entries means 5 chances. Proportional, never guaranteed.

Line 61

The Draw

A random index into the weighted pool picks each winner. More entries simply means more slots, and every slot has exactly equal odds.

Line 65

Duplicate Prevention

A winner set guarantees nobody wins twice, and we never draw more winners than there are unique eligible participants.

How Fairness Works

See exactly how our algorithm ensures every participant gets a fair chance, with better odds for those who engage more.

1

Entry Collection

Users complete tasks and earn entries based on their actions

2

Weighted Pool Creation

Every entry gets added to the selection pool based on tasks completed

3

Random Selection

Cryptographically secure randomness selects from the weighted pool

4

Duplicate Prevention

Ensures each user can only win once per giveaway

5

Winner Confirmation

Selected winners are verified and announced

Real Example

Alice completes 3 tasks, Bob completes 1 task, Charlie completes 5 tasks. The pool contains 9 total entries with proportional winning chances.

Alice

3 entries earned

33% chance

Bob

1 entry earned

11% chance

Charlie

5 entries earned

56% chance

The Pool (9 total entries)

Each dot represents one entry. Winner is selected randomly from all entries.

No More Rigged Giveaways

A Discord giveaway bot that shows exactly how winners are chosen

The Problem

Most Discord giveaway bots are black boxes. Even when the bot is legitimate and truly random, your community has no way to verify this. They can't see the algorithm, can't check the process, can't prove winners weren't hand-picked.

Without transparency, every giveaway feels suspicious. Your members start wondering if it's actually fair. Trust dies, engagement drops.

We got tired of watching communities die from broken trust

The Solution

Never worry about engagement drops from rigged giveaway accusations again. When members question fairness, just link them to this page.

ScopliDrop certifies that server owners cannot edit giveaways or choose winners. Period.

We have a 'manually end giveaway' feature, but this only triggers our winning selection algorithm, nothing else. Server admins CANNOT choose winners by any means. This is our promise.

Fairness Questions

Learn how we ensure every giveaway is transparent, secure, and genuinely fair for all participants.

Join the Fair Revolution

Ready to Run Truly Fair
Giveaways Today?

Join thousands of Discord communities who've switched to transparent, verifiable giveaways. Start free, prove fairness from day one.