Select Page
Gala Games of Chance – The Path to Transparency

Gala Games of Chance – The Path to Transparency

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:

  1. Seed Generation Before Entries Open: Before any entries are accepted, a 32-byte seed will be randomly generated.
  2. 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.
  3. 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 .
  4. 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: 

  1. 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.
  2. 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.
  3. Combining Founder’s Node Addresses: The addresses of all participating nodes are combined to produce a single unique hash.
  4. 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.

Play Epic Gala Sweepstakes

Understanding GalaChain: Blockchain + Utility

Understanding GalaChain: Blockchain + Utility

Bitcoin is the gold standard of blockchain, right? Not exactly. While Bitcoin may be the gold standard of cryptocurrency (Or the block standard of gold? 🤨), its blockchain is actually quite limited in terms of real web3 application.

The BTC blockchain writes data to the ledger. You can reference that immutable data from existing blocks, but it’s just data. Programmable and adaptable code executing from blocks isn’t what it was made for. Though solutions have been created to execute script on BTC’s chain, it’s designed to be a one-way, immutable message.

This is fine for a blockchain like the one used for Bitcoin. After all, its main purpose is to process and verify Bitcoin transactions. If you want to do more with a blockchain, however, you need to create more adaptable infrastructure.

Adaptable Systems

Ethereum solved a lot of the above problem. Using Ethereum, developers can write smart contracts and deploy them to the chain. These are then living pieces of code waiting to serve a function on the chain. Unlike with Bitcoin’s chain, they can be written into the blocks that make up the chain.

The difference between making blocks on the BTC chain and Ethereum is like going from building with a standard jigsaw puzzle to an erector set. The blocks on the chain don’t just come together to build a ledger, they can connect to dApps in all sorts of ways!

This gives blockchain developers a way to build applications and services on the blockchain. Since they are written onto the blocks themselves, it necessarily means that all these smart contracts are open source and readily reviewable by anyone who wants to use them… or even build more functionality on top of them.

Ethereum and other chains like it opened up the floodgates. They create the possibility of a chain that’s not only immutable, but highly interactable. Developers can access a large supply of functionality across chains and use it to build even better tools and resources.

Chains like Ethereum created the possibility of a decentralized internet — a digital system in which functionality is built on immutable and public blocks. Execution of tasks through smart contracts gives the framework to build complex interactions, all through the blockchain.

Privacy and Blockchain

Ethereum has its own limitations, however. On a chain like Ethereum, the ledger is necessarily public. This is amazing for open source development, but what happens when some data needs to stay private? This is a fundamentally limiting factor of chains like Ethereum, as digital activities across our society regularly require the use of privileged data or personal information.

Ethereum development is great for open source software, public tools and independent, collaborative development… but where does a corporation go if they want to build on-chain while protecting user data and proprietary information? There’s nowhere to hide in Ethereum’s blocks.

This is where we come to the idea of a private blockchain. While a blockchain must have a public ledger that can be verified, that ledger doesn’t always need to hold all the information in a transaction. With the basic ideas of encryption, we can create systems where the publicly available information on visible blocks can be easily used to verify history and transactions without the need for sensitive information to broadcast in public.

This all brings us finally to Hyperledger Fabric. Hyperledger Fabric isn’t a blockchain in and of itself, but is rather a framework on which a custom blockchain can be built.

Hyperledger Fabric enables the creation of a type of subnet on the blockchain — channels. Each channel has pluggable consensus and ordering, which means that channel creators can determine many more aspects of their environment than other channels. 

If an enterprise wants to create an internal, centralized channel with permissioned access to transactions and private data masked on the ledger, they could do that just as easily as a channel creator could create a fully open source channel with democratic consensus.

Channels are GalaChain, but they’re also separate instances running underneath it.

Think of it like a train running along a track. Each individual car is heading the same direction with the same velocity, but each can serve a totally different purpose. The design of the club car is vastly different from that of a flat car.

When you’re on or in any individual car, you’re definitely still ‘on the train’. The environment around you, however, depends on which car you’re in. 

Each channel functions underneath GalaChain, with their own separate ledger. While they are still GalaChain, they can function independently of each other.

Next Generation Blockchain

We didn’t whip GalaChain as a proof of concept. If you remember back to the early days of GalaChain, we were demoing a live game at first preview because we wanted to show how we were building something that could do more. We didn’t make it this way because it was easy, we set out to create a blockchain that could facilitate real-world business, entertainment and, most importantly, adoption.

Web3 has moved beyond thought experiments and idealistic demonstrations with limited utility. GalaChain is customizable and adaptable to everyday applications. It’s easy for developers to use and doesn’t require that they problem solve to account for the rigid rules of the network. 

We’re not talking about “the future” anymore. GalaChain is a tool that is useful for projects and organizations of all types now.

In our next edition, we’ll dive into specifics about how GalaChain works in a more technical sense. We’ll look at how permissions and ordering work on GalaChain, specifically in the context of multiple channels.

We know there’s a lot to cover on GalaChain. In this series, we’re trying to walk someone with a basic technical understanding through the fundamentals of GalaChain. If, however, we’ve sufficiently stoked your curiosity and you just need to know more, check out GalaChain’s documentation today!

We’ll see you next time for more Understanding GalaChain!