Confidential liar’s dice · Inco Lightning
The bluff is real.
The roll is secret.
Your dice are sealed on chain, not hidden by the interface. The contract can count them without reading them, so a challenge settles on state neither player could have looked up.
No wallet, no transaction, no signup to play the robot. A match takes about two minutes.
Settled
Four 5s across both hands. The claim was three, so the bid holds and the challenge loses.
The problem
Online liar’s dice has always been a trust exercise pretending to be a game.
The host can see
Every browser dice game asks you to believe an operator you cannot audit. The dice are a number on their server. Nothing stops them being read, and nothing proves they were not.
Server, in the clear
room_41 · seat_0 · dice=[5,2,5,1]
room_41 · seat_1 · dice=[5,6,3,5]On chain, everyone can see
Moving the game on chain makes it worse before it makes it better. Public state is readable by anyone with an RPC endpoint, so hiding a die in the interface hides it from precisely nobody.
eth_getStorageAt · anyone
slot 0x03 → 0x0502050100000000
slot 0x04 → 0x0506030500000000So nothing is at stake
A bluff only means something if the other side genuinely cannot know. Once hidden information is not really hidden, the raise is theatre and the challenge is a formality. That is not a hard game. It is not a game.
What is left
A dice game where nobody is bluffing.
The contract holds the secret.
It cannot read it either.
A round, end to end
Four moves, and one of them ends it.
The roll nobody can read
Four dice per side, sealed at the moment they are rolled. You see your own as values. Everything the chain holds about them is a handle.
Ciphertext handle0x8f3a…1c21Your hand
The same hand, on chain
The raise that has to mean something
A raise goes up on quantity, or holds quantity and goes up on face. The table offers the next legal raises so the arithmetic never gets in the way of the decision.
Standing bid
Next legal raise
The challenge, counted over sealed dice
Settlement counts matching faces across both hands without either hand being read, then reveals the result. The arithmetic is itemised because the point is that you can check it.
Settled on chain
Challenge settlement
- Dice showing 5
- 4
- echo (yours)
- +1
- Counted against a bid of 3
- 5
5 is enough. The bidder takes the round.
One gadget, and they never learn which
Each side draws one per round. Echo counts a die twice, Jammer ignores one of theirs, Scanner tells you whether the standing bid is true. The kind stays sealed even after it has changed the count.
Their gadget this round
One of these is in play. Nothing on chain says which.
Why the claim survives inspection
Four mechanisms, not four adjectives.
Dice are sealed before they exist to anyone
Each roll is written as an Inco Lightning ciphertext handle. The contract holds the handle and can compute on it. It cannot read the value, and neither can the opponent, the operator, or an indexer.
Only the owner is granted the plaintext
Access is granted per address at the moment of the roll. Your client decrypts your own dice. There is no branch of the code where the other seat is given the same grant.
A challenge is counted, not trusted
Settlement counts matching faces across both sealed hands and compares the total to the claimed quantity. The count runs over the ciphertext; the result is what gets revealed.
The gadget stays secret even after it fires
Each side draws one gadget per round. Its effect lands in the settlement arithmetic without the kind being published, so a used Jammer looks the same on chain as a used Echo.
The alternatives
What you are actually choosing between.
| Browser dice game | Naive on-chain game | Hecliar | |
|---|---|---|---|
| Who can read your dice | The operator, always | Anyone with an RPC endpoint | Only you |
| What settles a challenge | The operator's word | Public state anyone already read | A count over sealed dice |
| What a bluff is worth | Whatever you trust it to be | Nothing — the hand is visible | The thing the game is made of |
| To start playing | An account | A wallet and gas | Nothing, against the robot |
Before you start
What it actually costs you.
Against the robot
Free
No wallet, no transaction, no account. The match runs locally against a rule-based opponent — fixed rules and probability, no model and no API.
Play the robotAgainst a friend
Testnet gas
A wallet and Base Sepolia. One player creates a private room and shares the code; there is no lobby and no matchmaking.
Create a roomPrivacy
Not a tier
Confidential dice are not a setting you enable or a plan you upgrade to. They are the rule the game is built on. There is no mode that turns them off.
Two 4s and a hunch.
That is the whole game, and it only works if the other side truly cannot know. Now they cannot.
Play the robotNothing to install. Nothing to sign. About two minutes.