How Bets Work
Last updated
Last updated
Here's the anatomy of a bet on Zeebit:
A player selects their bet inputs, sets their stake and hits the button.
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.
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).
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.
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.
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.
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.
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.
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.
…and all of this happens across thousands of validators in just a few milliseconds.