Post
Topic
Board Service Discussion
Re: BTC Stolen from Poloniex
by
MarcoTC
on 06/03/2014, 00:48:01 UTC
Taking full responsibility yet let the users pay for it? Hmmm....

If you run an exchange and it's possible to end up with negative account balances, that is unforgivable. Something is fundamentally wrong then.
Then your solution is letting your batch job checking for negative balances? Man oh man.

Race conditions are the first thing you prevent when you do financial transactions.
Use transactions, never use queues and of course, make sure your DB is truly MCC/MVCC and ACID compliant.

With your suggested solution, I wouldn't even be surprised if you're using MySQL and floats for the currency fields.
Please use something decent. You're handling other peoples money.