Even if you're not 100% sure in your DB code you can do defense in depth approach and have the code that does the money operations do some checking too.
Even executing queued operations with few seconds delay allow you to notice say a series of withdrawals putting account in negative
Yeah, and it’s Bitcoin withdrawals, nobody expects it to be anywhere near instant. I doubt the market place set its transaction fees very high either.
But then you have to create a queue that only runs 1 transaction per second. I guess another imperfect but simpler way is to create a batch file of transactions, execute hourly, but randomize or sort the sequence in a way to make sure related transactions aren’t executed together.
Even executing queued operations with few seconds delay allow you to notice say a series of withdrawals putting account in negative