Guide · On-chain play

Why smart contracts matter in gambling, and where they fall short

A smart contract can hold the bankroll, take your bet and pay out by rules anyone can read. That removes the need to trust a cashier. It adds code risk, and once a transaction runs it cannot be reversed.

18+ only How the technology works
Share
Table of Content 9
  1. Key points
  2. What it does
  3. Fairness models
  4. Randomness
  5. Risks
  6. Where you meet them
  7. Crypto casinos in our ranking
  8. Terms
  9. Smart contract FAQ

Key points

  1. Code

    A smart contract is a program at an address on a blockchain, with its own code and data.

  2. Final

    Interactions with a contract are irreversible, and contracts cannot be deleted by default.

  3. Approvals

    An unlimited token approval lets a contract move that token from your wallet later, until you revoke it.

  4. On-chain proof

    Chainlink VRF publishes a proof with each random number, verified on-chain before a game can use it.

What a smart contract does in a casino

A smart contract is a program that runs on a blockchain: code and data at a specific address. In gambling, a contract can hold the bankroll, accept a bet, ask for a random number, and pay the result to your wallet in the same flow. The rules are public, and the contract follows them the same way for every player.

Contracts cannot read the outside world on their own. Anything from off-chain, including a random number generated by a service, arrives through an oracle, which becomes one more part you rely on.

Three ways a crypto game can prove it is fair

ModelWho runs the gameWhat you can checkWhat you still trust
Certified RNG The casino or game studioA testing lab's certificateThe lab and the operator
Provably fair seeds The casino's serverEach result, from the server seed hash, your client seed and the nonceThat the casino pays out what the result says
Smart contract with verifiable randomness A contract on a blockchainThe contract code, the random proof and the payout transactionThe code, its auditors and the oracle

How each model works.

Provably fair is a middle ground used at crypto casinos: the casino commits to a hashed server seed before you bet, and you can recompute each result afterwards. Our provably fair crypto casinos page covers casinos that offer it, and crypto dice walks through a verification.

Random numbers on a public chain

Everything on a blockchain is public, so a contract cannot simply pick a secret random number. Services such as Chainlink VRF generate the number off-chain together with a cryptographic proof, and the proof is verified on-chain before the game can use the number. The proof lets anyone check that the number came from the stated process and was not swapped afterwards.

What can go wrong

  • Bugs. A flaw in a contract's code can let an attacker drain the funds it holds. Code that holds a bankroll is a target.
  • Upgradeable contracts. Some contracts can be changed through upgrade patterns. Then you trust whoever holds the upgrade keys.
  • Token approvals. To bet with a token you often approve the contract to spend it. An unlimited approval lets the contract move all of that token from your wallet, even later. Approve only what you need and revoke access you no longer use.
  • No chargeback. A transaction that runs is final. A mistake, a phishing site or a bad contract cannot be reversed.

Where smart contracts show up in crypto gambling

At a custodial crypto casino you deposit to an address the casino controls and play from a casino balance; if you send a token, its contract is the only one involved. You meet contracts directly when you connect a wallet to a dApp casino or sign in with MetaMask. For the pooled-bankroll model, see DeFi in crypto casinos; for keeping control of your coins, non-custodial casinos.

Where to play

Crypto casinos in our ranking

Offers as each casino states them. Check each review for the games and fairness checks the casino offers.

  1. BC.GAME review
    Bonus
    20,000 USD + 1 FS
    Wagering
    –
    You must wager
    –
    Expected value
    –
    18+ · T&Cs Apply · Play Responsibly
  2. Luckiest review
    Bonus
    2,000 USD + 100 FS
    Wagering
    –
    You must wager
    –
    Expected value
    –
    18+ · T&Cs Apply · Play Responsibly
  3. 7Bit Casino review
    Bonus
    5,400 USD + 250 FS
    Wagering
    –
    You must wager
    –
    Expected value
    –
    18+ · T&Cs Apply · Play Responsibly

Terms

Smart contract
A program stored at an address on a blockchain. So what: Its rules are public; its mistakes are permanent.
Oracle
A service that brings off-chain data, such as random numbers or prices, to a contract. So what: A game is only as fair as its oracle.
VRF
Verifiable random function: a random number with a proof anyone can check. So what: Lets you confirm the casino did not pick the result.
Token approval
Permission for a contract to spend a token from your wallet, up to a limit. So what: Revoke approvals you no longer need.

Smart contract FAQ

What is a smart contract in gambling?

A program on a blockchain that holds funds, takes bets and pays out by its code: code and data stored at a specific address.

Are smart contract casinos safe?

They remove the need to trust a cashier, but add code risk. A bug can be exploited to drain the funds a contract holds, and transactions cannot be reversed. Look for published, audited contracts and limit what you connect.

Do smart contracts make payouts instant?

A contract can pay in the same transaction as the bet, so the wait is the chain's block time. You still pay network fees for each bet you place on-chain.

How is randomness made fair on a blockchain?

Through a verifiable random function such as Chainlink VRF, which delivers a random value with a proof that is checked on-chain before the game uses it.

What is a token approval and why revoke it?

Permission for a contract to spend a token in your wallet. An unlimited approval lets it move that token later. Revoke approvals you no longer use with a revoke tool or a block explorer.