Bitcoin Forum

Economy => Service Discussion => Topic started by: Dyaheon on April 28, 2013, 06:13:06 PM



Title: PSA: Bitstamp order matching engine is broken.
Post by: Dyaheon on April 28, 2013, 06:13:06 PM
I submitted a ticket about this a couple of weeks ago, they said they're working on it.

However, they still haven't managed to fix the bug.

https://i.imgur.com/PLiLYeL.png

See those 3 red spikes and 1 green spike? They're not errors in bitcoinity, but trades going through at around +-10% from the spot price. Note that there is are no volume spikes; the orderbook obviously wasn't cleared, it's just one or a few trades.

It's pretty rare and I don't know exactly what triggers it, but it's rather serious. Be careful when doing limit orders in bitstamp, or your trade might go through at a bad price.


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: kakobrekla on April 28, 2013, 06:47:36 PM
There are more bugs than this one. The most notable is the stealing via rounding fees. I told them about it a year ago, was said they gonna fix, but why fix money making bug, right? Then again, what can you expect from kids with css skills that are learning their entrepreneurial skills on your teeth.


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: TimJBenham on April 29, 2013, 01:26:01 AM
I submitted a ticket about this a couple of weeks ago, they said they're working on it.

However, they still haven't managed to fix the bug.

See those 3 red spikes and 1 green spike? They're not errors in bitcoinity, but trades going through at around +-10% from the spot price. Note that there is are no volume spikes; the orderbook obviously wasn't cleared, it's just one or a few trades.

It's pretty rare and I don't know exactly what triggers it, but it's rather serious. Be careful when doing limit orders in bitstamp, or your trade might go through at a bad price.

I've pointed that out already (https://bitcointalk.org/index.php?topic=187469.msg1941626#msg1941626). It is not safe to simulate a market order by setting a low or high limit. There is a chance you will get matched at your limit even if there are hundreds of BTC in the order book at better prices.

The order matching algorithm is quite simple and it is a wonder that they could implement it wrongly.


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: keatonatron on April 29, 2013, 04:18:20 AM
Do you think this happens when people put in an extremely high/low price when placing their order just to ensure it gets filled asap?

For example, I have noticed when watching the order page that sometimes an order will appear at the top of the buy list for $40 more than the cheapest sell order and it stays there until I refresh the page.


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: dooglus on April 29, 2013, 04:31:20 AM
See those 3 red spikes and 1 green spike? They're not errors in bitcoinity, but trades going through at around +-10% from the spot price. Note that there is are no volume spikes; the orderbook obviously wasn't cleared, it's just one or a few trades.

It looks like a lot more than 10% error.

I remember britcoin (remember them?) used to have the same problem, a couple of years ago.  I contacted them about it a couple of times without it being fixed, then fixed it myself and sent them a patch.  They sent me 10 BTC for doing so (which was probably worth about $50 total at the time).

I wonder if bitstamp uses the same buggy code.  Is bitstamp open source software?  I've not looked into that exchange much at all.


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: TimJBenham on April 29, 2013, 04:40:09 AM
See those 3 red spikes and 1 green spike? They're not errors in bitcoinity, but trades going through at around +-10% from the spot price. Note that there is are no volume spikes; the orderbook obviously wasn't cleared, it's just one or a few trades.

It looks like a lot more than 10% error.

I remember britcoin (remember them?) used to have the same problem, a couple of years ago.  I contacted them about it a couple of times without it being fixed, then fixed it myself and sent them a patch.  They sent me 10 BTC for doing so (which was probably worth about $50 total at the time).

I wonder if bitstamp uses the same buggy code.  Is bitstamp open source software?  I've not looked into that exchange much at all.

I don't think Bitstamp is open source. I'd be happy to rewrite their matching code for 10 BTC! Though I'd probably have to learn some execrable scripting language like PHP. Noone under the age of 30 seems to know how to code in a proper language like C or FORTRAN.


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: lucif on April 29, 2013, 07:17:29 AM
This is not normal

http://www.sierrachart.com/image.php?l=1367219807366.png


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: lucif on April 29, 2013, 09:09:37 AM
Okay, this is really impossible within such market depth! Time is GMT+3

Quote
bitstampUSD 2013-04-29 12:04:58 137.86 3.03
bitstampUSD 2013-04-29 12:05:02 137.87 0.39
bitstampUSD 2013-04-29 12:05:02 137.87 0.99
bitstampUSD 2013-04-29 12:05:02 137.87 0.99
bitstampUSD 2013-04-29 12:05:02 137.87 0.99
bitstampUSD 2013-04-29 12:05:02 137.87 1.0
bitstampUSD 2013-04-29 12:05:02 137.87 8.9
bitstampUSD 2013-04-29 12:05:02 137.9 1.02
bitstampUSD 2013-04-29 12:05:03 137.9 0.83
bitstampUSD 2013-04-29 12:05:03 137.91 0.99
bitstampUSD 2013-04-29 12:05:03 137.92 0.99
bitstampUSD 2013-04-29 12:05:03 137.92 0.99
bitstampUSD 2013-04-29 12:05:03 137.93 5.0
bitstampUSD 2013-04-29 12:05:03 137.96 0.99
bitstampUSD 2013-04-29 12:05:03 137.96 0.99
bitstampUSD 2013-04-29 12:05:04 137.97 0.98
bitstampUSD 2013-04-29 12:05:04 137.97 0.09
bitstampUSD 2013-04-29 12:05:04 137.97 0.99
bitstampUSD 2013-04-29 12:05:04 137.97 0.99
bitstampUSD 2013-04-29 12:05:04 137.97 0.99
bitstampUSD 2013-04-29 12:05:04 137.97 0.87
bitstampUSD 2013-04-29 12:05:09 151.65 0.5
bitstampUSD 2013-04-29 12:05:24 137.82 1.0
bitstampUSD 2013-04-29 12:05:30 137.82 0.08
bitstampUSD 2013-04-29 12:05:38 137.82 0.12
bitstampUSD 2013-04-29 12:05:42 137.82 0.76

https://i.imgur.com/hLLAwDh.jpg

http://www.sierrachart.com/image.php?l=1367226617368.png


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: oda.krell on April 29, 2013, 03:48:37 PM
Note 1: I'm trading on bitstamp, and have been quite happy with the exchange so far.

Note 2: bitstamp is currently doing some maintenance. Maybe they'll fix those issues, but even if so, it would be nice to get a response from them in this thread.

A few days ago I opened a thread myself in which I asked hazek (forum member and bitstamp employee? owner?) if he is aware of the issues with the bitstamp order matching algorithm, and the generally quite lacking trading interface. Here's the thread. (https://bitcointalk.org/index.php?topic=188386.0) Hazek responded, and talked about increasing the "capacity of their servers" but didn't address my other points.

So, one more time.

bitstamp/hazek, are you aware of:

(a) the apparent problems with order matching on bitstamp, as shown in the charts above

and can you

(b) explain what is the cause of those strange orders. Is it buggy code, or not a bug per se but an artifact of the way your matching algorithm works. If the latter, please explain to us how exactly it works so we at least can avoid such bad orders.




Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: oda.krell on April 29, 2013, 03:51:24 PM
See those 3 red spikes and 1 green spike? They're not errors in bitcoinity, but trades going through at around +-10% from the spot price. Note that there is are no volume spikes; the orderbook obviously wasn't cleared, it's just one or a few trades.

It looks like a lot more than 10% error.

I remember britcoin (remember them?) used to have the same problem, a couple of years ago.  I contacted them about it a couple of times without it being fixed, then fixed it myself and sent them a patch.  They sent me 10 BTC for doing so (which was probably worth about $50 total at the time).

I wonder if bitstamp uses the same buggy code.  Is bitstamp open source software?  I've not looked into that exchange much at all.

1) Looks about 10% to me, e.g. 151/137 ~= 1.102

2) I just remember btc-24 used to have similar inexplicable spikes. And we all know how that story ended :/


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: keatonatron on April 29, 2013, 04:15:12 PM
I just remember btc-24 used to have similar inexplicable spikes. And we all know how that story ended :/

With their bank account being closed? I don't see how that's related  ;D


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: oda.krell on April 29, 2013, 04:57:31 PM
I just remember btc-24 used to have similar inexplicable spikes. And we all know how that story ended :/

With their bank account being closed? I don't see how that's related  ;D

The btc-24 story is probably a bit more complex than "German government closed their accounts", isn't it. Last time I checked the relevant threads, the consensus seemed to be that some disgruntled user(s) probably started pressing charges against Simon, which brought the full might of the German Staatsanwaltschaft on poor Simon's ass :P And if I understood correctly, there's a good chance those users were disgruntled in the first place because of irregularities with btc-24's trade engine.


Title: Re: PSA: Bitstamp order matching engine is broken.
Post by: dooglus on April 29, 2013, 09:24:56 PM
It looks like a lot more than 10% error.

1) Looks about 10% to me, e.g. 151/137 ~= 1.102

Ha, yes.  I was looking at the labels on the left of the OP's chart.  They're for the volume bars, not the price...