Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

As Designed Bug or Glitch?

Not open for further replies.

anthony parsons

I just settled the latest NFL game, I had bet $50k and won. It paid me back my $50k + the total combined odds winning of $86k ($50k bet + $36.5k win), totalling $136k, all from a 1.73 ratio.

Is this a bug or a glitch due to something clashing with maybe the latest stock trader, as that is the only thing upgraded on my site recently?
Its not a glitch, it is a very simply process...

$amount_won = (($wagers[$i]['wager_amount_placed']*$wagers[$i]['wager_odds_against'])/$wagers[$i]['wager_odds_for']);
$amount_to_pay = $amount_won + $wagers[$i]['wager_amount_placed'];
$this->getModelFromCache('NFLJ_Sportsbook_Model_Cash')->AddToCash($amount_to_pay, $wagers[$i]['user_id']);

That is it. There is not a complex algorithm. Its simple math driven off the values you enter into the Current Odds fields (first field is the odds against value, 2nd field is the odds for value).

Winnings are determined by multiplying the wager amount that you placed by the odds against value, then that value is divided by the odds for value. That result is what is displayed throughout sportsbook as "winnings". The payout (which is not displayed) is winnings, plus your stake returned.

If you placed a 50k wager, your WINNINGS would be at least 50K, plus your get your stake back on any WIN. on a 1 to 1 bet for 50k... you'd WIN 50k, plus get your 50K stake back for a total payout of 100K. So ya, it looks to me like that is correct.... at 1.73 your winnings would be over 80k, plus your stake (50k) back for 130k total between stake return and winnings.

Trust me, if this BASIC thing was broke, it would be broke for everyone. I'd know as this is my BABY and this is the most vital process of the addon. Its not something that "breaks" and its not anything that can be effected by another addon unless that addon specifically extends the outcome module for Sportsbook and manipulates the settleWagers method.
Ok, thanks Bob. Technically then, that is wrong based on betting though, in that when you bet $50 at $1.50, you get back $75. You don't get back your initial investment of $50 + $75 = $125, which is what you outlined above. A bookie will give you $1.50 for every $1 you invested... and not on top of what you invested with them.

Betting doesn't work that way, which is why it had confused me for the payout figures + returning your initial investment.
To give you some of my real life background, I've spent the better part of the last decade on the Montana State Board of Horse Racing which governs Sports Betting in the State of Montana. Montana is one of only a few states in the US that Sports betting is legal. I am one of the lead programmers on the States Sports Betting software which has to comply with the Nevada Sports gaming commission (which overseas the largest sportsbooks on the planet). So when I respond to this subject, I am responding with real world first hand experience. There is a global standard for Sports betting. Its not something that I decided on my own to make up for this addon.

Sportsbook uses the Fractional Odds System (which is a UK system) .. ie 2 to 1, 5 to 2, 100 to 120 etc. The Decimals that are displayed in brackets are a decimal representation of the fractional odds. It is NOT a Decimal Odds system, nor is it an American Odds (money line) system. It is the UK standard fractional odds system and payouts are based on that (which is explained below).

The decimals. There is a setting to format the decimals for US vs European. Basically the European formatting adds 1 to the decimal display to properly simulate the payout odds that users using decimal based systems are used to seeing. I added this option in based on feedback by users that are used to decimal based systems (Foxy I believe is the one that worked with me on it).

Fractional odd are very simple. If you place a $100 stake on a 2 to 1 bet and WIN, you get back your stake of $100 (because stakes are returned on winning bets), plus you get the winnings. The winnings are determined by multiplying (100*2)/1 which is $200. That formula is a global standard for fractional odds which is what Sportbook is based on. (Multiple the 1st odds number, then divide with the 2nd (if not a 1 as that is just a waste of time lol).

Here is an article that explains it in detail and I used a British one so you can clearly see that this is a UK thing and not a US thing.


Odds against (e.g 2/1, 7/1, 15/2, 50/1 etc)
If your horse's perceived chance of winning the race is less than 50/50 it is described as odds against. In this case if your horse wins you will receive your stake back plus your stake multiplied by the odds against it.

For example: Your horse wins at 2/1 (pronounced two-to-one).
If your stake was £10 you will receive:
your £10 back
plus your stake multiplied by the odds of 2/1 = (£10 x 2) = £20
that makes £30 in total

Sometimes the numbers may appear more complicated e.g. 15/2 or 9/4. This is simply because odds are normally expressed as fractions so can't include half numbers. So,for ease of working out how much your bet would return, think of '15/2' as being the same as '7.5/1' etc.

Even money (or Evens)
If your horse's perceived chance of winning the race is 50/50 it is described as evens. In this case if your horse wins you will receive your stake back doubled.

For example: Your horse wins at 1/1 (pronounced 'evens').
If your stake was £10 you will receive:
your £10 back
plus your stake multiplied by the odds of 1/1 = (£10 x 1) = £10 again
that makes £20 in total

Odds on (e.g 1/2, 4/7, 3/10 etc)
If your horse's perceived chance of winning the race is more than 50/50 it is described as odds on. In this case if your horse wins you will receive your stake back plus your stake multiplied by the odds on it.

For example: Your horse wins at 1/2 (pronounced one-to-two on).
If your stake was £10 you will receive:
your £10 back
plus your stake multiplied by the odds of 1/2 = (£10 x ½) = £5
that makes £15 in total

Here is another one that explains it that also includes in clear black and white, the term "Stake back".


Win Bet
A win bet is the most simple type of bet you are betting on a team/horse/player to win something like a football match a horse race or a tennis tournament etc.
Bookmakers will offer odds on each team/horse/player which tell you how much you win if that selection wins.
You then make a stake and if your selection wins you get your stake back + your winnings which are based on multiplying the odds and your stake.

Win Bet Example
£50 win on Red Rum at 10/1
If Red Rum doesn't win then you lose your stake. If Red Rum does win then you multiply your stake by the odds £50x10 =500 and you receive your £50 stake back. So your total return on this bet would be £550. Your profit on the £50 stake would be £500.
I've been Attempting (with much failure) to implement a side by side system. I really want to get it to the point that you can create events with different types off ODDs systems, but its going to take some serious architecture changes.

If I have to make changes for you, thats what we'll do. Don't want you stuck with something that doensn't work for you that can be taken care of with a few edits.
I played around with it and worked it out, though was just different to what I'm used to at the bookies versus the way this is done, that's all.

I didn't know it had two different methods to show the odds, a US and European one. I didn't know anyone even returned the initial bet... I thought all odds were you pay, you get the total of the odds back if you win... hence making money. This US way... just never heard of it. Odds would be shown as 0.27 and such then, is that right? For US people who use that real-life odds method?

I get that I can enter 50 / 100 to formulate a 1.50 odds using the Euro selected option. So the total is then $1.50 for every dollar placed, nothing more.
  • Like
Reactions: Bob
Just to clear up the "US" thing, there is nothing "US" about Sportsbook (yet). It is based on the UK Fractional Wagering system. Fractional Odds are a UK thing. The US does whats called "Money Line" which is not available in Sportsbook yet (but will be someday).

The Decimals are just DISPLAY TOOLS to assist people in figuring out payouts that don't understand the Fractional Odds system. Below is something I wrote in another post explaining the decimal display values..

The two types of Decimals that follow the fractional odds are DISPLAY ONLY and are there to assist people in figuring out payouts. They have no baring on actual functionality. When you choose US, all you are doing is having a fraction converted to a decimal (as that is how the US converts fraction to decimal conversion). That's it, nothing more, nothing less. It doesn't change any functionality as the functionality is based on the Fractional Odds entered into the system. When you select European Decimal, all it does is add 1 to the value after the conversion from fraction to decimal. It still has no functionality as the functionality is still driven by the odds values you entered into the system. those fractional values are NOT converted, they are the same regardless of which DISPLAY you choose. It is simply a display that decimal odds betting people are used to seeing/understanding that they mentally can understand the payout. The actual wagering still works the same in both systems. When you place a wager in the decimal system (like you are used to) your stake is returned, but you are used to it being part of the return instead of two separate things. You receive the same amount of money regardless, you are just used to different "terms" and displays is all. I couldn't tell you how many times over the past decade I've had this same conversation and it always comes down to people using the decimal system not understanding how the fractional system works. vBookie with vBulletin is the same way. Its written using the UK Fractional Odds system and unlike sportsbook, it does not have a conversion for European decimal odds. It is purely UK Fractional odds based.


When you create an outcome and enter the odds 50 to 100 and have the decimal display to US, the display looks like this: 50/100 (0.50).

When you create an outcome and enter the odds 50 to 100 and have the decimal display to EUROPEAN, the display looks like this: 50/100 (1.50) (simply adds 1 to the decimal to simulate Decimal Odds payout conversion).

As you can see, they are both still fractional odds based (50 to 100) which means that if you placed a $10 stake and that outcome was a winner, it would be processed like this. ($10*50)/100 = $5 Winnings + $10 Stake = $15 return.

In the fractional odds system, I start out with $10 in my pocket. I place that $10 stake on the outcome, the outcome wins, I get my $10 back, plus my $5 wining, so now I have $15 in my pocket. Total return is $15. Total Earnings is $5.

In the decimal odds system that you are used to, you start out with $10 in your pocket, you place a $10 wager on the outcome, the outcome wins and you win $15, so now you have $15 in your pocket. Total return is $15. Total Earnings is $5.

As you can see, both end up returning the same amount and earning the same amount. The difference is, one system separates the stakes from the winnings as they are two separate things in reality (for accounting). On electronic systems, they account for both the STAKE and the WINNINGS separately (and this includes decimal based systems).

Anywhere within Sportsbook that displays "Winnings", only actual "Winnings" are displayed, not Stake and Winnings. This gives a accurate picture of what people actually WON (Earned) vs what they already had to begin with plus winnings.

Hope that clears it up a little more.
Yer, thanks Bob... I worked it out and was using the US option and entering how the odds normally show, not knowing about the investment payback part on top of the odds. I thought it was all just one output type.

Have changed my way of entering the odds now.
  • Like
Reactions: Bob
That is simply the best explanation I have ever read. I have tried many times to explain this exact issue.
btw, I've changed the Options in the Admin CP to now DEFAULT to EU Format and change the "US" format to "Non EU" (as its not a "US" thing).
Not open for further replies.