Website's VRF Mechanism:
-
A random number,
beta
, is generated using a VRF. -
The modulo of
beta
divided by the size of the revolver is hashed with a random key (salt
) and published as part of thenewGame
transaction made by the bot. -
When the game ends, the bot sends the following as part of the
endGame
transaction:beta
: The randomly generated number in hex.salt
: The key concatenated with the modulo ofbeta
and the revolver size before generating the SHA-256 hash.publickey
: The public key of the VRF.proof
: The generated proof for this specific random number.alpha
: The input message to the VRF, created asUNIX time + [array of each player's bets]
.
-
Each invocation of the VRF is provided with a seed, randomly generated by the bot. This seed doesn't need to be revealed for verification.
-
Using
publickey
,proof
, andalpha
, anyone can verify thatbeta
is the correct VRF hash. Withbeta
verified, the modulo of it divided by the size of the revolver, concatenated withsalt
, generates a SHA-256 hash. This hash should match the one passed tonewGame
, proving that the bullet's chamber index was randomly generated at the start of the game. -
_hashedBulletChamberIndex
telegram bot feeds value toNew Game
-
string[]
publickey, alpha, proof, beta, salt