Table of Content 10
Key points
-
Code
A smart contract is a program at an address on a blockchain, with its own code and data.
-
Final
Interactions with a contract are irreversible, and contracts cannot be deleted by default.
-
Approvals
An unlimited token approval lets a contract move that token from your wallet later, until you revoke it.
-
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 iGaming, 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.
A gambling contract matters because the settlement rule becomes part of the executable system. A settlement rule describes when a recorded bet qualifies for payment. The payment still depends on the particular contract's implementation. Public code does not establish that the implementation matches the description on a website. Treat the description and the deployed programme as separate evidence.
Contract custody is different from wallet custody. A wallet can retain uncommitted tokens while a contract holds the stake already submitted. The distinction explains why non-custodial crypto casinos still need a custody assessment. Ask where the stake sits during an unresolved round. Do not interpret a wallet connection as proof that no third party can influence settlement.
Speed, openness and cost
Payouts can follow the bet within one transaction, so the long waits of manual processing disappear. Transactions and outcomes are recorded on a public ledger, which makes tampering visible. Automation also removes manual work for the operator, which can lower running costs.
Each bet still costs a network fee, which is paid in the chain's own coin. On a busy network that fee can outweigh a small stake.
Settlement speed depends on the steps a game requires. A transaction accepting a bet does not necessarily contain the final result. An oracle-based design can require a later response before payment becomes possible. The response introduces a separate dependency from the blockchain's transaction processing. An instant-payout description therefore needs a clear starting point. Distinguish bet submission from result availability when interpreting that description.
Network fees belong in a separate cost calculation from the stake. A failed contract interaction can still consume execution resources. Resource charges do not establish that a bet was accepted. Compare the transaction status with the game's recorded bet before interpreting a wallet deduction. Automation does not remove the need to understand which event each charge represents.
Three ways a crypto game can prove it is fair
| Model | Who runs the game | What you can check | What you still trust |
|---|---|---|---|
| Certified RNG | The casino or game studio | A testing lab's certificate | The lab and the operator |
| Provably fair seeds | The casino's server | Each result, from the server seed hash, your client seed and the nonce | That the casino pays out what the result says |
| Smart contract with verifiable randomness | A contract on a blockchain | The contract code, the random proof and the payout transaction | The 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.
A fairness proof answers a narrower question than whether gambling is safe. A seed-based proof concerns the relationship between committed inputs and a displayed result. A payout record concerns the movement of funds after settlement. These records do not answer the same question. Read the distinction alongside provably fair crypto casinos when comparing verification models.
A reproducible result can still follow a game with a house advantage. Reproduction shows that the stated calculation produces the stated output. Reproduction does not make the underlying payout schedule favourable. Assess the payout schedule separately from the verification method. Avoid treating the word fair as a promise of profit. No verification model removes the possibility of losing the stake.
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.
A randomness proof needs a connection to the particular bet being settled. A valid random value alone does not explain which round receives that value. The assignment rule belongs in the game's logic. Ask how a request is associated with its bet record. Ask what happens while the request remains unanswered. Do not assume that a published proof describes the complete settlement process.
An oracle dependency remains relevant even when the supplied value has a verifiable proof. Proof verification concerns the value's authenticity under the stated method. Service availability concerns whether the value arrives at all. These are different properties of the system. A delayed response can leave a round waiting for its next step. A contract description needs to explain that waiting state without promising an automatic refund.
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.
- Slow adoption. Regulatory uncertainty and technical complexity hold many operators back, which is why fully on-chain casinos remain rare.
A token approval authorises a spender address rather than a website's appearance. A familiar logo does not identify the address receiving permission. The wallet's request deserves attention independently of the page that opened it. The connection context is explored in MetaMask crypto casinos. Reject a request whose purpose you cannot explain.
An audit report describes a review of a particular code version. A report's existence does not establish that the deployed contract uses that version. Match the reviewed scope to the deployment before treating the report as relevant. An upgrade can change the implementation associated with a contract interface. Administrative permissions therefore matter alongside the original code. No audit label establishes that a contract is free from defects.
Smart contracts and South African law
Online casino play is prohibited under the National Gambling Act, 2004, and that applies whether a casino runs on a server or on a smart contract. Fines under the Act reach R10 million and apply to players as well as operators.
Winnings from an on-chain game arrive as crypto. Converting them to rand is a separate step with an exchange, with its own fees, rate and verification.
South Africa's governing gambling law is National Gambling Act, 2004. The recorded minimum age is 18. An age threshold does not establish permission to use an online casino. Treat technical explanations as descriptions of mechanisms rather than permission to participate.
Rand conversion requires its own assessment apart from contract settlement. A token amount does not state the rand proceeds available after conversion. The exchange quote determines the conversion value offered at that moment. Keep the token denomination explicit when reading a payout example. Do not interpret an on-chain transfer as a completed bank withdrawal. Retain the transaction reference when comparing a blockchain record with a separate conversion record.
Where you meet contracts in crypto iGaming
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.
A pooled bankroll introduces a different exposure from placing an individual bet. A bankroll contribution can be committed to covering other players' winning results. The contribution's withdrawal conditions deserve their own explanation. That distinction gives context to DeFi in crypto casinos. Do not confuse providing liquidity with keeping an idle wallet balance.
A contract address is useful evidence only within the correct network context. Identical-looking interfaces can refer to different deployments. Record the network together with the address when assessing a technical description. A blockchain explorer record helps identify the transaction being discussed. The record does not establish the operator's identity by itself. Separate deployment evidence from brand claims when deciding what the available documentation actually supports.
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 online gambling?
A program on a blockchain that holds funds, takes bets and pays out by its code. The code and data sit at a specific address that anyone can inspect.
Are smart contract casinos safe for South African players?
They remove the need to trust a cashier and 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.
Are my winnings paid in rand?
A contract pays in the token you bet with, so winnings arrive as crypto. Turning them into rand is a separate step through an exchange, with its own fees and rate.
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.
Do smart contracts change the law for South African players?
Online casino play is prohibited under the National Gambling Act, 2004, and that applies whether a casino runs on a server or on a smart contract.