Anatomy of a Crypto Bet: What Actually Happens Step by Step
A concrete walkthrough of what physically happens from deposit to wager to payout — on both a custodial crypto casino and an on-chain smart-contract platform — so you know what you are actually doing.
“Crypto gambling” is a phrase that covers a wide range of technical realities. Most people who use a crypto casino do not know what is happening to their funds between the moment they deposit and the moment they withdraw — or whether the blockchain is actually involved in their bets at all.
This article walks through the complete lifecycle of a bet, step by step, for both the most common model (custodial, off-chain) and the alternative (non-custodial, on-chain smart contract). The difference between these two architectures is the most important thing to understand about any platform you might use.
Model 1: The Custodial Crypto Casino
This is how the majority of crypto casinos work, including most of the large and well-known platforms.
Step 1: Creating an Account
You register with an email address and password, or sometimes just connect a crypto wallet. Many platforms do not require identity verification (no KYC). Your account exists in the casino’s private database.
Step 2: Deposit
You generate a deposit address — a wallet controlled by the casino — and send cryptocurrency to it. The transaction is broadcast to the public blockchain. Once it reaches the required number of confirmations (typically 1–6 blocks depending on the network), the casino’s system detects the inbound transaction and credits your account balance in its internal database.
What happens on the blockchain: A transfer from your wallet to the casino’s wallet is recorded publicly.
What happens off-chain: Your internal account balance is updated. From here, nothing else about your play touches the blockchain until you withdraw.
Step 3: Placing a Bet
You click to place a bet — say, 0.001 ETH on a dice roll. This request goes from your browser to the casino’s servers. The server:
- Deducts 0.001 ETH from your internal balance.
- Runs a Random Number Generator (or, on a provably fair casino, uses the pre-committed server seed combined with your client seed and a nonce counter) to determine the outcome.
- Applies the game rules to calculate a win or loss.
- Updates your internal balance accordingly.
- Returns the result to your browser, typically in under a second.
No blockchain transaction occurs at this step. The bet, the randomness, and the payout are all processed on private servers. The blockchain played no role.
Step 4: Winning and Losing
If you win, the internal balance increases. If you lose, it decreases. Your balance is a number in the casino’s database. You are trusting the casino to honour that number when you request a withdrawal.
Step 5: Withdrawal
You request a withdrawal. The casino’s system:
- Checks that the withdrawal meets any minimum thresholds or wagering requirements.
- Deducts the amount from your internal balance.
- Initiates an outbound blockchain transaction from one of the casino’s wallets to your personal wallet address.
What happens on the blockchain: A transfer from the casino’s wallet to yours is recorded publicly.
You receive your funds in your personal wallet after the transaction confirms. Processing times vary from minutes to days depending on the platform.
Summary: Custodial Bet Lifecycle
Your Wallet → [Blockchain TX] → Casino Wallet
↓
Internal DB balance
↓
Off-chain game logic
↓
Internal DB balance
↓
Casino Wallet → [Blockchain TX] → Your Wallet
Model 2: Non-Custodial, On-Chain Smart Contract
This model is less common but represents the architecture implied by terms like “decentralised gambling” or “trustless betting.” See smart contracts in gambling for technical depth; here we focus on the user-facing flow.
Step 1: No Account Required
You connect your personal wallet (e.g., MetaMask) directly to the platform’s interface. No registration, no email, no internal account. Your wallet address is your identity.
Step 2: Approving the Contract (ERC-20 Tokens)
If you are betting with a token (e.g., USDC) rather than the native blockchain currency, you first send an “approval” transaction authorising the smart contract to move up to a specified amount of your tokens. This is a separate blockchain transaction with its own gas fee.
Step 3: Placing a Bet
You submit a bet transaction from your wallet to the smart contract address. This transaction includes:
- The bet amount (transferred directly from your wallet to the contract)
- The bet parameters (your chosen outcome, e.g., a number range in dice)
- Your signature, proving the transaction came from your wallet
The transaction is broadcast to the blockchain and enters the mempool (the queue of pending transactions). It is picked up by a validator, included in a block, and confirmed.
The entire bet is on-chain. Every parameter is recorded publicly and permanently.
Step 4: Outcome Determination
This is where the architecture varies most.
- VRF (Verifiable Random Function): The contract requests randomness from an on-chain randomness service (such as Chainlink VRF). The randomness provider generates a provably random number and submits it back to the contract in a second transaction. This takes additional time (seconds to minutes).
- Commit-reveal schemes: A simplified version of provably fair where the outcome is pre-committed by the contract and revealed after the bet is final.
- Oracle-fed outcomes: For sports bets or prediction markets, an oracle service submits the real-world result to the contract. Prediction markets covers this in detail.
Step 5: Automatic Payout
The smart contract executes its payment logic without human involvement. If you won, it sends the winnings directly to your wallet address. If you lost, the funds stay in the contract’s balance pool.
No withdrawal request is needed. Winnings arrive in your wallet as part of the same transaction sequence that resolved the bet, or in a follow-on transaction triggered automatically by the contract.
Summary: On-Chain Bet Lifecycle
Your Wallet → [Approve TX] → Smart Contract
Your Wallet → [Bet TX] → Smart Contract (funds locked in contract)
↓
Randomness / Oracle Input
↓
Contract executes game logic
↓
Smart Contract → [Payout TX] → Your Wallet (if won)
Key Differences at a Glance
| Stage | Custodial Casino | On-Chain Contract |
|---|---|---|
| Deposit | Blockchain TX to operator wallet | Blockchain TX to contract |
| Bet placement | Off-chain, milliseconds | On-chain, seconds to minutes |
| Randomness | Private RNG or provably fair seed | VRF, oracle, or commit-reveal |
| Payout | Manual withdrawal request | Automatic contract execution |
| Funds held by | Operator | Smart contract code |
| Gas fees | One per deposit, one per withdrawal | Multiple TXs per bet session |
| Auditability | Internal only (or provably fair seeds) | Fully public on-chain |
Understanding this lifecycle helps explain why provably fair systems solve the fairness problem but not the custody problem, and why on-chain gambling solves the custody problem but introduces smart contract risk. Neither is a complete solution; both involve different trust assumptions.
For more on those trust assumptions, read custodial vs non-custodial gambling. And before placing any bet, make sure the responsible gambling considerations apply to your situation.