5
1
When I buy bitcoin on an exchange I instantly get them and can withdraw my coins 5 seconds after the transaction. This means the exchange must record your account balance in some database independent of a bitcoin wallet (otherwise buying the coins would take ~10 minutes) and when I withdraw them it is sending a request to withdraw X bitcoin from the exchanges wallet.
However, when I check the wallet that BTC is coming from on blockchain.info etc the source wallet is always different, and I'm unable to see what wallet's balance over time.
How are exchanges storing bitcoin so you can buy/sell on the exchange instantly, and how are they managing that system for withdrawls?
1What about specifically when I buy from another user on that exchange, what mechanism is in place giving me instant access to the bitcoins I just used (because bitcoin transfers take ~10 minutes) and I have coins I just bought immediately. Is it just hot swapping ownership of these thousands of addresses? E.g. I buy 2 BTC from someone and in reality what the exchange is doing is making me the owner of their wallet now. But if that was the case wouldn't my deposit address now change? – tsujp – 2017-07-13T18:38:28.597
4No, when you deposited coins in the exchange, you sent coins to their wallet, so the money is really now theirs. You don't actually own the Bitcoin. They then updated in their database the balance for your account. When you trade with someone, they just update the balances of your account and the person you traded with. No Bitcoin is actually moved. – Andrew Chow – 2017-07-13T18:55:05.500
Ahh yep yep that's what I meant :) – tsujp – 2017-07-16T12:54:09.007