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
  • Chance and Multiplier
  • House Edge
  • Odds
  1. Developer
  2. Probability, Odds and House Edge

Dice

Chance and Multiplier

Dice is a game where you roll over (or equal to) or under (or equal to) a number to win. Chance is chosen by the player (0.01%-98%). The multiplier is set so the return is always 0.99 compared to the win chance. Through a simple formula (with Chance ranging from 0.1 to 95) the multiplier for every chance input from the player can be calculated.

Multiplier=0.99100Chance\text{Multiplier} = 0.99 \frac{100}{\text{Chance}}Multiplier=0.99Chance100​

The available multipliers can be found in the Dice contract where 10421 stands for the 1.0421x multiplier and 9900000 for the 990x multiplier:

if (!(multiplier >= 10421 && multiplier <= 9900000))

Here are some examples of specific outcomes:

Player outcome
Chance
Multiplier

Win

95% (highest)

1.0421x

Win

50%

1.98x

Win

49.5%

2x

Win

0.1% (lowest)

990x

Loss

0.1%-95%

0x

House Edge

The 1% house edge is taken when the win chance is being calculated, because 99000000000 is always being divided by the multiplier:

uint256 winChance = 99000000000 / game.multiplier;

When we take the 2x multiplier as an example, 99000000000/20000=4950000 leads to a 49.5% win chance. This is a 1% house edge (50.5-49.5). On a win or loss the average return is always 0.99.

Odds

The numbers above lead to the following odds for Dice:

Odds
Outcome

Decimal odds

0.99

Return to Player

99%

Probability odds

49.5%

PreviousProbability, Odds and House EdgeNextPlinko

Last updated 2 years ago