YOLO
YOLO is a multiplayer spin-to-win game accessible through our dedicated platform. Unlike traditional setups, our platform remains non-intrusive and does not interfere with gameplay.
The outcome of each game is determined by a combination of the player's unique client seed and random numbers sourced from the Drand chain. These elements are transformed into a hash value using the SHA-512 function. This hash is then computed to produce the final random number that decides the winner.
Hash Generation
func generateHMAC(key, data []byte) string {
h := hmac.New(sha512.New, key)
h.Write(data)
hmacValue := h.Sum(nil)
return hex.EncodeToString(hmacValue)
}
Random Number Generation
func getResult(seed string, cSeed1 string, cSeed2 string, total int64) int64 {
hash := generateHMAC([]byte(seed), []byte(fmt.Sprintf("%s:%s", cSeed1, cSeed2)))
result, _ := strconv.ParseInt(hash, 16, 64)
hit := (result % total) + 1
return hit
}
Last updated