How to verify a bet on BlockStamp Games

BlockStamp
BlockStamp
Published in
5 min readOct 19, 2018

While other online casinos mostly just claim they are provably fair, we can show you a way to verify all your bets. And this post is a short instruction on how to calculate the result yourself. Before doing a calculation, all you need to know is which block hash contained your transaction. This block hash is the source of the random number we used for the draw or roulette spin. To see how we ensure that there is no way anyone can predict this random number before making a bet, see the full details on our GitHub wiki. Just go there and check how we ensure that there is no way anyone can predict the random numbers before making a bet.

The procedure is pretty simple as all the necessary details can be found via BST explorer. Just check how easy it is. You can use these few steps to verify your own transactions while reading this instruction.

What you need is either of the following:

  1. Block hash/height
  2. Transaction hash (your bet)
  3. Wallet address

So let’s start checking!

Block hash/number

When you have a block hash or block height, you can just put either of them into the explorer search which you can find on the top left corner and you will be presented with a block, like this one which we will use as an example:

https://explorer.blockstamp.info/block/8000000000023e663e322af14e8febecfa5047bf28158ac3a13e4a06db69b212

What you see in there are all block details, like block size and time, fees, amount transacted. You can also see the list of all transactions that were part of that block. So your bet transaction should be there too. It will contain all the details like wallet address, type of game (roulette, lottery), the bet details like bet type for roulette (e.g. a single number, corner, line) and a number plus pool/modulo for lottery. Pool/modulo is the number of options you use to draw from, e.g. when you want to draw 1 out of 6–6 will be your modulo.

The transaction will also instantly show you if it was a win or a loss

What you need to do your own calculations is as follows:

  • Grab the last 8 characters of the block hash (which is our example is db69b212)
  • Use an online tool to decimalise the numbers. We use https://www.rapidtables.com/convert/number/hex-to-decimal.html and it gives us 3681137170.
  • The decimalised value needs to be divided by the modulo, which for roulette is always 36 but for lottery (and this is our case) it is the defined pool of numbers. In our example, it is 1374
  • For modulo operation, we recommend this calculator: https://www.miniwebtool.com/modulo-calculator The result of the operation is 184.
  • All results are increased by one in order to avoid zeros. So the actual result of the lottery game is 185.
  • Now you need to compare it with the number you betted on. In our example, they are equal.

A roulette example would only differ at the point where the modulo operation comes in. So let’s use this winning transaction and the block containing it:

https://explorer.blockstamp.info/block/80000000000effc8960ec3254ed66668a9a193c3b7d2ee859538bfc311d73245

https://explorer.blockstamp.info/tx/5080f81f77a8bf01834696de71a8d05f46856c6db48b324a6b7dce89e4bbd043

The calculations would go like this:

  • The last 8 characters (11d73245)

decimalised would be 299315781

  • 299315781 modulo 36 (the default roulette modulo) is 9
  • 9 plus 1 is 10 so the actual result of the roulette round is 10.
  • Now, comparing it with the bet which was CORNER (7, 8, 10, 11) we can see that 10 is one of the betted numbers. Hence, the transaction is a win.

Transaction hash

What if you have a transaction hash, but don’t know which block it was put into? It’s almost as simple as the above example.

So go to the explorer and search for the transaction hash. You will be shown the transaction details. All you need to do to find the block details is to click on the advanced properties of a transaction and check which block was it part of. The link there will open the block details for you.

Having the block’s hash, you can start the calculations. Just follow the above instruction and you will verify your bet.

Wallet address

And if you only have your wallet’s address — what then? You can check all the transactions that originated from it very easily. Let’s go back to our lottery winning transaction. The wallet involved in the bet was https://explorer.blockstamp.info/address/37qqxd5e5gXdDVv47t3JDyjteB7PL8H9Q4

The link will show you all transactions that went to and from your wallet.

All you have to do is to open the bet transaction by following the link under the winning transaction or by clicking on the link below TXID:

Then, it’s easy. Just go to the advanced properties of the transaction and click on the block link. Having the hash and your bet details, just follow the calculations instruction and you will get the result.

Similarly, when you have a lost bet, like the first transaction here: https://explorer.blockstamp.info/address/37tePnymtSM33egBCpveSqcAsNXJGPydRe which you would like to double check, follow the TXID link to go to the transaction and then click on the block height to get the block’s hash

You will then have everything you need to do the calculations.

Just remember that when looking on a transaction, the wallet that a bet comes from is always on the left side.

When using BlockStamp games, there is no need for blind trust — feel free to check all transactions to and fro on your own. We actually encourage you to do that! So just take a few minutes, go to the explorer and check any transaction you like!

--

--