Guide
Provably fair dice on Solana
“Provably fair” means you can check the math before you pay and confirm the outcome after — without trusting a black box. Garden Dice is a minimal, wallet-native demo of commit-reveal fairness plus a SOL micropayment.
The problem: trust in online rolls
A server could pick the die face after seeing your bet, or skew results in its favor. Traditional online games ask you to trust branding and audits. Commit-reveal schemes let you verify each round with public hashing — the same idea used in blockchain games, casinos, and lotteries.
Commit-reveal in three steps
-
Commit. The server picks a secret
serverSeedand shows youSHA-256(serverSeed)before you send SOL. The server cannot change the seed without changing the hash you already saw. -
Pay. You transfer a small amount of SOL from your wallet to the treasury.
Your payment transaction signature can become the
clientSeed(or you supply your own). -
Reveal & verify. The server reveals
serverSeed. You recompute the hash and the die face. If anything was tampered with, verification fails.
How Garden Dice computes the roll
After payment confirms, the die face is:
hash = SHA-256(serverSeed + clientSeed)
roll = (first 8 hex chars of hash as integer mod 6) + 1
Same seeds always produce the same face (1–6). You can paste the seeds into any
SHA-256 tool and check the math yourself. The commit hash must match
SHA-256(serverSeed) from before you paid.
Why Solana fits micropay-per-roll
Sub-cent fees and sub-second finality make “pay 0.001 SOL, get an instant roll” practical. No card processor, no account signup — Phantom, Solflare, Backpack, or Solana Pay QR. Payments go straight to an on-chain treasury you can inspect on Solscan.
Garden Dice is pay-per-roll entertainment, not a casino with cash payouts. You pay for a verifiable roll and bragging rights — a transparent experiment in wallet-native payments.
Network fees are tiny on Solana
A common first-payment worry: “Do I have enough SOL for the fee?” On mainnet the base network fee is about 0.000005 SOL per transfer — far less than the 0.001 SOL roll itself. Keep payment plus fee in your wallet (roughly 0.002 SOL total is safe).
See the Solana transaction fees guide for base vs priority fees, or your first Solana payment for a beginner walkthrough.
Ready to play? This guide explains the math — the step-by-step tutorial walks through demo, wallet, and pay.
How to play Wallet setupTry it yourself
Connect a wallet or use Solana Pay on mobile. Watch the commit hash appear before you pay, then verify the revealed server seed matches.
Stuck at payment?
If your wallet says insufficient SOL even though your balance looks fine, part of it may be rent-locked in empty token accounts from spam airdrops — only spendable SOL counts for payments.
- Reclaim Solana rent — close empty token accounts and recover about 0.002 SOL each.
- Solana wallet cleanup — hide spam tokens, reclaim rent, and check spendable balance.
- Solana insufficient SOL — compare Phantom, Solflare, and Backpack balance fixes.
- Solana transaction failed — wrong network, cancelled approval, or detection lag.
- Solana Pay not working — QR scan, wrong amount, or paid-but-not-detected on mobile.
Full beginner path: wallet tutorial or how to play Solana dice.
FAQ
- What is provably fair dice on Solana?
- Commit-reveal hashing lets you verify each roll before and after you pay SOL from your wallet. Garden Dice is a minimal live demo at solana.garden/dice.
- How much does a roll cost?
- From 0.001 SOL per roll plus a ~0.000005 SOL network fee. Try the free demo first — no wallet required.
- Is this a casino?
- No cash payouts — you pay for a verifiable roll and challenge links, not winnings.
- Do I need extra SOL for network fees?
- Yes — keep a little extra beyond the roll. See Solana transaction fees for base vs priority fees.
- I have SOL but payment says insufficient — why?
- Your total balance can include SOL locked as rent in empty token accounts. Close them to reclaim about 0.002 SOL each — wallet cleanup or rent reclaim.
Further reading
- Commitment schemes (Wikipedia)
- Solana Pay specification
- Wallet-native Solana games hub — browser play without an app store
- Provably fair Solana games hub — fairness models compared
- How to play Solana dice — step-by-step tutorial
- Solana transaction fees explained
- Your first Solana payment
- Solana Pay QR micropayments guide
- Beat my roll — challenge links
- Garden treasury on Solscan