badge-checkVerifying the Lottery Tickets

Each BALLGAME.COM Lottery runs for exactly 7 days. When the countdown ends, no more tickets can be entered and the Lottery moves into a Pending State.

At this point, all Lottery tickets are saved into a single .CSV file (i.e. a spreadsheet) before the numbers are drawn. To prove this file cannot be altered, we create a unique digital fingerprint of the file using a one-way formula called the SHA-256 hashing algorithm. This fingerprint is known as the CSV Hash. The CSV hash in stored in a transaction on the smart contract before the winning numbers are drawn which is timestamped on the blockchain (see Lottery Smart Contracts).

The CSV Hash is a long, unique code that is published publicly just before every draw is ran. After the the draw is conducted and the winning numbers are published, we make available the CSV file to download.

If anyone later downloads the .CSV file and runs the same SHA-256 checksum, their result must match the published CSV Hash exactly. Even the smallest change such as an extra space or a single character difference would produce a completely different hash, immediately showing that the file was tampered with. This process guarantees that once ticket entries are locked, they cannot be changed in secret, and players can independently verify this for themselves. In addition, as an added layer of transparency, this CSV Hash is also stored in the smart contract.

The importance of verifying that the Lottery tickets were not tampered with is that it shows no additional tickets were added after the winning numbers are drawn, keeping it fair and trustworthy for all users.

How to Verify

There are two (2) ways to verify that the Lottery tickets were not tampered with:

  • Method 1: Comparing the CSV hash before the winning numbers are drawn to the CSV file; or

  • Method 2: Using the blockchain and comparing the CSV hash provided, to the hash stored in the smart contract for any given draw. This method involves downloading a .html file put together by BALLGAME.COM.

We have provided step by step instructions for both methods so can you verify the winning numbers for yourself.

Method 1

1

Right before the winning numbers are drawn, the CSV hash will be revealed by pressing on the Provably Fair link as shown below.

2

Once you press on the Provably Fair link it will display addition details. Copy the CSV hash and wait for the winning numbers to be drawn. Please note the CSV hash will appear before any other values, after entries close and before the winning numbers are drawn.

3

Once the winning numbers are drawn, you will then be able to download the CSV file. Remember, this file contains all Lottery ticket entries.

4

Visit an independant third party site such as Toolsleyarrow-up-right, or any other website, and upload the downloaded CSV file.

5

Compare the outputted SHA-256 hash to the CSV hash provided by BALLGAME.COM.

6

Both hashes should be identical.

Method 2

1

Download the following .html file and open it in your browser (Chrome, Safari or Firefox).

When the file is loaded in your browser, you will see the following screen:

2

Once open, you will need to input the Lottery Draw number (i.e. the Lottery ID as shown below) as well as the downloadable CSV that appears on the Lottery results page on BALLGAME.COM.

3

After inputting all the required details, press Verify Checksum which will call the smart contract and extract the CSV hash and compare it to the provided CSV file that you uploaded.

4

You should now see the following output showing that the CSV hash provided by BALLGAME.COM before the winning numbers are drawn matches the same hash stored on the smart contract.

Furthermore, if you wish to run this yourself, you can use the following Node example to do so. To match our on-chain hash, use the same file, encoding (UTF-8), line endings, and row ordering.

Last updated