Peergame Peergame uses a secret key with SHA-256 to generate a chain of 1,000,000 hashes, and each round seed’s hash equals the previous round seed.
Next round’s seed
----- SHA256 Hash ---⤍
Current round’s Seed
Random number for the game result is derived from a hash of the current round seed + all participated transaction ID in each round. Then the random number is divided by 4, which results in four different game scenarios. Please see the image below.
Hash (current round’s seed + users’ bet TxIDs) = Random number
Game result = Random number % mod 4 = 0 ~ 3
1. 100th round’s seed is:
2. Hash’ed 100th round’s seed becomes the current (99th) round’s seed
3. Combine the current round’s seed with all TxIDs that users made in the 99th round
4. Hash (current round’s seed + TxIDs) is divided by 4
= 0 (Game result)