When it is time to verify the ticket, they simply send the serial number to the lottery central computer and that computer sends back the payout command (and invalidates that serial number from being paid by any other terminals.) The retailer is supposed to do some basic sanity checking for small prize amounts (is the ticket really on lottery paper, etc.) and obviously for larger prize amounts, there are several other methods to verify the authenticity of ticket stock that aren't public knowledge.
I'm not sure whether the has-this-ticket-won-anything machines phone home to check it against those records, or whether they just assume the ticket is authentic and leave the proper verification for when a prize is claimed.
That way they can also check with CCTV.
It's an interesting topic in database design because the link to the store may fail at any time (remember lotteries started years ago on dialup) and you must not have an issued-unrecorded ticket at any point in the process
Maybe it's due to lack of coordination between states? Or maybe they need to do fraud checking, etc. by watching CCTV footage from the point of sale?
> Unlike some multi-state or multi-country lotteries that have central offices, all Mega Millions duties are shared by member states as part of their membership in the game.
Each state handles their own tickets and they don't all use the same software systems to manage them.
Actually the major source of fraud in most lotteries is the store owner . For small wins the ticket is taken back to the store to scan it to check for a win, the store owner will tell the buyer that it lost, or that it only won a much smaller prize, pay that out of the till and then claim the prize. Especially in poor/immigrant communities where many player may not speak English or have internet access.
There was a story on here about an analyst for an oil company who worked out the random number sequence for a lottery in Ontario. He also analysed the winning claims and discovered that certain stores where claiming a disproportionate number of middle wins.
I went to some talks about the database design for the UK lottery where they admitted they didn't think it would be so popular and so hadn't really considered sharding.
They also were surprised that the number weren't uniformly distributed. They assumed numbers would be picked totally randomly while the first win was all numbers that could be birthdays and so there was an unusual number of winners and it took several days to work out how many.
I've sold Washington State's "lotto" tickets, and you're entirely correct about the reliability of the system - if the device can't connect to servers in Olympia, tickets can't be sold.
CCTV is up to the retailers here, though it's entirely possible that CCTV is a requirement to be an eligible lottery vendor.