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?

Discussion in 'Sportsbook Resolved Bug Reports' started by anthony parsons, Jan 13, 2013.

  1. anthony parsons

    anthony parsons Member Showcase Pickem Sportsbook

    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?
  2. Bob

    Bob Developer Staff Member

    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'];
    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.
  3. anthony parsons

    anthony parsons Member Showcase Pickem Sportsbook

    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.
  4. Bob

    Bob Developer Staff Member

    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.


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


    Sheldon and anthony parsons like this.
  5. anthony parsons

    anthony parsons Member Showcase Pickem Sportsbook

    Ok... I'll play around with it and see what happens.
  6. Bob

    Bob Developer Staff Member

    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.
  7. anthony parsons

    anthony parsons Member Showcase Pickem Sportsbook

    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.
    Bob likes this.
  8. Bob

    Bob Developer Staff Member

    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..


    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.
    Sheldon likes this.
  9. anthony parsons

    anthony parsons Member Showcase Pickem Sportsbook

    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.
    Bob likes this.
  10. Sheldon

    Sheldon Active Member Pickem Sportsbook Survivor

    That is simply the best explanation I have ever read. I have tried many times to explain this exact issue.
  11. Bob

    Bob Developer Staff Member

    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).
    anthony parsons likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.