Seydina Sow
All work

Promobile, marketing team · 2026 · In production

Tirage

A promotional prize draw anyone can verify. A cryptographic commitment before the draw, a tamper-proof audit log and a PDF proof, all in a single binary that works offline.

Draw of 10,000 entrants × 21 winners
≈ 3 ms
measured on Apple M4
Test coverage
85 – 93%
draw engine and audit log
Delivery
1 binary
Windows, macOS and Linux, no dependencies
Role
Design and development
Duration
May 2026
Stack
Go · SQLite · SHA-256 / HMAC · PDF

Tirage · fairness

  1. Question :

    Is the algorithm that handles each entrant’s number of chances fair?

  2. Answer :

    Yes. When you create a draw, you set several parameters: someone who has won can’t win again in the same draw, and you can combine eligibility rules based on precise criteria. The algorithm then draws the winners among eligible entrants, and the organizer can refine the rules as much as needed.

A question about the draw’s fairness, and the answer given (translated from French).

Context

A telecom operator’s promotional campaigns often end with a prize draw: a top-up, a number, a winner. Promobile’s marketing team needed a tool to run these draws and to prove, afterwards, that they were fair.

The problem

In a classic draw, no outsider can check that the organizer didn’t pick the winners. The tool also had to work without a connection, install in one click on a non-technical team’s computer, and keep a record that can’t be altered.

My approach

Commit before drawing. Before the draw, the tool publishes the SHA-256 hash of a secret seed. The result then depends on that seed, the hash of the entrants file and a second seed supplied at draw time, all signed with HMAC. Once the seed is revealed, anyone can recompute the draw and check that nothing was chosen after the fact.

A log that can’t be rewritten. Every operation goes into a hash-chained log, protected by SQLite triggers. The draw produces a PDF proof and a verification page.

One file to install. The app is a self-contained Go binary with no system dependencies and a local web interface. It runs entirely offline, on Windows, macOS and Linux.

Writing the spec before the code. I first wrote a precise specification, designed to be carried out with an AI coding agent, then verified the result through tests: 29 test files, 85 to 93% coverage on the draw and the audit log.

What changed

Version 1.0 shipped in May 2026 for all three systems.

The tool has since run the draws for Promobile’s Magal and Gamou campaigns, for instance picking 25 winners across airtime top-ups, data bundles, a cash prize and TV sets.

What I took away

For a draw to be believed, being fair isn’t enough: anyone has to be able to recompute it.