Pigmo.com Litepaper
  • 🐷Introduction to Pigmo & $PIG
  • PIGMO TOKEN - $PIG
    • 🪙Tokenomics
      • NFT Holders (30%)
      • Airdrop to strategic Crypto communities (7.5%)
      • Mini app farm (7.5%)
      • Treasury and Governance (10%)
      • Liquidity and Development (15%)
      • Team and Advisors (5%)
      • Capital raise (15%)
      • Partnerships and Marketing (10%)
    • 🔨Utility
      • 🎰Exclusive Benefits
      • 💰Stake to earn
      • 🔥Buy back & burn
      • 🔓Locked Staking
      • 📅The future
  • 🔗EXTERNAL LINKS
    • Discord
    • Telegram
    • Twitter
    • Pigmo app
    • Official telegram mini app
    • $PIG farm mini app
  • CASINO
    • 🛣️Roadmap
    • 👑VIP System & benefits
    • 📞Contact us
  • Fairness
    • 🎰Outsourced providers
    • ⚖️Provable Fairness
    • 🛡️Implementation
    • 🔄Conversions
    • 🎲Game events
  • Transactions within the app
    • 💰Supported tokens
    • 📃Withdraw requirements
    • 🕒Pending withdrawals timeframe
    • ⛽Blockchain gas fees
    • 💬Support
  • Affiliate & partnership
    • 🚀Listing your token
    • 📊Effective RTP
    • 🤝Affiliate program
Powered by GitBook
On this page
  • Pigmo's Seed Server
  • User Seed
  • Unique Identifier
  • Sequential Counter (Numeric Advancement)
  1. Fairness

Implementation

PreviousProvable FairnessNextConversions

Last updated 1 year ago

In ensuring fairness in every wager, Pigmo.com employs a set of input parameters comprising a client seed, a server seed, a nonce, and a cursor. These elements are fed into a function, which relies on the cryptographic hash function . The bytes generated from this process serve as the cornerstone of our platform's provably fair random outcome generation mechanism.

// Random number generation based on following inputs: serverSeed, clientSeed, nonce and cursor
function byteGenerator({ serverSeed, clientSeed, nonce, cursor }) {

// Setup curser variables
let currentRound = Math.floor(cursor / 32);
let currentRoundCursor = cursor;
currentRoundCursor -= currentRound * 32;

// Generate outputs until cursor requirement fullfilled
while (true) {
    // HMAC function used to output provided inputs into bytes
    const hmac = createHmac('sha256', serverSeed);
    hmac.update(`${clientSeed}:${nonce}:${currentRound}`);
    const buffer = hmac.digest();

    // Update curser for next iteration of loop
    while (currentRoundCursor < 32) {
        yield Number(buffer[currentRoundCursor]);
        currentRoundCursor += 1;
    }
    currentRoundCursor = 0;
    currentRound += 1;
    }
}

Pigmo's Seed Server

At Pigmo.com, we generate the Pigmo server seed using a system that produces a random 64-character hexadecimal string. Before you place any bets, you'll receive an encrypted hash of this generated server seed. This encryption ensures that the original server seed remains unchanged by the casino operator and prevents players from predicting results in advance.

To unveil the server seed from its encrypted state, players need to rotate the seed, prompting the system to replace it with a newly generated one.

Once this step is completed, you can confirm that the hashed server seed matches the original unhashed server seed. You can easily verify this process through our unhashed server seed function, conveniently located in the menu above.

User Seed

The user seed is an essential element granting players a degree of control over the unpredictability of outcomes. In the absence of this factor, the server seed would unilaterally dictate the result of every bet, stripping players of their agency.

Players retain the autonomy to alter their user seed regularly, thereby initiating a fresh sequence of forthcoming random events. This feature empowers players with absolute authority over outcome generation, akin to shuffling cards at a traditional casino.

Upon registration, a user seed is automatically generated by your browser, ensuring a seamless initiation to the platform. While this default seed is deemed adequate, we strongly advise users to select their own seed to imbue their influence within the randomness.

This customization can be facilitated through the fairness interface.

Unique Identifier

A nonce serves as a distinctive identifier, incrementing with each new wager placed. This mechanism leverages the SHA256 cryptographic function to produce entirely fresh outcomes without necessitating the regeneration of a client seed and server seed.

By integrating the nonce, Pigmo.com maintains fidelity to your client seed and server seed pairing while producing novel outcomes for every bet executed.

Sequential Counter (Numeric Advancement)

In our gaming system, we employ a four-byte data structure to produce individual game results. Due to the limitation of SHA256 to 32 bytes, we have devised a method utilizing a sequential counter to expand our ability to generate game events without necessitating alterations to our provably fair algorithm.

This counter comes into play only when the game at hand demands the creation of more than 8 (32 bytes / 4 bytes) potential outcomes. For instance, in scenarios where we require the utilization of more than 8 cards in a game like blackjack.

Initially set at 0, the counter increments by 1 with each execution of the HMAC_SHA256 function, resulting in the generation of 32 bytes. Should the need for additional random numbers for game events not arise (i.e., fewer than 8), the counter remains static, as there's no requirement to generate further potential game outcomes.

🛡️
random number generation
HMAC_SHA256