At GalaChain, we have always believed in fostering trust and fairness at every level. As part of our ongoing commitment to transparency, we’re thrilled to unveil our vision for the Epic $GALA Sweepstakes.
This is much more than the most exciting new way to earn $GALA; it’s a crucial step in our ecosystem’s journey toward a fully transparent and verifiable random number generation (RNG) process, built on GalaChain and powered by Gala Games Founder’s Nodes.
The First Few Drawings
To kick off the Epic $GALA Sweepstakes, the initial draws will use a 32-byte seed generation process to ensure fairness and accuracy.
Here’s how it works:
- Seed Generation Before Entries Open: Before any entries are accepted, a 32-byte seed will be randomly generated.
- Hash Transparency: The hash of this seed will be made publicly available at https://api-sweepstakes.gala.com/v1/bl/drawings/current , ensuring transparency from the outset.
- Seed Reveal After the Draw Ends: Once the drawing ends, the unhashed seed will be revealed and can be viewed by anyone at https://api-sweepstakes.gala.com/v1/bl/drawings .
- Verification: Using both the hashed and unhashed seed, users can validate that the seed and hash match, using the code included below. This will allow users to generate the winning numbers themselves, compare them with the official results, and confirm that the numbers were predetermined and not altered after entries were accepted.
Verify Code 👇
import Provable from 'provable';
import crypto from 'crypto';
const seedHash = process.argv[2];
const seed = process.argv[3];
if (!seedHash || !seed) {
console.log(`Usage: ${process.argv[0]} ${process.argv[1]} <seedHash> <seed>`);
}
function verifyHash(seedHash, seed) {
const hash = crypto.createHash('sha256').update(seed).digest('hex');
if (hash === seedHash) {
console.log('Seed and seed hash match');
} else {
throw new Error('Seed and seed hash do not match');
}
}
function calculateWinningNumbers(seed) {
function getUniqueOutputs(numOutputs, generator) {
const outputsSet = new Set();
while (outputsSet.size < numOutputs) {
const next = generator();
outputsSet.add(next);
}
return Array.from(outputsSet);
}
const winningNumberGenerator = Provable({
count: 100,
seed,
});
const winningNumbers = getUniqueOutputs(8, () => {
const hash = winningNumberGenerator.next();
return (Provable.toInt(hash) % 99) + 1;
}).sort((a, b) => a - b);
console.log('The winning numbers are', winningNumbers);
}
verifyHash(seedHash, seed);
calculateWinningNumbers(seed);
This approach ensures that the first few drawings are transparent, traceable and verifiable, setting the stage for a more advanced decentralized random number generator (RNG) that will be usable by creators throughout the growing GalaChain ecosystem.
The Goal: A Transparent Random Number Generator
Over the coming Sweepstakes drawings, we will roll out a revolutionary random number generator (RNG) powered by Gala’s 25,000 Founder’s Nodes and built on the robust infrastructure of GalaChain. This innovative system will transform how winners are selected, creating a process that’s not only fair but also fully verifiable by anyone in the community.
Here’s how it will work:
- Generation of a Secret Hash: The process begins with the creation of a secret hash. This hash acts as the starting point for a decentralized, transparent chain of events.
- Conversations Between Nodes: The hash is passed through a chain of randomly selected Founder’s Nodes. These nodes communicate with one another, building a trail that’s visible and traceable on GalaChain.
- Combining Founder’s Node Addresses: The addresses of all participating nodes are combined to produce a single unique hash.
- Determining the Winning Number: This final hash is then used to determine a number between 1 and 100, which corresponds to the drawn number. In each Epic $GALA Sweepstakes drawing, 8 unique numbers are determined.
Why This Matters
With this system, every step of the draw process will be:
- Decentralized, with no single entity controlling the outcome.
- Transparent, where the chain of node interactions is open to verification by anyone.
- Traceable, with every drawing able to be tracked back through GalaChain, ensuring complete fairness and accountability.
Looking Ahead
The path to transparency is a journey, and we’re excited to take it with you. While we will endeavor to provide what transparency we can in the first few draws, the rollout of our decentralized RNG will mark a significant milestone for not only the weekly Epic GALA Sweepstakes—but for the GalaChain ecosystem as a whole.
Stay tuned as we continue to innovate, delivering fairness and transparency in ways only GalaChain can.