Gambling on the Blockchain: How To Charge A House Edge

Colin McCrae
edgefund
Published in
6 min readAug 2, 2017

We have established that any smart contract offering fixed odds bets on the blockchain, must charge an edge. The edge charged can be very small, but it is not possible to sustain zero edge in the long term. If zero edge bets are offered, there will either be a risk of ruin for the bankroll, or tokens of an infinite supply are required. Since the source code for smart contracts is publicly available and can be easily copied and modified, there will be a race to offer the lowest possible house edge.

This is a race that EdgeFund plans to win.

The method described here will be used by EdgeFund to create a smart contract offering fixed odds at the lowest mathematically possible house edge. But how will EdgeFund charge this edge to the game operators? And how will the game operators ensure they can earn their own edge? These are the questions that are answered in this post.

By Colin McCrae

How to Charge A House Edge

A fair bet would be one where the payout odds exactly reflect the probability of winning. For example, a payout of evens for a 50% probability event like a coin flip. The house edge in this case would be zero. In order to price in a house edge, the bet must deviate from the fair bet. There are two primary ways that a smart contract incorporate a house edge:

  1. Have a lower than fair payout.
  2. Have a lower then fair probability of winning.

Assume a game operator wants to place a $1,000 bet at evens (decimal odds of 2, traditional odds of 1/1), and the smart contract calculates it needs to charge an edge of 0.1% due to its current bankroll of $1,000,000 and K Value of 1. A zero-edge payout would be $1,000 with a probability of 50%.

The two main ways for the smart contract to price in a 0.1% edge in this example are:

1. Reduce the payout on a winning bet to below the requested payout odds (pay out winnings of $998 with a probability of 50%).

2. Reduce the probability of winning to below the fair odds probability (pay out winnings of $1,000 with a probability of 49.95%)

Paying winning bets at less than the quoted odds as per (1) is unorthodox. Almost all fixed odds bets in casinos are paid out in full, and the edge is incorporated into the difference between the probabilities implied by the ‘win’ odds and the ‘payout’ odds. In this example, the ‘win’ odds would imply a probability of 50%, and the ‘payout’ odds 49.95%.

For example, in European roulette, a straight bet on an individual number is paid out at 35/1 (decimal odds of 36). The actual odds of hitting one number are 1 in 37 which has a fair odds payout of 36/1 (decimal odds of 37). Therefore, the house edge is incorporated into the difference between the ‘win’ odds and the ‘payout’ odds, and can be calculated to be 0.0270 (2.70%). It is much more common (and desirable) for bets to be paid out at certain agreed quoted payout odds, with the actual outcome occurring slightly less frequently than it would do under fair odds.

Users of almost any fixed odds game are familiar with bets being paid out as a multiple (or fractional multiple) of the original bet and accept that the house edge is built into the fact that the bets win less often than the fair odds probability would dictate. The methodology EdgeFund will use is as per (2): incorporate its edge into reducing the win probability from the fair odds probability. The alternative would be to charge game operators a ‘fee’, which reduces the bet payout.

We know now how EdgeFund can incorporate its required edge into the bet. But what about the edge that the game operators want to charge. How do they incorporate their edge into the bet?

What About The Game Operators Edge?

The simplest way for the game operator to incorporate their own edge into each bet, would be for them to simply keep a percentage of their user’s bet (equal to their desired edge), and only send EdgeFund the remaining bet. If the game operator were to do this, they would need to adjust the requested payout odds upwards to ensure the user can still expect a chance to win the full payout. In this way, EdgeFund would still pay the full winnings, just with a lower probability (because of the game operators edge).

However, EdgeFund dynamically prices in its own edge based on the exact bankroll at the time the bet is placed (which the game operator cannot know for certain in advance). Therefore, the total edge on the bet that the casino operator’s users will pay can only be estimated before the bet is placed. This is an undesirable outcome: most fixed odds based games must have a fixed overall edge. It is generally not acceptable to only tell the user what the game operator’s edge is, and not the total edge.

Having eliminated this simple but undesirable method of passing through an edge, there remain two primary ways that a game operator can pass on the information that EdgeFund needs to be able to exactly price in the game operator’s edge.

  1. The game operator can tell EdgeFund their desired edge.
  2. The game operator can tell EdgeFund the desired ‘win’ odds.

An example is helpful here to describe what we mean by this.

Assume a user of a game operator wants to place a $100 bet on a European roulette game ‘straight up’ on a number. The decimal payout odds of this bet are 36 (traditional odds of 35/1), and the decimal ‘win’ odds of this bet are 37 (traditional odds of 36/1). Therefore, the casino wants to charge an overall total edge of ~2.70%. The smart contract has a current bankroll of $1,000,000 and K Value of 1, but the exact bankroll changes as other unrelated bets are made. The game operator knows the smart contract’s edge will be approximately 0.35% (see here for the formula used to find this), but does not know the exact number before placing the bet.

The two main ways that the game operator can pass on the information required for the smart contract to price in both the operators edge, and its own edge are:

1. Send EdgeFund a bet of $100, with requested payout odds of 36, and requested ‘win’ odds of 37.

2. Send EdgeFund a bet of $100, with requested payout odds of 36, and a requested edge of 2.70%

Both scenarios cause the same result for the same bankroll and same K value, and are realistic use cases for game operators. In the case of games such as roulette where the edge is completely defined by the difference between payout odds and ‘win’ odds, the game operator must use option (1). In games such as slot machines where the edge is a fixed number, the game operator must use option (2).

Note that the bets and payouts will be priced in EdgeFund’s native token, and would need to be exchanged for a fiat currency if desired.

Summary

We now have a way to price in both the edge that EdgeFund requires to protect its bankroll from risk of ruin, and two methods to ensure that the game operator can keep the remaining house edge. These methods will be used in the EdgeFund smart contract, and game operators can build games which interface with them.

If you found this article interesting, please hold down the clap button below. Follow me on Medium to see more content like this.

I am currently working on EdgeFund, an open-source platform which offers a decentralized shared bankroll on the Blockchain. To learn more about EdgeFund, please visit our website. Join our Telegram group to chat to the team and follow us on Twitter!

--

--

Colin McCrae
edgefund

Blockchain Analyst, Ethereum Developer, Process Engineer and Co-Founder of EdgeFund.net