Making draw results verifiable
LuckyDraw lets players create accounts, buy tickets and view their participation history. An administration interface manages campaigns, results and statistics. The draw engine uses a commit-reveal mechanism so players can verify the result.
Verifying draws and representing amounts
Players need to be able to verify the result using information published by the engine. Monetary amounts are stored as integer cents to avoid errors from floating-point calculations.
Commit, reveal, verify
- Commit-reveal mechanism that lets players recalculate and verify the result
- Configurable campaigns (rules, schedule, prizes)
- Ticket purchase and participation history
- Back-office: results, transactions, analytics, exports


Verification covered by tests
Tests cover seed verification, rejection of a second draw and the representation of monetary amounts.
- Seed committed as a SHA-256 hash published before the draw, revealed after: a genuine draw is validated, a tampered seed is rejected
- Immutable draws: a second draw on the same lottery is refused
- Amounts stored as integer cents, with no floating-point arithmetic
- 45 automated tests (43 unit and integration, 2 end-to-end journeys); lint, type checks, tests and build required to pass in CI


On request, I can provide read-only repository access or walk you through the architecture, code and technical decisions behind this project.
Request repository access