The BetFair 600-million-pound bug
A notable bug from the 2011 Christmas Hurdle at Leopardstown Racecourse:
Even as Voler La Vedette approached the line, the Betfair online market was displaying extremely favorable odds for the horse that was almost certain to win. It appeared that someone was happy to accept bets at odds of 28: for every £1 bet, the bettor was offering to pay £28 if the horse won. Very happy, in fact. This remarkably pessimistic gambler was offering to accept £21 million worth of bets. If Voler La Vedette came first, the gambler would be on the hook for almost £600 million.
... It didn’t take long for another user to suggest what might really have been going on. The person had noticed something odd about that offer to match £21 million of bets. To be precise, the number displayed on the exchange was just under £21.5 million. The user pointed out that computer programs often store binary data in units that contain thirty-two values, known as “bits.” So, if the rogue gambler had designed a 32-bit program to bet automatically, the largest positive number the bot would be able to input on the exchange would be 2,147,483,648 pence. Which meant that if the bot had been doubling up its bets — just as misguided Parisian gamblers used to do while betting on roulette in the eighteenth century — £21.5 million is the highest it would have been able to go.
It turned out to be a superb piece of detective work. Two days later Betfair admitted that the error had indeed been caused by a faulty bot. “Due to a technical glitch within the core exchange database,” they said, “one of the bets evaded the prevention system and was shown on the site.” Apparently, the bot’s owner had less than £1,000 in an account at the time, so as well as fixing the glitch, Betfair voided the bets that had been made.
Tags: betfair fail bugs gambling racing leopardstown betting 32-bits integer overflow