NostrDice is a provably fair betting game combining the power of Lightning and Nostr.
In order to ensure that there is no way for the system to change the outcome of a bet, the server commits to a secret key ahead of time. The key is not not released right away, since it could be used to submit selective zaps and win bets unfairly. However, the hash of the secrets is released and forever recorded in the Nostr. After the secrets are release users can verify that preceding bets were provably fair.
Each bet that comes in is assigned to the secret key of the current round when it is first processed. In most cases this will be as soon as the user zapped a Note.
Game:
NostrDice-Game (npub1nst…ns84)Nonces:
NostrDice-Nonces (npub1nst…zcwp)Game description:
https://github.com/NostrDice/nostrdice/blob/main/GAME.mdSource:
https://github.com/NostrDice/nostrdicePublished at
2024-08-02T06:00:24ZEvent JSON
{
"id": "fc286144184d282ba348524dc91822aaecfffc5f1f906b6501d336a668873644",
"pubkey": "9c1636e14717511761ce8628bf2a8b7c6f1ba0bd1b6ac45554dd5ac679809ee5",
"created_at": 1722578424,
"kind": 0,
"tags": [],
"content": "{\"displayName\":\"NostrDice\",\"display_name\":\"NostrDice\",\"name\":\"NostrDice\",\"lud16\":\"hornedminute49@walletofsatoshi.com\",\"nip05\":\"social@nostrdice.com\",\"pubkey\":\"9c1636e14717511761ce8628bf2a8b7c6f1ba0bd1b6ac45554dd5ac679809ee5\",\"npub\":\"npub1nstrdc28zag3wcwwsc5t725t03h3hg9ard4vg425m4dvv7vqnmjsn076qj\",\"created_at\":1722404222,\"picture\":\"https://m.primal.net/JijH.png\",\"banner\":\"https://m.primal.net/Jikk.png\",\"about\":\"NostrDice is a provably fair betting game combining the power of Lightning and Nostr.\\n\\nIn order to ensure that there is no way for the system to change the outcome of a bet, the server commits to a secret key ahead of time. The key is not not released right away, since it could be used to submit selective zaps and win bets unfairly. However, the hash of the secrets is released and forever recorded in the Nostr. After the secrets are release users can verify that preceding bets were provably fair.\\n\\nEach bet that comes in is assigned to the secret key of the current round when it is first processed. In most cases this will be as soon as the user zapped a Note.\\n\\nGame: nostr:npub1nstrdc6z4y9xadyj4z2zfecu6zt05uvlmd08ea0vchcvfrjvv7yq8lns84\\nNonces: nostr:npub1nstrdc23h57te608p6rx90lhay86ny5lpm9jpnxquzv9fnvmpfhqnpzcwp\\n\\nGame description: https://github.com/NostrDice/nostrdice/blob/main/GAME.md\\nSource: https://github.com/NostrDice/nostrdice\"}",
"sig": "c8c88ba2d4ac3216e6a18af355436ada93b48d8ae26072a3d67d83035a79f6fad4e991f6d24e745e133b9a1c44ba786a76bdc826b0abae37c159f5c431fdc8c4"
}