🪨Immutable Outcomes
How Dumont's immutable outcome mechanism works.
Last updated
How Dumont's immutable outcome mechanism works.
Last updated
One of the primary differences between Dumont and conventional gambling platforms is that Dumont ensures game outcomes are cryptographically and, thus, provably immutable.
This critical feature prevents operators from manipulating outcomes, fostering a fair environment where gamblers can reliably test their luck.
To achieve this, we have designed a simple yet powerful commit-reveal mechanism that leverages blockchain immutability and the uniqueness of hashing algorithm outputs.
Step 1- Encryption and operator commitment
When you create a round, you essentially create a dataset consisting of 52 hashes corresponding to a random arrangement of the 52 cards in a standard deck that will be stored in the blockchain.
The hashes are generated by encrypting the card face along with a salt, which is a string of characters the operator uses in encrypting the card face. These hashes will be used to verify the operator’s commitment to data integrity.
For the calculation purposes by the smart contract, we've assigned numbers to the card faces:
Ace of Hearts
0
Ace of Diamonds
26
Two of Hearts
1
Two of Diamonds
27
Three of Hearts
2
Three of Diamonds
28
Four of Hearts
3
Four of Diamonds
29
Five of Hearts
4
Five of Diamonds
30
Six of Hearts
5
Six of Diamonds
31
Seven of Hearts
6
Seven of Diamonds
32
Eight of Hearts
7
Eight of Diamonds
33
Nine of Hearts
8
Nine of Diamonds
34
Ten of Hearts
9
Ten of Diamonds
35
Jack of Hearts
10
Jack of Diamonds
36
Queen of Hearts
11
Queen of Diamonds
37
King of Hearts
12
King of Diamonds
38
Ace of Spades
13
Ace of Clubs
39
Two of Spades
14
Two of Clubs
40
Three of Spades
15
Three of Clubs
41
Four of Spades
16
Four of Clubs
42
Five of Spades
17
Five of Clubs
43
Six of Spades
18
Six of Clubs
44
Seven of Spades
19
Seven of Clubs
45
Eight of Spades
20
Eight of Clubs
46
Nine of Spades
21
Nine of Clubs
47
Ten of Spades
22
Ten of Clubs
48
Jack of Spades
23
Jack of Clubs
49
Queen of Spades
24
Queen of Clubs
50
King of Spades
25
King of Clubs
51
When you create a round, the operator uses a cryptographic algorithm to hash the round’s arrangement of card number and store them in the blockchain:
For example, here is the data for card 1 on the table (only the operator has this information, which will be shown later).
Card number: 50
Salt: 0x29b2846437e56f8131b88e54985cdc9d0b70a743441bce290ebb0d26b969bd17
So its hash will be
0xee55120428f63b8d756ebb48c112e5b32ee3763dcf1f37061fc0d361ea29d214
This hashing task happened for each card; for example, here's a sample data set for a deck of cards in a round.
Card 1: 0xee55120428f63b8d756ebb48c112e5b32ee3763dcf1f37061fc0d361ea29d214 Card 2: 0x6f3597dfd6cf142f4866b1fb423304ce0c73148a2d96d0c875dd8fee48519e01 Card 3: 0x45c3c5e9b021b42da951d4e6611e3d449aab4fd974cfec82e4788c2165642437 . . Card 52: 0x734536389ac51af499942b4d03ec873fbc2b0e91879eaaf58bca5b266d393963
Step 2 - Verification and operator integrity
When a player guesses the value of a card and submits their choice to the blockchain, the operator should send that game's card number and salt to the smart contract.
Then, the smart contract verifies the authenticity of the salt and card number the operator sends to the contract by matching their hash with the stored card hash in the blockchain.
Now, three possible scenarios would follow that guarantee no wrong-doing by the operator:
The operator sends the correct salt and card number. If everything is in place, the system determines the winner based on the player's choice values and the card's actual face value.
The operator sends incorrect salt or card number: If the operator sends the wrong salt or card number for whatever reason, the smart contract declares the player as the bet winner so that they can claim their win.
The operator fails to send salt and card number: Technically, the operator has 6 hours to submit the card’s salt and card number to the blockchain. If, for whatever reason, the operator fails to do so, the smart contract declares the player as the bet winner so that they can claim their win.
As you can see, the player bears no risks of getting manipulated, and all the responsibility for security and integrity falls on the shoulders of the operator.
Let’s consider an example game: Imagine a player guesses Card 3's value on the table is 5 and sends this guess to the blockchain. Now, the operator sends the corresponding card number and salt to the contract.
Suppose the card’s data are as follows:
Salt: 0x39f3a5662ea8d8e313deebc73cba8578c275c7a267bd95af31ed428f543aef33
Card number: 24 (Queen of Spades)
The resulting hash calculated by the contract is:
0x45c3c5e9b021b42da951d4e6611e3d449aab4fd974cfec82e4788c2165642437
If this hash matches the one stored for that card in the blockchain during round creation, the smart contract will verify the operator's data integrity.
In this example, the hash matches, so the operator performed their work correctly.
Step 3 - Result determination and payout
After the operator’s integrity is established, the game's outcome is determined based on the user's choices. If the user correctly guesses the card, the smart contract automatically sends the winning amount to the player's address.
In the above example, the player chose 5 as the card value, but the actual card value was queen, so they lost.
Trust the code, not the human: All the rules and processes mentioned above are encoded in a non-upgradable smart contract, and no one can prevent its execution.