<p>It is important to keep in mind that addresses are not the same as wallets. A wallet contains multiple addresses, not each address is a wallet.</p>

<p>Exchanges maintain their own wallet with thousands of addresses and thousands of coins. When you deposit Bitcoin at an exchange, they will give you an address from their wallet, and you are sending to their wallet. The Bitcoin is now theirs. When you withdraw from the exchange, they send Bitcoin from their wallet to the address that you provide. When they send, their wallet uses some coin selection algorithm to select which coins it will spend to send to you. Since an exchange processes thousands of deposits and withdrawals per day and since the coin selection algorithm may include some randomness, the addresses associated with the coins being spent for each withdraw that you make will likely be different.</p>

CC BY-SA 3.0
2017-07-13T18:38:28.597Z
What 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
CC BY-SA 3.0
2017-07-13T18:55:05.500Z
No, 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.
Ava Chow
CC BY-SA 3.0
2017-07-16T12:54:09.007Z
Ahh yep yep that's what I meant :)
tsujp
CC BY-SA 3.0
2017-07-12T16:26:07.763Z
2017-07-12T16:26:07.763Z
Ava Chow
<p>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.</p>

<p>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.</p>

<p>How are exchanges storing bitcoin so you can buy/sell on the exchange instantly, and how are they managing that system for withdrawls?</p>

<wallet><exchanges>
How do exchanges store and transfer bitcoin?
tsujp
# How do exchanges store and transfer bitcoin?

(Asked by: username_0 on 2017-07-12)

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?

**Tags:** wallet, exchanges


---

## 1 answers

### Answer by username_1 on 2017-07-12. Score: 8 | Accepted answer

It is important to keep in mind that addresses are not the same as wallets. A wallet contains multiple addresses, not each address is a wallet.

Exchanges maintain their own wallet with thousands of addresses and thousands of coins. When you deposit Bitcoin at an exchange, they will give you an address from their wallet, and you are sending to their wallet. The Bitcoin is now theirs. When you withdraw from the exchange, they send Bitcoin from their wallet to the address that you provide. When they send, their wallet uses some coin selection algorithm to select which coins it will spend to send to you. Since an exchange processes thousands of deposits and withdrawals per day and since the coin selection algorithm may include some randomness, the addresses associated with the coins being spent for each withdraw that you make will likely be different.

> **Comments:**
> **username_0**: What 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?  
> **username_1**: No, 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.  
> **username_0**: Ahh yep yep that's what I meant :)  

---

