News for hackers. Stuff that matters.
Re:Bitcoin's $137k Jackpot by hughes on Friday April 29, 2016 @04:24PM (#11598517)
This reminds me of a similar error from 2005[1] where a trader mistook the "price" and "quantity" fields of the trading software. Instead of selling 1 share for 610,000 yen, 610,000 shares were sold for 1 yen.

The mistake cost around $225 million.

[1] http://www.foxnews.com/story/2005/12/09/typing-error-causes-...

Re:Bitcoin's $137k Jackpot by XaspR8d on Friday April 29, 2016 @06:31PM (#11599184)
> Worse still, the number of shares in Mizuho's order was 41 times the number of J-Com's outstanding shares, but the Tokyo Stock Exchange processed the order anyway.

There are a lot of simultaneous errors going on here...

Re:Bitcoin's $137k Jackpot by fiatmoney on Friday April 29, 2016 @08:56PM (#11599756)
Stock exchanges really cannot be expected to track numbers of outstanding shares. One puts in a bid or an ask, indicating that one is willing to purchase or sell the given number at the given price, and an order type, indicating the manner to fulfil (fill-or-kill, limit to a certain price, take whatever outstanding offers are necessary...). This is more than enough nuance for a professional product like a stock exchange that needs to operate at microsecond cadence.

If you want to validate whether an order makes sense or is a "good idea", the place to do it on the client.

Re:Bitcoin's $137k Jackpot by derefr on Friday April 29, 2016 @10:20PM (#11600039)
Coming from a perspective of competitive multiplayer game networking, that seems insane. You can't trust the client. An ideal stock exchange, I'd think, would include the same sort of logic as a payment processor: blocking any orders that seem to be "not the sort of order this client would make", to prevent e.g. orders being executed by people who have illegitimately gained access to the account.

Of course, these type of algorithms typically take far more than microseconds to run—but that's fine, as long as they take the same time for everyone.

Re:Bitcoin's $137k Jackpot by fiatmoney on Saturday April 30, 2016 @01:36AM (#11600530)
Multiplayer games are a completely different genre than a professional-level API like a stock exchange. You absolutely must trust that a client's business logic is sound; as long as their credentials validate it's simply out of scope for you to do anything other than explicitly execute their instructions, because that's how the traders make money. "Trust the client" doesn't mean state, it means actions - the equivalent reasoning in a game would be disallowing the player from "playing badly", which is nonsensical.
Re:Bitcoin's $137k Jackpot by pbhjpbhj on Saturday April 30, 2016 @06:01AM (#11601121)
> the equivalent reasoning in a game would be disallowing the player from "playing badly", which is nonsensical //

Self and team damage is often turned off (on games I've played, I'm not really a big gamer). That would seem to correspond to blocking a sell order that represents more shares than you could possibly have?

Re:Bitcoin's $137k Jackpot by Nilzor on Saturday April 30, 2016 @06:36AM (#11601185)
.. Or sending the action "deal 1000 damage" when the maximum damage any weapon can do is 5
Re:Bitcoin's $137k Jackpot by harryh on Saturday April 30, 2016 @09:27AM (#11601592)
You can't send an action "deal 1000 damage." The client says "shoot in that direction" the server determines what damage, if any, occurs.
Re:Bitcoin's $137k Jackpot by ChoGGi on Sunday May 01, 2016 @08:00AM (#11605851)
Unless you're playing The Division (putting things like RPM, recoil, and player location client side).
Re:Bitcoin's $137k Jackpot by hueving on Saturday April 30, 2016 @02:09AM (#11600604)
A stock exchange isn't responsible for tracking how much outstanding stock there is. The purpose of an exchange is just to match orders, not to determine if they are insane.

Expecting otherwise would be like expecting eBay to determine that your buy it now price is too low or that you don't have enough inventory on hand to fulfill your listings.

Re:Bitcoin's $137k Jackpot by HappyTypist on Saturday April 30, 2016 @12:10AM (#11600306)
Not at all. If your exchange takes five milliseconds, you're gonna lose the volume of high frequency trading algorithms because they cannot front run as effectively. For an exchange volume (hence fees) is key, so you really have to work for HFTers.
Re:Bitcoin's $137k Jackpot by Retric on Saturday April 30, 2016 @01:00PM (#11602469)
You can validate this stuff before doing matchmaking. Sure, it might add less than 1 ten millionth of a second latency. But, nobody is going to drop an exchange because one of there network cables is a few inches longer than necessary and that's the cost of sanity checks.
Re:Bitcoin's $137k Jackpot by kordless on Friday April 29, 2016 @07:52PM (#11599511)
Features, not errors.
Re:Bitcoin's $137k Jackpot by artursapek on Friday April 29, 2016 @04:49PM (#11598655)
A famous trader known as BNF really capitalized on this incident. http://www.bloomberg.com/news/articles/2014-09-25/mystery-ma...
Re:Bitcoin's $137k Jackpot by Cyph0n on Friday April 29, 2016 @04:40PM (#11598602)
Damn that's huge. You'd assume that the software checks the dollar amount and asks for a confirmation, or better yet permission from a higher up, if it exceeds some value.
Re:Bitcoin's $137k Jackpot by patio11 on Friday April 29, 2016 @11:03PM (#11600142)
It got flagged multiple times and, each time, someone at the Tokyo Stock Exchange came to the conclusion that they didn't have the authority to countermand the order. The regulator was livid about this in the report.
Re:Bitcoin's $137k Jackpot by Houshalter on Friday April 29, 2016 @05:36PM (#11598929)
The problem with confirmation is it trains the human to always press "yes". You need a system that only activates if something really unusual or wrong.
Re:Bitcoin's $137k Jackpot by enraged_camel on Friday April 29, 2016 @06:13PM (#11599099)
So instead of a yes/no confirmation, you force the user to explicitly type what they are doing, i.e. "Sell 610,000 shares of stock X for 1 yen each."

This is similar to how Github forces you to type the name of a repository when you try to delete it.

You can also configure a threshold such that the "hardcore" prompt kicks in only if the system detects that the user is trying to do something unusual, i.e. sell a stock for much cheaper than it is.

Re:Bitcoin's $137k Jackpot by StavrosK on Friday April 29, 2016 @09:56PM (#11599979)
I like what mycelium does. You type the amount, and there's a button that will change state on every press, and cycles though "generous", "normal", "economical" and "stingy" or something like that.

That way, a user doesn't have to know what value to use. You can also set this once in settings and never see it again, except as a report.

Re:Bitcoin's $137k Jackpot by achr2 on Friday April 29, 2016 @09:54PM (#11599964)
Though I wish Github didn't do that for forks that are less than a few minutes old or have no commits...
Re:Bitcoin's $137k Jackpot by funtober on Friday April 29, 2016 @07:26PM (#11599391)
These sorts of mistakes happened when I was trading options more than a decade ago. In most transactions, such a confirmation would have cost money on every transaction since speed matters.

Back in the old days, I feel the broker would have gone to the market makers, said there was an error, and gotten out of the trade.

Re:Bitcoin's $137k Jackpot by enraged_camel on Friday April 29, 2016 @07:53PM (#11599516)
>>In most transactions, such a confirmation would have cost money on every transaction since speed matters.

Which is why I said you would enable it based on a threshold and/or only on unusual threads. These systems are capable of extremely complex decision-making at very high frequency. Surely something like "sell 610,000 shares for 1 yen" would have stood out as strange.

Re:Bitcoin's $137k Jackpot by gertef on Friday April 29, 2016 @05:43PM (#11598970)
unusual, like paying 1 billion times over recent prices?
Re:Bitcoin's $137k Jackpot by nxzero on Friday April 29, 2016 @05:56PM (#11599032)
A billion times over market price, funny; who in their right mind would even pay 20x over market price in any meaningful amount without requiring some sort of control?
Re:Bitcoin's $137k Jackpot by salgernon on Saturday April 30, 2016 @03:27PM (#11603136)
See also rm -rf
Re:Bitcoin's $137k Jackpot by Houshalter on Saturday April 30, 2016 @04:10AM (#11600874)
Yes of course. I'm just saying that usually these systems are badly designed, and recognizing errors correctly is a surprisingly hard problem.

In the medical world, many people have been killed by mistakes in prescriptions, despite everything going through computers and multiple humans checking it.

The problem was that the machines were too sensitive to mistakes and trained the humans to ignore warnings. They also didn't distinguish mild warnings from extreme warnings. E.g. a prescription being 2x larger than recommended, or 100x larger than recommended, which are very different situations. A well designed interface might have different shades of red for different levels of severity. To give an indication if something is really wrong.

Re:Bitcoin's $137k Jackpot by speeder on Saturday April 30, 2016 @08:05AM (#11601376)
My mother use computers all day, and also hates them and think they are illogical.

In a way she is correct, I saw her many times freaking out at a dialog box and calling me to "fix it", and it was just some absolutely useless "warning", but I also saw her many times clicking "ok" on a important message without reading and then wondering why things broke.

Re:Bitcoin's $137k Jackpot by KMag on Saturday April 30, 2016 @02:36AM (#11600674)
2005 was ages ago in terms of financial markets. It was before the housing crash and other financial crises (notably in Greece). It was before the flash crash and other notable electronic trading incidents.

Many world equity markets now have daily up/daily down limits a certain percentage above and below the previous day's closing price. Others will pause trading for a short period of time if short-term price moves are abnormally large.

Many equities markets only allow direct connections to the market from brokerages licensed by the country's financial regulators. These days, brokerages often implement their own sanity checks on many order flows. Joe's Live Bait and Stock Trading generally isn't connecting directly to any equity trading venue.

I'm curious what the effect would be of a market switching to second-price blind auctions every 5 minutes if a stock moves up or down 5% on the day. There are academic papers showing theoretical stability advantages of second-price auctions. Trading at the second-highest bid when the market is down more than 5% and at the second-lowest ask when the market is up should help to attract one-sided liquidity in the direction of market stability.

Re:Bitcoin's $137k Jackpot by jameshart on Friday April 29, 2016 @06:30PM (#11599174)
The transaction value is the same either way - 610,000 Yen.
Re:Bitcoin's $137k Jackpot by Matthias247 on Friday April 29, 2016 @06:34PM (#11599189)
But it should be able to check the current share value and then display a warning that this would be massive loss.
Re:Bitcoin's $137k Jackpot by pbhjpbhj on Saturday April 30, 2016 @06:51AM (#11601214)
It's more nuanced than that though isn't it - you can sell shares at a loss to push the market so you can buy and profit off the rebound (ie go short)? Kinda like losing your queen in chess in order to check-mate your opponent.
Re:Bitcoin's $137k Jackpot by Rexxar on Saturday April 30, 2016 @07:28AM (#11601300)
This is market manipulation and it's illegal nearly everywhere.
Re:Bitcoin's $137k Jackpot by joering2 on Friday April 29, 2016 @05:11PM (#11598791)
it does ask for confirmation. As OP wrote - it was an error, NOT a mistake.
Re:Bitcoin's $137k Jackpot by randyrand on Friday April 29, 2016 @05:37PM (#11598937)
What a silly semantic argument to make.

It was an error and a mistake.

In fact, error is a synonym for mistake: https://www.google.com/search?q=mistake&oq=mistake&aqs=chrom...

Re:Bitcoin's $137k Jackpot by Cyph0n on Friday April 29, 2016 @05:35PM (#11598928)
I don't see what you're getting at. The trader switched price with quantity - it was a human mistake.

If the software had brought up a warning with something like "you are selling each share for less than 610000 +- 10000, please confirm", this could have been avoided.

Re:Bitcoin's $137k Jackpot by madeofpalk on Friday April 29, 2016 @05:39PM (#11598944)
He actually said both :) But I don't understand the difference in this situation.
Re:Bitcoin's $137k Jackpot by DanBC on Friday April 29, 2016 @07:26PM (#11599388)
There's even a name for this - "Fat finger error". https://en.wikipedia.org/wiki/Fat-finger_error
Re:Bitcoin's $137k Jackpot by artursapek on Friday April 29, 2016 @07:37PM (#11599438)
I think fat finger is more like adding too many zeros, or hitting the wrong numbers on the keyboard. This incident was a UI confusion; entering correct values in the wrong inputs.
Re:Bitcoin's $137k Jackpot by jackgavigan on Friday April 29, 2016 @07:53PM (#11599517)
"Fat finger" has become a generic term that would encompass this type of error.
Re:Bitcoin's $137k Jackpot by samstave on Friday April 29, 2016 @04:48PM (#11598647)
That reminds me of the time when, in 1989, I was playing trade wars, on a bbs out of San Jose; I was attempting to corner the market on wheat in the galaxy as I had pretty much all of it... I smoked pot and instead of buying all the available wheat, I sold all I had. Ruined my monopoly on wheat....