ZKasino Documentation
WebsitedAppTwitterTelegram
  • Welcome
  • Tokenomics
  • ZKasino Bridge
  • ZKasino Chain Testnet
  • ZKasino
    • Roadmap and FAQ
    • Responsible Gaming
    • Live Support
    • IPFS hosting
    • Mainnet Guide
    • Official Links
  • Platform
    • Glossary
    • Betting
    • Chains and Bet tokens
    • Self Exclusion
  • Developer
    • Contract addresses
    • Audits
    • Infrastructure
    • VRF Oracle
    • Architecture
    • Metaplay
    • Probability, Odds and House Edge
      • Dice
      • Plinko
      • Video Poker
      • Slots
      • Mines
      • Rock Paper Scissors
      • Coin Flip
    • Kelly-based bankroll management
    • Changelog
      • Game contracts v2.1
      • Game contracts v2.0
      • Contracts v1.0
      • Integrated VRFs (old)
      • Testnet Guide (outdated)
    • Testing
      • BNB Chain private fee testing
      • v2.1 private testnet WIP
      • v2.0 public testnet
      • v2.0 private testnet
      • multi-chain private mainnet with VRF
      • v1.1 public testnet
      • multi-chain private testnet with VRF
      • v1.0 public testnet
      • wip v1.0 private testnet
      • v2.1 public testnet
Powered by GitBook
On this page
  • Probability
  • House Edge and Multiplier
  • Odds
  1. Developer
  2. Probability, Odds and House Edge

Coin Flip

Probability

Coin Flip uses the boolean isHeads to decide the outcome of a coin flip with true or false.

if (coinFlip[i] == 1 && game.isHeads == true) {

if (coinFlip[i] == 0 && game.isHeads == false) {
Player outcome
Probability

Heads

50%

Tails

50%

House Edge and Multiplier

A 2% fee is taken off the payout by multiplying with 1.98 when a player wins. No fee is taken on a loss. The 2% fee can be found in the Coin Flip contract:

payout += (game.wager * 19800) / 10000;
payouts[i] = (game.wager * 19800) / 10000;

This gives the following multiplier:

Player outcome
Fee
Multiplier

Win

2%

1.98x

Loss

0%

0x

With this information, the house edge for Coin Flip can be calculated at 1% ((2+0)/2).

Odds

With the above in mind the odds and house edge for Coin Flip are:

Odds
Outcome

Decimal odds

0.99

Return to Player

99%

Probability odds

49.5%

PreviousRock Paper ScissorsNextKelly-based bankroll management

Last updated 1 year ago