Hi Privacy Quest players, thank you for your patience! I’m happy to finally announce that the BTC lotto has begun.
BTC lotto timeline
Start date: 24 May 2021
End date: 12 Jun 2021
Prize distribution date: 14 Jun 2021
All transactions made after 12 Jun, 0h UTC will be rejected.
Earlier, we posted that we would wrap up the bitcoin lottery ahead of time, and divide the prize proportionate to the number of LOTTO tickets distributed. If you missed it, please refer to our previous announcement for more details about why we decided to wrap up the game.
Currently, 3,802 LOTTO coins have been distributed (won via the wheel). Assuming there are no more LOTTO coins distributed from now till the end of the lottery, the prize would be 3,802 / 21,000 = 0.181 BTC (6,968 USD at the time of writing).
However, the fees collected from the wheel so far total about 5000 PRV (9,100 USD), which at the time of writing, is worth more.
As we do not intend to profit from this initiative, the prize will be whichever amount is higher at the end of the lottery, based on pDEX dollar prices on 12 Jun, 00:00. It will take into account the final number of lottery tickets distributed, as well as any additional spin fees collected.
We will post the final numbers on the forum once the lottery has concluded.
How to play
It’s simple: 1 LOTTO can be swapped for 1 lottery ticket. Each ticket is randomly assigned a number, and the smallest number wins. You can get LOTTO by spinning the wheel, or by purchasing it on the pDEX.
1. Once you have LOTTO, tap ‘Buy a ticket’.
You’ll be brought to a confirmation screen. The only fee payable is the cost of transacting on the Incognito blockchain.
2. Tap ‘Send’.
Once you tap ‘Send’, a transaction will be created to assign a random number to your ticket. You can see your ticket numbers under ‘My tickets’.
Note: If you encounter any issues, just retry the transaction. All you have to do is paste the txID (the long string of numbers and letters) into the retry field.
You can also submit a manual tx to the server game app.
3. Tap ‘All tickets’ to watch the winner emerge
You’ll see all the tickets that have been purchased so far, arranged by the smallest number on the top of the list. The ticket with the smallest number by the time the lotto closes is the winner (12 Jun 0h).
4. Win BTC (hopefully!)
If you’re the lucky winner, you’ll receive a notification that it’s time to claim your prize.
How it works behind the scenes
When 1 LOTTO is spent in exchange for a ticket, a transaction is created and submitted to the chain, then submitted to the backend of the game.
How the winner is selected
The smallest ticket number is the winner.
The numbers assigned to tickets are selected using a verifiable random function (VRF), which is used to generate a pseudo-random value on the server-side from the input of users.
Based on the property of VRF, a non-interactive verifiable proof is also provided to verify the correctness of the computation. The VRF consists of the following algorithms:
KeyGen: Server generates key pairs (private_key, public_key). Server will keep private_key secret and publish public_key.
Comp: Players submit their input. Server computes and returns
(rand, proof) ← Comp(private_key, player_input).
To guarantee the uniqueness and unpredictability of player_input, we require players to spend LOTTO to the server address each time they swap it for a lottery ticket. The transaction ID is player_input.
- Verify: Anyone can verify the correctness of (rand, proof) by checking that
Yes/No ← Verify(public_key, player_input, rand, proof).
We implement the VRF algorithms described in this paper . If you’d like to check correctness, please refer to the instructions detailed in the following section.
How to verify randomness
If you’re interested in verifying the randomness of your ticket number, it’s fairly easy. The source code is public.
LOTTO_MASTER_ADDRESS = 12Rw6fDqnqAAyLokpJrArN93yENmxEkHzFsfAENVuHa99YSv6bb4BULRAiScG43qZp1e2823pXUeqCejfq23G3sguKZoFZocwF5q9kp LOTTO_MASTER_READ_ONLY_KEY = 13hYgpbkYdEZz4UESP2Xh47ytxQyAFjp6U5URD35zEhP4vPKQEEFUvxRpHj13Q6CGXzVQ4TzTfRSHHWEBR4hjJEi12vuG1x3ML8tGcY LOTTO_MASTER_PUBLICKEY = 1o34RcwDkGVX8Mghp97Jno3KewGhbMG9jbPXsgjEBJEZqSTcjE gkeyString = "4k7dHdxPALMslHLrQr2dBHfzXJfeQg3lLhpzEw/N8Hk=" pubKeyStr = "i0Zv8L7DJhSA2Z+b5JdLGJlM6pEjs2eIMm+qHsvAHj0="
1. First go to this go-playground:
2. Tap ‘My tickets’ to get your Ticket String and Proof string.
3. Replace the value in the source main function.
After running, the result must be True.
If the result is Timeout, just try again.
Feel free to leave any questions in the comments below.