IC Dragon - a dice roll game with randomness fully on-chain on ICP


  • Last week, we launched a dice game as a testament that provably secure randomness is achievable on-chain on ICP
  • I shared this fun side project on X and in the Loka Mining Discord. The gameplay is simple: buy ticket → roll dice → win prize.
  • Surprisingly, in just a few days, we sold over a thousand dice roll tickets and awarded prizes totaling more than 150 ICP, with practically no marketing.
  • We have open-sourced the code. You can now play the game at https://icdragon.xyz (find the link there).


A few weeks ago, we noticed a tweet by Jan Camenisch in response to a question from Solana’s co-founder.

It started with a question: “Why don’t blockchains have built-in sys calls / op codes for randomness?” Anatoly replied, “It’s impossible to build without an oracle.”

So, during the weekend before our next sprint for scoping the release of our main project on building a decentralized Bitcoin mining pool on ICP, we built and shipped this dice game.


Our game is a simple “snake eyes” dice game won by rolling double ones (1-1). To add fun, we included a twist: the prize increases each time someone loses.

Each round starts with two prize pools:

  • The Grand Prize, starting at 10x the ticket price.
  • The Bonus Prize, starting at 2x the ticket price.

As a player, you need to:

  1. Buy a ticket.
  2. Roll the dice.

Game rules:

  • Rolling snake eyes (both dice showing “1”) wins the Grand Prize.
  • Rolling any doubles, except snake eyes and double sixes (2-2, 3-3, 4-4, 5-5), grants an extra dice roll.
  • Rolling the first highest number among all participants wins the Bonus Prize. The first double six (6-6) guarantees a win.

The value of both prizes will keep increasing with every roll until someone wins the Grand Prize, after which a new round starts.

Game Mechanic Rationale

The odds of rolling snake eyes are 1 in 36, or about a 2.7% probability per roll. Since any double (except 1-1 and 6-6) grants an extra roll, the odds improve to around 1 in 32, or 3.1%.

For a rational gambler (if such a term exists), it only makes sense to bet when the reward/risk ratio is reasonable — preferably close to or even higher than the inverse of your odds.

However, merely adding a portion of the losing bets to the grand prize over time would incentivize later bettors (due to the higher prize) and disincentivize early ones (since it starts at “only” 10x). Thus, we introduced the Bonus Prize as an additional incentive for early bettors, creating a positive flywheel for each game round.

Reward Token :eyes:

We also incentivize players with $EYES :eyes: token for first-time wallet connections and for each dice roll based on the rolled numbers.

$EYES :eyes: has no supply cap, but its emission halves every 10 days. It currently has no utility, but if we gain more traction in the upcoming weeks, it could become a building block for a decentralized betting house where the profit are shared to token holders (no promises though!) :wink:

Check out the game → https://icdragon.xyz
Even if you don’t want to bet, you can connect your wallet and receive some free tokens. We use web3auth, so a new ICP wallet will be automatically generated in the background using your Google login.


This is awesome! Provably fair gambling is a perfect use case for blockchain technology.

1 Like

Hi! I don’t know if you can help me, I tried to send 0.5 ICP to test and buy 1 ticket, but never arrived - this is the transaction - transaction/55783b782a533d7ef2ed245b8eba69dfbde4f6c378c00f9520b211969cbe9527

1 Like

checking on it
you can join our discord for faster response

Thank you a lot! And sorry, I didn’t know you have a Discord channel

no worries, sorry for the inconvenience
can you please find me in Discord Loka (im the admin), and share me your wallet principal address for me to check further?
*currently the front end only show the account identifier instead of principal

Thank you a lot for your help! Problem solved

1 Like

Are you using on-chain randomness for the dice rolling?


Code is open source

Great. Could you share the full repo? (And also update the repo listed on the ecosystem page).

we did that already Jenn, just today
it is merged now to the ecosystem

Can you please update the repo with the latest code: GitHub - lokaverse/icdragon: a dice roll game powered by ICP Randomizer

we user “master” branch before.
just now merged to “main”

1 Like

Thats debatable, gambling is never fair. For if it is fair, then it isn’t gambling. LOL

Cool products! Are you plan to monetize it?

Whitepaper was published today, please check https://docs.icdragon.xyz/