How Bets Work

Here's the anatomy of a bet on Zeebit:

  1. A player selects their bet inputs, sets their stake and hits the button.

  2. Within milliseconds, their bet hits a node on the Solana blockchain, which communicates this transaction for processing to all of the validators on the network.

  3. The game’s contract will interpret the request, perform validations and convert the bet into a ‘Game Instance’ (for example, schedule that the roulette wheel is to be spun).

  4. The player’s bets are each validated with respect to the rules of the game, and if everything's in order, the Game contract invokes a request to the ‘Cashier’ Contract.

  5. The Cashier contract performs some checks based on token balances available - checking minimums and maximums and ensuring both the player and the protocol have the necessary balances to honour their side of the bet, should the bet go in either direction.

  6. The Cashier determines the expected edge on the bet, and determines what revenue share needs to take place - between rakeback, bonus pools, referrers/affiliates, platform operators, liquidity providers and the protocol.

  7. A request is invoked from the game contract to the verifiable randomness program, which emits events to listening provider nodes. These nodes immediately pick up the transaction emit, take the inputs and produce verifiable randomness which is submitted back to the randomness program.

  8. The randomness program checks that everything is in order, and invokes a callback to the game program which uses the randomness to determine the result of the game, and subsequently assesses the result and payouts of the bets.

  9. The game contract invokes the Cashier contract, and tells it what funds should be released - either to the liquidity pool in the case of a loss, or paid out directly to the player’s wallet, in the case of a win.

  10. …and all of this happens across thousands of validators in just a few milliseconds.

Last updated