OP,
What do you say on that?
There is some more projects that are using registering / registering on blockchain systems to garanty the non compromision ..
Thanks for bringing this up Danydee. I have checked the Fairness script for Hi-Lo game and it is perfectly fine. I will now explain how the provably script on Tower Bet works for Hi-Lo:
Step 1: Generating Server Seeds
First of all, they had generated a bunch of server seeds. To do so, they started with an initial 32-bytes number and produces SHA-256 hash of the same successively many times. Let me give an example along with the explanation so things become more clear. Suppose initial 32-bytes number they chose is:
d8534cceef185bfa3b6dbc65e851417ab9d46212b4e8b15bedf3f4e2d5254214 (i)
Now we will generate sha256 hash of the above number, which will be:
0b2dbe3d322cff35b6645f9af323acae8526aaacbbf235b17e789d0f527ce318 (ii)
Now generating sha256 hash of (ii) will be:
e1966dcd64ea1f76edaeb07ebf217d9c8ec48d04c4a8af0d0e87d08d61cb1d21 (iii)
and so on...
Tower Bet did this process 100K times and the 100,000 hashes that were generated served as first 99,999 server seeds for Hi-Lo game. In our case, let say we generated 6 hashes then these five will serve as first five server seeds:
Fifth Server Seed: d8534cceef185bfa3b6dbc65e851417ab9d46212b4e8b15bedf3f4e2d5254214 - our chosen initial number
Fourth Server Seed: 0b2dbe3d322cff35b6645f9af323acae8526aaacbbf235b17e789d0f527ce318
Third Server Seed: e1966dcd64ea1f76edaeb07ebf217d9c8ec48d04c4a8af0d0e87d08d61cb1d21
Second Server Seed: 29224e31e42f72669d493d4081d4644e46ac2193292a8df7170187e62ba5affd
First Server Seed: 07fcd88c11bc970237e6e50d8c8259083dc94a3c2498596c6923b94a366ddb69
Hash that will serve as proof: e53cbb67f801cc4bc1a0f6c2674472f13fe04d6705ef56c450640a6cb0eec8d3
Now you may be thinking why we are not using 6th hash as a server seed? The reason being, sixth server seed will act as a proof that server seeds are not manipulated by house later on. Let me explain how. After generating 100K hashes, Tower Bet added the 100,000th hash in the Ethereum Blockchain as an input data in one of their transaction. This is the transaction in which hash is included:
https://etherscan.io/tx/0x1b5bf677610024e8f29cfec39400df2d55322f506da3128832247d535bba481f (t)
Go to the above link and view input data as 'UTF-8'.
In our case, we will put e53cbb67f801cc4bc1a0f6c2674472f13fe04d6705ef56c450640a6cb0eec8d3 as an input data in Ethereum blockchain by including this hash as input data in ETH transaction. This will make sure that it is the hash of first server seed i.e. 07fcd88c11bc970237e6e50d8c8259083dc94a3c2498596c6923b94a366ddb69 and house cannot change that later.
Step 2: Client Seed
In single player games like dice where player is individually playing against house, client seed is decided on the sole discretion of the player. He can change the client seed before placing the bet (which I have explained in detail in the opening post). But in social games, where more than one player is playing the same game, it is not viable for every player to choose his own client seed. As an easy way out, house chooses same client seed for all the players based on some future-event which isn't in control of house. In the case of Tower Bet's Hi-Lo game, the client seed is the hash of the block in which the above transaction (t) is recorded. Since block is not mined by Tower Bet, they have no control on what would be the hash of block which makes client seed fair for every player. The block in which the above transaction was recorded is:
https://etherscan.io/block/10057525The hash of this block is 0xbc81865617ce0e8aca17b09c8df81c549cc3d677f1da95ad6ae7622d1c2c357f and this is currently used by Tower Bet as client seed for every round of Hi-Lo game.
So this is flow which make sure results are not pre-decided:
Step 3: Result Generation
Result is generated very simply. First they combine server seed and client seed like this:
CombinedSeed = serverSeed + ClientSeed
Then they generate sha256 hash of the CombinedSeed. Then first four hexadecimal characters are taken to generate the result.
Here is the result of one of the round:
You can see that:
Client Seed or Salt = 0xb52b2c17b28c83c6e452c76b9650915e24f09091af9a1f643ee61fc6ee60ea5d (which is same as the hash of the block we saw in Step 2)
Server Seed = 26d42b14348ed56482511c5557c538766e7b97dc968e30a7cf9cd75cdd414c83
So CombinedSeed will be 26d42b14348ed56482511c5557c538766e7b97dc968e30a7cf9cd75cdd414c830xb52b2c17b28c8
3c6e452c76b9650915e24f09091af9a1f643ee61fc6ee60ea5d
The sha256 hash of CombinedSeed will be 3ebbde85c5231686eb8dfcd49d2df382ba22d99f042473db6aebf016f0e40ae0
The first four hexadecimal character will be 3ebb.
The decimal form of 3ebb is 16059 which when divided by 25 leaves 9 as the remainder. Since array starts with index 0, the result shall be 10th item in the array:
[Joker, 2 red, 2 black, 3 red, 3 black, 4 red, 4 black, 5 red, 5 black, 6 red, 6 black, 7 red, 7 black, 8 red, 8 black, 9 red, 9 black, J red, J black, Q red, Q black, K red, K black, A red, A black]
Since, 10th item is '6 red', the card shall be 6 of reds. In image, we can verify that the card is correct! Hence, Tower Bet is provably fair.
My Observation
Storing pre-calculated data on blockchain as server seed and choosing future data as client seed to determine result is an impressive way to maintain fairness of social game where more than one player play at the same time. I really liked the idea. However, player must make sure that such data is recorded on reputable blockchain (only Bitcoin and Ethereum blockchains). If the data is recorded on the blockchain of some small cap cryptocurrency, it is possible that house itself mined the block and in such condition block hash maybe generated as per the will of house. Note that, block hash is not random. It is the hash generated by combining the block details like transaction, timestamp, pervious block's hash, etc etc. So for small cap coin, it is possible for miner to mine block at specific time to generate block as per his own will. But for Bitcoin and Ethereum chain, we can assume that hash of block mined is fair.