TrustRoll Documentation

TrustRoll is a decentralized gaming platform built on the Binance Smart Chain (BSC) that offers provably fair chance-based games. Unlike traditional online casinos, TrustRoll operates entirely on a public smart contract, ensuring complete transparency and trustless gameplay.

Key Platform Features

Provably Fair & Transparent

All game outcomes are cryptographically secured and recorded publicly on the BSC blockchain, ensuring verifiable fairness.

Non-Custodial & Decentralized

Play directly from your crypto wallet without depositing funds or relying on intermediaries. Smart contracts handle all bets and payouts.

Low House Edge

Enjoy fairer gaming with just a 1% house fee, significantly lower than traditional casinos.

Provable Randomness

Blockchain-derived cryptographic randomness guarantees truly unpredictable and verifiable outcomes.

Instant Payouts

Winnings are automatically sent to your wallet immediately after each successful bet.

No Registration Required

Connect your wallet and play instantly—no sign-ups, emails, or personal data required.

Secure & Audited

Smart contracts are independently audited to ensure the highest security standards for your funds and gameplay.

Community-Driven

Our platform evolves based on community feedback, ensuring continuous improvement and satisfaction.

Available Games

TrustRoll offers multiple games of chance:

Game Description Odds Max Payout
Coin Flip 50/50 odds game 50% 1.98×
Dice Six-sided die roll 16.7% - 83.3% 5.94×
Two Dice Double dice roll game 2.78% - 97.22% 35.64×
TrustRoll Game Custom 0-97 game with adjustable odds 1% - 97% 99×
Roulette 37 possible outcomes 2.7% - 97.3% 36.63×

All games operate on the same core smart contract with identical fairness guarantees and a progressive jackpot system that gives every qualifying bet a chance to win big.

Getting Started

Prerequisites

Connecting to TrustRoll

  1. Click the "Go to App" button in the top-right corner or visit trustroll.win directly
  2. Click "Connect Wallet" and approve the connection request in your wallet
  3. Ensure you have sufficient BNB in your wallet
Note: No registration or account creation is required. Your crypto wallet serves as your identity on the platform.

Placing Your First Bet

  1. Select a Game: Choose from the various games offered on the platform
  2. Set Your Bet Amount: Enter how much BNB you wish to wager (minimum 0.01 BNB)
  3. Choose Your Prediction: Select the outcome(s) you want to bet on
  4. Confirm the Transaction: Click "Play Now" and approve the transaction in your wallet
  5. Wait for Results: The outcome will be determined by the smart contract and displayed within seconds
  6. Receive Winnings: If you win, payouts are sent automatically to your wallet

Game Mechanics

Coin Flip

Dice (Single Die)

Two Dice

TrustRoll Game (0-97)

Roulette

Provable Fairness Explained

TrustRoll ensures fairness using a secure and transparent commit-reveal system integrated directly into the blockchain. This mechanism prevents manipulation by players, the platform, or miners.

How the Commit-Reveal Mechanism Works

  1. Commit Phase:
    • When you place a bet, the platform generates a secret random number (the "reveal").
    • Instead of revealing this number immediately, the platform sends only a cryptographic hash of the number (the "commit") to the blockchain.
    • Your bet, along with this commit, is permanently recorded.
  2. Block Hash Randomness:
    • Your bet is included in a blockchain block, generating a unique and unpredictable block hash.
    • This block hash provides an additional layer of randomness that nobody can predict or manipulate.
  3. Reveal Phase:
    • After your bet is recorded on-chain, the platform publicly reveals the original secret random number.
    • The smart contract automatically:
      • Checks that this revealed number matches the original "commit."
      • Combines the reveal number with the block hash to produce the final, unbiased random outcome.
      • Determines the bet outcome based on your selected game conditions.
      • Sends winnings directly and immediately to your wallet.

Why This Is Secure and Fair

Verification – Real-World Example

Verification Tools

Use these tools to verify any bet on the blockchain:

Jackpot System & House Edge

House Edge

Jackpot System

The jackpot adds an exciting bonus opportunity to standard gameplay. Every qualifying bet has a small chance to win big, regardless of whether you win or lose the main game.

Technical Details

Smart Contract Architecture

TrustRoll's core functionality is implemented in a single Solidity smart contract deployed on the Binance Smart Chain. Key components include:

Betting Logic

Functions for placing bets, determining outcomes, and settling payments

// Validate input data ranges
         uint amount = msg.value;
         require(modulo > 1 && modulo <= MAX_MODULO, "Modulo should be within range.");
         require(amount >= MIN_BET && amount <= MAX_AMOUNT, "Amount should be within range.");
         require(betMask > 0 && betMask < MAX_BET_MASK, "Mask should be within range.");
// Validate input data ranges
uint amount = msg.value;
require(modulo > 1 && modulo <= MAX_MODULO, "Modulo should be within range.");
require(amount >= MIN_BET && amount <= MAX_AMOUNT, "Amount should be within range.");
require(betMask > 0 && betMask < MAX_BET_MASK, "Mask should be within range.");

Random Number Generation

Commit-reveal scheme combined with block hashes to ensure provable fairness

// The RNG - combine "reveal" and blockhash
         bytes32 entropy = keccak256(abi.encodePacked(reveal, entropyBlockHash));
         uint dice = uint(entropy) % modulo;
         if (modulo <= MAX_MASK_MODULO) {
             if ((2 ** dice) & bet.mask != 0) {
                 diceWin = diceWinAmount;
             }
         }
// The RNG - combine "reveal" and blockhash
bytes32 entropy = keccak256(abi.encodePacked(reveal, entropyBlockHash));
uint dice = uint(entropy) % modulo;
if (modulo <= MAX_MASK_MODULO) {
if ((2 ** dice) & bet.mask != 0) {
diceWin = diceWinAmount;
}
}

Bankroll Management

Systems to track locked funds and ensure the contract can pay all potential wins

// Funds tracking
         uint128 public jackpotSize;
         uint128 public lockedInBets;
         lockedInBets += uint128(possibleWinAmount);
         jackpotSize += uint128(jackpotFee);
         require(jackpotSize + lockedInBets <= address(this).balance, "Cannot afford to lose this bet.");
// Funds tracking
uint128 public jackpotSize;
uint128 public lockedInBets;
lockedInBets += uint128(possibleWinAmount);
jackpotSize += uint128(jackpotFee);
require(jackpotSize + lockedInBets <= address(this).balance, "Cannot afford to lose this bet.");

Jackpot Mechanism

Logic for collecting jackpot fees and determining jackpot wins

// Roll for a jackpot (if eligible)
         if (amount >= MIN_JACKPOT_BET) {
             uint jackpotRng = (uint(entropy) / modulo) % JACKPOT_MODULO;
             if (jackpotRng == 0) {
                 jackpotWin = jackpotSize;
                 jackpotSize = 0;
             }
         }
         if (jackpotWin > 0) {
             emit JackpotPayment(gambler, jackpotWin);
         }
// Roll for a jackpot (if eligible)
if (amount >= MIN_JACKPOT_BET) {
uint jackpotRng = (uint(entropy) / modulo) % JACKPOT_MODULO;
if (jackpotRng == 0) {
jackpotWin = jackpotSize;
jackpotSize = 0;
}
}
if (jackpotWin > 0) {
emit JackpotPayment(gambler, jackpotWin);
}

Settlement Process

The bet settlement is controlled by a designated croupier address to ensure security

// Only the croupier can settle bets
function settleBet(uint reveal, bytes32 blockHash) external onlyCroupier {
    uint commit = uint(keccak256(abi.encodePacked(reveal)));
    
    // Verify the bet exists and hasn't expired
    Bet storage bet = bets[commit];
    uint placeBlockNumber = bet.placeBlockNumber;
    require(block.number > placeBlockNumber, "settleBet in the same block as placeBet, or before.");
    require(block.number <= placeBlockNumber + BET_EXPIRATION_BLOCKS, "Blockhash can't be queried by EVM.");
    
    // Verify the block hash matches
    require(blockhash(placeBlockNumber) == blockHash);
    
    // Process the bet outcome and payment
    settleBetCommon(bet, reveal, blockHash);
}
// Only the croupier can settle bets
function settleBet(uint reveal, bytes32 blockHash) external onlyCroupier {
uint commit = uint(keccak256(abi.encodePacked(reveal)));
// Verify the bet exists and hasn't expired
Bet storage bet = bets[commit];
uint placeBlockNumber = bet.placeBlockNumber;
require(block.number > placeBlockNumber, "settleBet in the same block as placeBet, or before.");
require(block.number <= placeBlockNumber + BET_EXPIRATION_BLOCKS, "Blockhash can't be queried by EVM.");
// Verify the block hash matches
require(blockhash(placeBlockNumber) == blockHash);
// Process the bet outcome and payment
settleBetCommon(bet, reveal, blockHash);
}

Key Technical Constants

The contract defines these key constants that determine game mechanics, house edge, and limits:

uint constant HOUSE_EDGE_PERCENT = 1;
            uint constant HOUSE_EDGE_MINIMUM_AMOUNT = 0.0003 ether;
            uint constant MIN_JACKPOT_BET = 0.1 ether;
            uint constant JACKPOT_MODULO = 1000;
            uint constant JACKPOT_FEE = 0.001 ether;
            uint constant MIN_BET = 0.01 ether;
            uint constant MAX_AMOUNT = 300000 ether;
            uint constant MAX_MODULO = 100;
            uint constant MAX_MASK_MODULO = 40;
            uint constant BET_EXPIRATION_BLOCKS = 250;

Bet Structure

Each bet is stored on-chain with the following data structure:

struct Bet {
                uint amount;
                uint8 modulo;
                uint8 rollUnder;
                uint40 placeBlockNumber;
                uint40 mask;
                address gambler;
            }

Bet Settlement Process

1
Place Bet

Player calls placeBet() with a cryptographic commit signed by the secret signer

2
Store Bet

Bet parameters and commit are stored on-chain with a unique identifier

3
Settle Bet

Croupier calls settleBet() with the reveal and the block hash

4
Verify Commit

Contract verifies the reveal matches the original commit

5
Generate Random Number

A random number is generated by combining the reveal with the block hash

6
Determine Outcome

Contract determines if the bet won based on the generated random number

7
Process Payout

Winnings (if any) are automatically sent to the player's wallet

Safety Mechanisms

Bet Expiration

If a bet isn't settled within 250 blocks (~12-15 minutes), players can request a refund

// Check that bet has already expired
            require(block.number > bet.placeBlockNumber + BET_EXPIRATION_BLOCKS, "Blockhash can't be queried by EVM.");
            // Process refund
            bet.amount = 0;
            sendFunds(bet.gambler, amount, amount);
// Check that bet has already expired
require(block.number > bet.placeBlockNumber + BET_EXPIRATION_BLOCKS, "Blockhash can't be queried by EVM.");
// Process refund
bet.amount = 0;
sendFunds(bet.gambler, amount, amount);

Maximum Profit Cap

The contract owner can set a maximum profit limit to protect the platform's bankroll

// Change max bet reward
            function setMaxProfit(uint _maxProfit) public onlyOwner {
                require(_maxProfit < MAX_AMOUNT, "maxProfit should be a sane number.");
                maxProfit = _maxProfit;
            }
            // During bet placement
            require(possibleWinAmount <= amount + maxProfit, "maxProfit limit violation.");
// Change max bet reward
function setMaxProfit(uint _maxProfit) public onlyOwner {
require(_maxProfit < MAX_AMOUNT, "maxProfit should be a sane number.");
maxProfit = _maxProfit;
}
// During bet placement
require(possibleWinAmount <= amount + maxProfit, "maxProfit limit violation.");

Funding Protection

The contract won't accept bets it can't afford to pay out

// Lock funds for potential payout
            lockedInBets += uint128(possibleWinAmount);
            jackpotSize += uint128(jackpotFee);
            // Check contract has enough funds
            require(jackpotSize + lockedInBets <= address(this).balance, "Cannot afford to lose this bet.");
// Lock funds for potential payout
lockedInBets += uint128(possibleWinAmount);
jackpotSize += uint128(jackpotFee);
// Check contract has enough funds
require(jackpotSize + lockedInBets <= address(this).balance, "Cannot afford to lose this bet.");

Signature Verification

All bet commits must be signed by the secret signer's authorized key to prevent tampering

// Check that commit signature is valid
            bytes32 signatureHash = keccak256(abi.encodePacked(uint40(commitLastBlock), commit));
            require(secretSigner == ecrecover(signatureHash, 27, r, s), "ECDSA signature is not valid.");
// Check that commit signature is valid
bytes32 signatureHash = keccak256(abi.encodePacked(uint40(commitLastBlock), commit));
require(secretSigner == ecrecover(signatureHash, 27, r, s), "ECDSA signature is not valid.");

Security & Transparency

Platform Security

User Security Best Practices

Troubleshooting & FAQs

Find answers to the most commonly asked questions about TrustRoll below.

Connection Issues
Betting & Payouts
Security & Fairness
Platform Information

Connection Issues

My wallet isn't connecting to TrustRoll

This is usually due to network configuration. First, make sure you're on the Binance Smart Chain network in your wallet (Chain ID 56). If you're still having issues, try these steps:

1. Refresh the page
2. Restart your browser
3. Disconnect and reconnect your wallet
4. Make sure your wallet is updated to the latest version

I sent a bet transaction, but it's taking a long time

BSC transactions typically confirm within seconds to minutes. If your transaction is taking unusually long, you can:

1. Check your transaction status in your wallet
2. Verify the transaction on BscScan
3. If the network is congested, you may need to wait longer
4. If it's been more than 30 minutes, contact support with your transaction hash

The site says I'm on the wrong network

TrustRoll operates exclusively on the Binance Smart Chain. You need to switch your wallet to BSC:

In MetaMask: Go to Settings > Networks > Add Network and enter Chain ID 56
In Trust Wallet: Click on the current network name at the top and select "Smart Chain"
Network Details:
  - Network Name: Binance Smart Chain
  - RPC URL: https://bsc-dataseed.binance.org/
  - Chain ID: 56
  - Symbol: BNB
  - Block Explorer: https://bscscan.com

Betting & Payouts

What are the minimum and maximum bets?

The minimum bet on TrustRoll is 0.01 BNB for all games. The maximum bet depends on:

1. The game you're playing
2. The current contract's bankroll
3. The maximum profit limit set by the platform

The interface will show you the maximum allowed bet based on your selected odds and the current platform limits.

My payout was slightly different than expected

Several factors affect your final payout:

1. House Edge: A 1% fee is applied to all bets
2. Jackpot Fee: For bets of 0.1 BNB or more, a 0.001 BNB jackpot fee is deducted
3. Rounding: Minor rounding differences can occur due to blockchain calculations

For example, a 1 BNB bet with a 50% win chance would theoretically pay 2 BNB, but after the house edge, it pays 1.98 BNB.

Do I need to claim winnings or are they automatic?

All winnings are sent automatically to your wallet as soon as the bet is resolved. There's no need to claim them manually.

The transaction containing your winnings will appear in your wallet history immediately after the bet is processed, usually within seconds.

Security & Fairness

How do I know the games aren't rigged?

TrustRoll uses a provably fair system based on blockchain technology:

1. All bet outcomes are determined by a combination of the platform's reveal value and the block hash
2. The platform commits to its random value before knowing the block hash
3. The smart contract verifies that the revealed value matches the original commit
4. You can independently verify this process for any bet

The entire code is open source and available for inspection on BscScan.

Can I play TrustRoll without real money?

Yes! TrustRoll offers a Testnet mode where you can experience the platform using an embedded test wallet pre-loaded with BNB Testnet funds. This allows you to explore games and mechanics without using real money.

Simply select the "Testnet" mode on the platform to begin playing with no risk or real-world cost.

Platform Information

Are there any country restrictions or KYC requirements?

As a decentralized platform, TrustRoll doesn't implement traditional KYC (Know Your Customer) processes or geo-blocking.

However, it's your responsibility to ensure that online gambling and cryptocurrency use are legal in your jurisdiction before using the platform.

TrustRoll operates solely through smart contracts on the Binance Smart Chain and doesn't collect personal data.

How does the jackpot system work?

The jackpot system adds an exciting secondary chance to win on qualifying bets:

1. Eligibility: Any bet of 0.1 BNB or more
2. Fee: 0.001 BNB per eligible bet goes to the jackpot pool
3. Winning Chance: 0.1% (1 in 1000) per eligible bet
4. Prize: The entire accumulated jackpot pool

You can win the jackpot regardless of whether your main bet wins or loses, and jackpot wins are automatically added to your payout.

Glossary

Term Definition
Blockchain A distributed ledger technology that records all transactions publicly and immutably
BSC (Binance Smart Chain) The blockchain on which TrustRoll operates
BNB Binance Coin, the cryptocurrency used for bets and gas fees on BSC
Commit-Reveal A cryptographic method where a value is first committed in hashed form, then revealed later
DApp (Decentralized Application) An application that runs on a blockchain
House Edge The percentage advantage the platform has over players (1% for TrustRoll)
Jackpot A prize pool that accumulates over time and pays out randomly to lucky players
Modulo The number of possible outcomes in a game (e.g., 2 for coin flip, 6 for dice)
Non-Custodial A system where users maintain control of their funds
Provably Fair A system where the fairness of outcomes can be mathematically verified
Smart Contract Self-executing code on the blockchain that automatically enforces rules
Wallet Software that stores private keys and allows interaction with the blockchain
Responsible Gaming: This documentation is for informational purposes only. Always gamble responsibly and be aware of the risks involved in cryptocurrency gaming. If you have any questions or issues not covered here, please contact TrustRoll support through the official website.