Simulate millions of provably-fair dice rolls in your browser.
Write a Lua dice-bot strategy, replay it against Stake-compatible seeds, and see the real risk of ruin before you risk a single satoshi. There is nothing to install, you don't need an account, and the rolls run on your machine.
- HMAC-SHA512 RNG, verifiable seeds
- Runs locally, and saved code stays private
- Lua 5.4 compiled to WebAssembly
chance = 49.5
basebet = 0.00001000
nextbet = basebet
function dobet()
if win then
nextbet = basebet
else
nextbet = previousbet * 2
end
if currentstreak <= -12 then stop() end
endrolls/s
250K
max loss streak
11
risk of ruin
3.1%
Illustrative example. Run it yourself to get real numbers for your seeds.
Top strategies by net profit
updates every minuteThe leaderboard is waiting for its first verified run.
Log in, simulate a strategy and submit the run to put your name here.
Be the firstWhat you get
A developer tool for dice strategies.
Lua IDE + WASM engine
DiceBot-compatible Lua with Monaco autocompletion. The engine compiles to WebAssembly and runs hundreds of thousands of rolls per second in a Web Worker. Simulations never touch our servers.
Open the simulatorRisk calculator
Enter chance, balance and base bet to get payout, max survivable loss streak, risk of ruin over any horizon and a best/median/worst bankroll projection. Results update instantly.
Run the numbersLeaderboard & marketplace
Submit verified runs, rank by profit, wager, survival or efficiency. Sell your script as a black box: buyers see its stats but never the source.
See the leaderboardHow it works
From idea to verified result in four steps.
- 01
Pick a template or write Lua
Start from Martingale, Delayed Escalation, Paroli, Dynamic Recovery, D'Alembert or Labouchère, or paste your own dobet() script.
- 02
Set seeds, chance and bankroll
Server seed, client seed and nonce reproduce any run exactly. Choose house edge presets for Stake, Bitsler and more.
- 03
Run 10,000,000 rolls locally
Watch the balance curve, bet sizing and drawdown stream live. Pause, inspect logs, tweak, run again.
- 04
Share, rank, or sell
Log the run, export a share card, submit to the leaderboard or list it on the marketplace.
Advanced features
Parallel stress test
Runs the strategy on five seed sets in five parallel workers, so you can see whether it holds up or just got one lucky seed.
Grid search & auto-tuner
Sweep parameter ranges or let a genetic optimizer maximise profit ÷ drawdown × ln(rolls survived).
AI copilot
Describe a strategy in plain English and get working Lua, or ask why your script went bankrupt at roll 41,207.
Agent API
Scoped API keys let autonomous agents simulate, save and publish strategies via the MCP-style tool contract.
Frequently asked questions
Is DiceSim a casino? Can I bet real money here?
No. DiceSim is a simulator and calculator. No wagering happens on this site. We simulate the same provably-fair roll algorithm used by popular crypto dice sites so you can study a strategy before deciding whether to use it anywhere.
How are rolls generated?
Rolls use HMAC-SHA512(serverSeed, clientSeed:nonce:cursor), consuming four bytes per roll and producing a number from 0.00 to 100.00. This is the same scheme Stake publishes. Given the same seeds, you get byte-for-byte identical results, so every run is reproducible and verifiable.
Can a betting strategy beat the house edge?
Not in expectation. Every dice game pays out slightly less than fair odds, so over enough rolls every betting system loses on average. A strategy can change the shape of the risk (how often you win small versus lose big), but it cannot change the sign of the expected value. DiceSim shows you that trade-off before real money is involved.
Is my Lua code private?
Yes. Scripts run in your browser. If you save a strategy to your account it is stored encrypted at rest and never shown to other users: the leaderboard, strategy pages, profiles and share cards expose only names and aggregate statistics. Marketplace buyers receive the code only after a completed purchase.
Is DiceSim free?
Yes. Anonymous visitors can simulate up to 100,000 rolls per batch with scripts saved locally. A free account raises the limit to 10,000,000 rolls, saves strategies to the cloud and unlocks the leaderboard and marketplace.
What is DiceBot / Lua compatibility?
DiceSim exposes the familiar globals (chance, nextbet, bethigh, balance, win, currentstreak, …) and the dobet() entry point, so most scripts written for Seuntjie's DiceBot or similar tools run unchanged.
Know the odds before you play them.
DiceSim is free and runs entirely in your browser. Some pages link to partner casinos with referral codes; if you sign up through them we may earn a commission at no cost to you. Simulation is not gambling, but the casinos we link to are. 18+ only.