Article Tools

A Beijing lottery stall operator has been sentenced to life in prison for exploiting a software loop hole. This is a humorous look at a possible defense argument he could have used.

How would you swing it? This man is getting sentenced to life in prison for fraud. So what has he got to lose? If I was this man, this is how I would get out of it.


I would tell the lottery centre that it’s a great travesty that they’re planning to send me to jail. They should be heralding me and paying me a reward for discovering the flaw in their system. In fact, even if they didn’t want to give me a reward, they should at least be paying me for my services.


I was running an experiment in order to determine how rigorous the lottery centre was about their software. The test was to see exactly how long it would take for them to identify this little loop-hole.


By conducting this experiment, the lottery centre is viewing it as though they lost $3.76 million USDs. But that is simply the cost of the experiment. In actuality I have saved them money by identifying the flaw that could potentially have cost them a lot more.

Here are the numbers.

The new software was implemented in 2005. For the sake of argument, let’s say it was January 1st, 2005. I was arrested in January 2007. For the sake of argument, let’s say it was January 31st, 2007. For 25 months, this flaw went undetected.

In 25 months, $3.76 million USDs was awarded to one person who runs 3 lottery stalls. So that’s an average of $1.25 million USDs per stall per person.

If we assume 0.5% of China’s population (1.3 million people) ran lottery stalls, one lottery stall per person, that would be 6500 lottery stalls.

If we assume that only these stall managers figured out the flaw after the first day of operation, and that everyone exploited the flaw to the same degree from day one (i.e. worst case scenario), that’s gives:

6500 lottery stalls x $1.25 million USDs = $8.125 billion USDs.

This means that the lottery centre potentially could’ve have lost $8.13 billion UDSs as opposed to the $3.76 million of realized spend, which is negligible in comparison.


Instead of jailing me for life, the lottery centre should consider paying me research fees, since all of my work was conducted in the name of research. The average per-capita monthly income in Beijing was reported to be $227 USDs. Hence, at the very least, the lottery centre should pay me:

$227 USDs per month x 25 months = $5675 USDs

However, since what I have is a unique skill, I don’t think it is entirely fair to be paying me the “average” per-capita monthly income. The average salary for a Software Engineer in Beijing is approximately $23k USDs per year.

$23k USDs per year x 25 months/12 months per year = $47917 USDs

However, whenever staff make huge savings, they should get a bonus. I think a fair bonus would be 1% of the amount saved.

Potential Loss – Actual Loss = Amount saved
$8.125 billion USDs – $3.76 million USDs = $8.121 million USDs

1% of Amount saved = Bonus
1% x $8.121 million USDs = $81 million USDs


Hence, the fact that I am only walking away with $3.76 million USDs should not be viewed as a crime. I’ve practically provided my service free of charge since I’m actually entitled to $81 million USDs.

Even if was assume that only 1% of the stall managers would’ve discovered and exploited the flaw, I am entitled to:

65 lottery stalls x $1.25 million USDs = $81.25 million USDs
$81.25 million USDs – $3.76 million USDs = $77.49 million USDs
1% x $77.49 million USDs = $775k USDs

In summary, since I’m neither charging them salary ($5k – $47k) nor expecting any bonus ($775k to $81M) on top of the $3.76 million USDs of cost to them, they should be grateful.

I think by using this argument, I might manage to move from life in prison to death row.