Cwallet
Search
K

What is Provably Fair

Provably Fair

Provably Fair Explained

The term "provably fair" refers to an algorithm that utilizes technology to make online randomization more efficient and transparent while maintaining the highest level of fairness and openness.
Briefly, the algorithm uses blockchain technology to generate as random an outcome as possible, such as shuffling a deck of playing cards or flipping a coin.

Overview

Cwallet Giveaway is a provably fair giveaway tool, which employs a provably fair algorithm. By applying the revolutionary concept of provably fair, we ensure that the sweepstake is more realistic and transparent.

Components

The provably fair algorithm can be implemented in many ways, but the most common one involves calculating three important variables every single time a draw is conducted: the server seed, the client seed and the nonce. Client seed & server seed both are equally essential to generate a fair result.
Server Seed: A series of numbers and letters used to randomly generate the results by CC based on open source randomized algorithm.


Client Seed: we use a blockchain-based algorithm which is unpredictable, once the draw starts, the current ETH block’s hash will be used as Client seed.


Nounce: An active integer that increases for each participation and is assigned to 
all participants as their unique PID (Participant ID) for that giveaway.

Random Draw Process

Random numbers (for draw results) are generated using server seed, client seed, and nonce. The server seed is hashed and displayed before the draw begins. This ensures that the draw results can not be modified during the draw process.

About the algorithm

This algorithm selects a specific number of winners among all participants based on the ETH blockHash and the server seed.
As per the linear congruential generator, we use the glibc parameter as the parameter of the algorithm, and the ETH blockHash as the secret key, use HmacSHA256 Generator to encrypt the ServerSeed in order to obtain an hash value, and converts this hash value into an integer. Then take the last 8 digits of this integer as the initial seed of the random algorithm. By doing so we will randomly select a winner from each participant, until all are selected.
If the number of participants is less than or equal to the number of winners, then each participant will win the prize without algorithm calculations.

Provably Fair Conclusion

To summarize the entire idea of provably fair algorithms, there are three important steps to bear in mind:
1. Before the draw, you will view the server seed hash. The server seed will be available after the giveaway has been drawn. Users can encrypt the ServerSeed using SHA256, and compare the encrypted hash value with the ServerSeedHash given in the giveaway, so as to determine whether we've tampered with it or not.
2. The machine uses an algorithm to generate random outcomes based on the seed.
3. After calculating, you can click Verify in order to verify the fairness of the giveaway that you’ve just participated.