The list of entries is locked on Solana first. Then a block that does not exist yet picks the winner. Nobody can know that block in advance, including whoever runs the giveaway, and anyone can check the result from this page.
The code that decides whether a list is accepted on chain is Phil's: the upload server that Phil's compiler backend emits, running on Solana.
No giveaway has been drawn yet. The first one will appear here.
Send the draw
This needs a wallet for the small network fee. Whoever sends it cannot affect who wins.
Paste the entry list to see names
This list was too long to put on Solana whole, so only its fingerprint was locked. Paste the list its organiser published. If it is the locked list, the names and the checks appear.
Check it yourself
This reads the giveaway straight from Solana and redoes the draw in your browser. It needs no wallet and costs nothing.
Try to cheat
This is the locked list. Change a name, add your own, or delete someone, then ask Phil on Solana whether it is still the list that was locked.
The entries
How a draw works
The list is locked through Phil
The entries are sent to Solana as an upload, in the protocol Phil defines: say hello, agree a version, declare the size and fingerprint, send the bytes. Phil's server checks every step and accepts only bytes that match what was declared. Once accepted, the list's fingerprint is written to an account that can never be written again.
A future block is named
At the moment of locking, the program writes down a slot a short time ahead. That block has not been produced yet, so its hash is unknown to everyone.
That block picks the winner
After the slot passes, anyone can tell the program to draw. It reads the block's hash from Solana, mixes it with the locked list's fingerprint, and the result points at an entry. There is no step where a person chooses.
Anyone checks
The account, both transactions and the list are public. The button above reads them and redoes the arithmetic.
What this proves, and what it does not
Proves: the list was fixed before the winning block existed, the winner follows from that block and nothing else, and the list shown here is the one that was locked.
Does not prove the list is complete or honest. Whoever runs a giveaway decides who is on the list. Entrants should find their own name in it; the list is public for that reason.
Share the giveaway before the draw. Someone could run many draws in private and show only the one they like. A draw that was announced before its result is worth far more than one that was not. Every official draw stays listed here. A giveaway someone runs themselves exists only at its own link, so ask for that link before the draw.
Whoever produces the winning block could, in principle, influence its hash. For a community giveaway on a test network this does not matter; for large sums it would.
This runs on devnet, Solana's test network. Devnet is reset from time to time, which would remove the accounts; the records in the repository would remain.
Where Phil is in this
Run one
Anyone can run a giveaway with their own wallet from My coin. It gets its own page here, read straight from Solana.
Official draws are started by the maintainers of this repository: on GitHub, open Actions, Start a giveaway, press Run workflow, and fill in a title and the entries. The result appears on this page a few minutes later. To run your own, fork the repository; the whole pipeline is in giveaway/.
This is a community project and is not affiliated with Phil or Solana.