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
- BSC-Compatible Wallet: Install MetaMask, Trust Wallet, or use the platform's social login option.
- BNB Tokens: You need BNB (Binance Coin) to place bets and pay network transaction fees.
Connecting to TrustRoll
- Click the "Go to App" button in the top-right corner or visit trustroll.win directly
- Click "Connect Wallet" and approve the connection request in your wallet
- Ensure you have sufficient BNB in your wallet
Placing Your First Bet
- Select a Game: Choose from the various games offered on the platform
- Set Your Bet Amount: Enter how much BNB you wish to wager (minimum 0.01 BNB)
- Choose Your Prediction: Select the outcome(s) you want to bet on
- Confirm the Transaction: Click "Play Now" and approve the transaction in your wallet
- Wait for Results: The outcome will be determined by the smart contract and displayed within seconds
- Receive Winnings: If you win, payouts are sent automatically to your wallet
Game Mechanics
Coin Flip
- How to Play: Bet on either Heads or Tails
- Odds: 50% chance of winning
- Payout: 1.98× your bet (after 1% house edge)
- Example: Bet 1 BNB on Heads → Win = 1.98 BNB (including your bet)
Dice (Single Die)
- How to Play: Bet on one or more numbers on a six-sided die
- Odds: Depends on how many sides you bet on (1/6 to 5/6)
- Payout: Varies based on number of sides covered
- One number (16.7% chance): ~5.94× bet
- Two numbers (33.3% chance): ~2.97× bet
- Three numbers (50% chance): ~1.98× bet
- Example: Bet 0.5 BNB on number 5 → Win = 2.97 BNB if die shows 5
Two Dice
- How to Play: Bet on specific combinations of two dice (36 possible outcomes)
- Odds: 1/36 (2.78%) for a specific pair to 50% for broader bets
- Payout: Up to 35.64× for a specific pair (e.g., double sixes)
- Example: Bet 0.1 BNB on double sixes → Win = 3.52 BNB if both dice show 6
TrustRoll Game (0-97)
- How to Play: Choose your own win probability by setting a "roll under" threshold (0-97)
- Odds: Fully customizable (1% to 97% chance of winning)
- Payout: Inverse to your win probability (lower chance = higher payout)
- 50% chance: ~1.98× bet
- 10% chance: ~9.9× bet
- 1% chance: ~99× bet
- Example: Bet 1 BNB with a 25% win chance → Win = 3.96 BNB if the number is 0-24
Roulette
- How to Play: Bet on one or more numbers from 0 to 36
- Odds: 1/37 (2.7%) for a single number to 48.6% for half the wheel
- Payout: Up to 36.59× for a single number bet
- Example: Bet 0.1 BNB on number 7 → Win = 3.63 BNB if the wheel lands on 7
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
- 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.
- 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.
- 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
- Players: Cannot predict or influence the outcome.
- Platform: Cannot alter the secret number after the bet has been recorded, preventing any manipulation.
- Miners: Cannot control the block hash randomness to affect results.
Verification – Real-World Example
Verification Tools
Use these tools to verify any bet on the blockchain:
Jackpot System & House Edge
House Edge
- Rate: 1% on all bets
- Minimum Fee: 0.0003 BNB (for very small bets)
- How It Works: For every bet, 1% of the wager goes to the platform as revenue
- Effect on Payouts: True odds are reduced by 1% (e.g., a fair 2× payout becomes 1.98×)
Jackpot System
- Eligibility: Any bet of 0.1 BNB or more
- Fee: 0.001 BNB per eligible bet goes to the jackpot pool
- Winning Chance: 0.1% (1 in 1000) per eligible bet
- Prize: The entire accumulated jackpot pool
- Mechanism: The smart contract performs a second random draw after determining the main game outcome
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.");
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;
}
}
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.");
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);
}
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);
}
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
Place Bet
Player calls placeBet()
with a cryptographic commit signed by the secret signer
Store Bet
Bet parameters and commit are stored on-chain with a unique identifier
Settle Bet
Croupier calls settleBet()
with the reveal and the block hash
Verify Commit
Contract verifies the reveal matches the original commit
Generate Random Number
A random number is generated by combining the reveal with the block hash
Determine Outcome
Contract determines if the bet won based on the generated random number
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);
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.");
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.");
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.");
Security & Transparency
Platform Security
- Open Source Contract: The smart contract is verified and publicly viewable on BscScan
- Automatic Payouts: All winnings are paid directly by the smart contract without human intervention
- Transparent Bankroll: The contract's BNB balance is public information
- Provable Fairness: All random outcomes can be independently verified
- No Custodial Risk: Your funds always remain fully under your control in your own wallet
User Security Best Practices
- Wallet Safety: Never share your private keys or seed phrase
- Official Links: Always access TrustRoll through the official website
- Transaction Verification: Check bet amounts and contract addresses before confirming
- Responsible Gaming: Set personal limits and don't chase losses
- Scam Awareness: The platform will never ask for funds outside of normal betting
Troubleshooting & FAQs
Find answers to the most commonly asked questions about TrustRoll below.
Connection Issues
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
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
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
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.
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.
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
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.
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
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.
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 |