πŸ”Lottery Smart Contract

BALLGAME.COM’s Lottery smart contracts are independently audited by a trusted third-party security firm, providing players with an additional layer of trust and protection. These audits carefully review the code to ensure that the contracts are secure, transparent, and function exactly as intended.

Once deployed, the Lottery smart contract becomes immutable, meaning it cannot be altered or tampered with and operates autonomously, without human involvement. Its primary role is to interact directly with Chainlink’s Verifiable Random Function (VRF) to obtain a fair and verifiable random seed, and then to use that seed to generate the winning lottery numbers for each draw.

This process guarantees that every draw is conducted in a way that is both provably fair and fully independent of BALLGAME.COM’s control.

circle-check

Smart Contract Functionality

BALLGAME.COM's Lottery smart contract is responsible for four (4) key tasks. If you navigate directly to BALLGAME.COM's smart contractarrow-up-right, you will see four separate transactions for each draw.

These four (4) states represent the following functions:

1

First State

The first transaction represents calls the smart contract to begin creating the Lottery.

2

Second State

The second transaction changes the Lottery state from "opened" to "closed" so that no more entries can be accepted.

3

Third State

The third transaction then stores the CSV checksum (this is explained in the "Verifying the Lottery Tickets" section of this guide) directly to the smart contract which can be extracted by anyone.

4

Fourth State

The fourth transaction then initiates the winning numbers to be drawn. This is completed by the smart contract calling Chainlink's VRF which sends BALGAME.COM the seed, which is then decrypted using HMAC 256 SHA to select the winning numbers.

It is important to note that each state happens in sequential order and is timestamped on the public blockchain to ensure transparency.

Last updated