DeSo Repost Lottery
Pot Value: 43 $DESO
Time Left: 1hr 49min
Ticket Holders
Position | Username | Public Key | Aspect | Coin Price |
---|---|---|---|---|
0 | @nandubatchu | BC1YLieimynRjD1GA9XjVJ2K5jZRPy2dtEoxx1n3hFpnNiAdhYQPYUn | Repost | 2.3 $DESO |
1 | @nandubatchu | BC1YLieimynRjD1GA9XjVJ2K5jZRPy2dtEoxx1n3hFpnNiAdhYQPYUn | Quote-Repost | 2.3 $DESO |
How to buy a ticket to win the Pot?
Every diamond/repost/quote-repost to the Pot Post - will buy you one ticket to the pot!
Go to Pot Post
Provably Fair Data
Post Hash Hex:
975b90c40d0b2d1a43e8e7123488121702ef2ebb147dcfc377b6afcba2cf0e4a
Secret Hash:
e860d15b48f35b8d239ac7a98777e5b2fa0d9a08a39c34b7bf9463c92abc4a08
Revealed Secrets
Salt:
e860d15b48f35b8d239ac7a98777e
Secret:
1002
Explanation
1. Each pot has a secret number (between 1000 - 10000)
2. You are provided with the hash of the secret above.
3. Secret is revealed post draw along with a salt.
4. You can verify that the secret is not modified post draw using cryptography.
Note: Pot winner is picked up using the secret to iterate over the list of ticket holders
(sorted in descending order by their coin price)
Sample Verification Code
const crypto = require("crypto"); // validation of the secret const secretHash = "297570d88d5583925cc5f2dfda75c7c4d059f9cdfe7ba717dd9daeaffd1378f4"; // REPLACE WITH CORRECT VALUE const secretSalt = "527778af39949e32bc83530e4883f28a"; // REPLACE WITH CORRECT VALUE const secret = 9972; // REPLACE WITH CORRECT VALUE const secretHashRecomputed = crypto.pbkdf2Sync(secret.toString(), secretSalt, 1000, 32, 'sha512').toString('hex'); console.log(`secretHash matched = ${secretHash === secretHashRecomputed}`); // identification of the winner position const lastTicketHolderPosition = 1; // REPLACE WITH CORRECT VALUE const pickWinner = (highestPosition, secret)=>{const reposters=Array.from(Array(highestPosition+1).keys());let counter=0;while(secret>0){if(secret===1){break;}secret--;if(reposters[counter+1]){counter++;}else{counter=0;}}return counter;} console.log(`winner position = ${pickWinner(lastTicketHolderPosition, secret)}`)