How we draw
Anyone can check the seed behind every Local Draws result, from information we publish on the result page, and an independent person can re-run the full selection on request. This is the method, in enough detail to do it. It is the same method described in section 14 of the Terms and Draw Rules.
The order things happen in
The sequence is the whole point, so it is worth stating plainly before the detail.
- When a draw opens, we generate a random seed and publish a fingerprint of it. At that moment there are no entries at all, so nobody — including us — can know what the result will be.
- When entries close, the list of eligible entries is frozen and fingerprinted.
- The winner is worked out from the seed and the frozen list. There is no randomness left at this step: the same seed and the same list always give the same winner.
- The seed is published on the result page, alongside the result. Anyone can then check it against the fingerprint we published in step 1.
A draw that has no fingerprint published in advance does not run. Our own system refuses it rather than drawing anyway.
The commitment
The seed is 32 random bytes, written as 64 hexadecimal characters. The fingerprint we publish before entries close is:
sha256("<drawId>:<sequence>:<seed>")
sequence is 1 for the original draw and increases by one for each redraw. The draw id and the sequence are inside the hash rather than merely stored next to it, so a commitment cannot be lifted from one draw and presented as another, and a redraw cannot reuse the original draw’s commitment.
How entries are ordered and numbered
Every entry has a range of entry numbers — one number for a single entry, several consecutive numbers if somebody bought more than one. Entries are ordered by their first entry number, ascending. A free postal entry is ordered and counted exactly like a paid one; there is no separate pool and no weighting.
The frozen list is then written as canonical JSON (format snapshot_json_v1), with fields in a fixed order so the same list always produces the same text. Its SHA-256 is the Verification Fingerprint shown on every result page.
From seed to winning number
Method seed_commit_hmac_v1. Let units be the total number of entry numbers in the frozen list, and message be the canonical JSON above. Then, starting at attempt = 0:
- If
attemptis 0, usemessageunchanged. Otherwise append#and the attempt number to it. - Compute
digest = sha256(seed + "\0" + message), where the seed is its 64-character hex text and the separator is a single zero byte (hex00). - Read the first 6 bytes of the digest as a big-endian unsigned integer. Call it
value. - Let
limit = floor(2^48 / units) * units. Ifvalue < limit, the winning number is(value mod units) + 1. Otherwise increaseattemptby one and go back to step 1.
That last step is the only part that is not obvious. Simply taking value mod units would very slightly favour the lowest numbers, because 248 does not divide evenly by most entry counts. The bias would be far too small for anyone to notice — and it would still be real, and we promise every entry an equal chance, so we discard the small unusable tail instead. With realistic entry counts this happens roughly never.
The winning number is then matched to whichever entry’s range contains it. A draw with only one entry number skips all of the above and returns 1.
Redraws
When a prize goes unclaimed and we draw again, the new draw gets its own seed and its own commitment — never the original’s. Because a redraw happens after entries have closed, “before the close” would prove nothing, so a redraw’s commitment is published at least an hour before the redraw runs instead. The result page shows which redraw you are looking at.
Draws with instant prizes
Some draws also have instant prizes, each fixed to one entry number before the first entry. This is how those numbers are chosen, how any instant prize not won while the draw is open is awarded when it closes, and how you can check both. The main prize is drawn exactly as described above.
- Before the first entry, we generate two more random seeds: one that fixes the instant-prize numbers, and one for awarding any instant prize not won while the draw is open. We publish a fingerprint of each on the draw page, and record both with an independent timestamping service, so there is proof from outside Local Draws that they existed before anyone entered. Until both are recorded, the draw takes no entries.
- While the draw is open, an entry given one of the fixed numbers wins that prize when it is confirmed. We do not publish which numbers they are.
- When the draw closes, any instant prize not yet won is awarded at random using the second seed, as described below.
- After it closes, we publish both seeds, every instant-prize number and how each prize was won on the result page. Anyone can then check the seeds against the fingerprints published before the first entry.
The two fingerprints are sha256("<drawId>:instant_allocation:<N>:<k>:<prizeListHash>:<seed>") and sha256("<drawId>:instant_close:<seed>"), where N is the maximum number of entries, k is the number of instant prizes, and prizeListHashis the SHA-256 of the list of instant prizes (each one’s position, title and value in pence, in order), shown on the result page. Because the prize list is inside the fingerprint, no instant prize’s title, value or position can change after the draw opens without breaking it.
Fixing the numbers, method instant_alloc_v1. Start with every entry number the draw can have, 1 to N, in order. Then, for i = 0 up to k - 1:
- Work out a number
jwith the same steps as the main draw above, using the first seed, the message<drawId>:instant:<i>andunits = N - i. - The
jth number still in the list, counting from 1, belongs to instant prizei + 1. Remove it from the list and carry on.
No number can be used twice, and every entry number the draw can have, whoever ends up holding it, has the same chance of being fixed to a prize. Entry numbers are given out in the order entries are added to the draw, paid or free, as described above.
To check your own version of this method, run it on each example below. It must give exactly the numbers shown, in this order: the first for instant prize 1, the second for instant prize 2, and so on.
- drawId
example-draw- Seed
0000000000000000000000000000000000000000000000000000000000000000- N, k
100,10- Numbers
- 49, 100, 61, 41, 34, 84, 78, 9, 94, 86
- drawId
mcr-example-1a2b3c4d- Seed
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef- N, k
500,25- Numbers
- 320, 435, 235, 457, 147, 284, 76, 54, 497, 170, 237, 446, 46, 156, 267, 336, 49, 179, 40, 195, 136, 212, 131, 42, 247
- drawId
uk-example- Seed
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff- N, k
5,5- Numbers
- 5, 2, 4, 3, 1
Awarding at close, method instant_close_v1. For each instant prize not won while the draw was open, in prize order: take the frozen list of eligible entries used for the main prize, and remove every entry number that already holds an instant prize in this draw or has given one up. If nothing is left, use every eligible entry number. Write that list in the same format as above and work out the winning number with the same steps, using the second seed, the message <list>:instant_close:<prize position> and the number of entry numbers in that list. The result page shows the fingerprint and size of the list each award was drawn from, and the number selected.
If an instant prize comes back after the draw has closed, method instant_redraw_v1, it is drawn again with a new seed. Its fingerprint, sha256("<drawId>:instant_redraw:<sequence>:<seed>"), is published at least an hour before the redraw runs, and the message is <list>:instant_redraw:<prize position>:<sequence>. If it comes back while the draw is still open, it is simply awarded at close.
If it does not match
Tell us. Email hello@localdraws.com with the result reference and what you found, and a person will look at it. Checking our draws is not interference — it is the opposite, and nothing in our terms treats it as misuse.