philcoin tools for Phil
Solana devnet

Giveaways nobody can rig

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.

How a draw works

  1. 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.

  2. 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.

  3. 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.

  4. 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

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.