Trying to understand how exchanges handle crypto From my understanding. (which is very very limited)
Crypto exchanges give their users a bitcoin address to send their crypto to. This address is a derived/child key from their own wallet. Once this wallet receives bitcoin the exchanges then credit their account.
But this means that the crypto is on two different wallets which means they'll have the send the crypto again which means another onchain update which means another bitcoin transaction fee
If the logic above is correct then 3 transaction fees are required to take place. Sending the bitcoin in. Merging the bitcoin into a main wallet. Withdrawaling the bitcoin. (Merging may not always be required)
My question is, if this is true (which it may not be, in which case PLEASE correct me and explain how it works) why would crypto exchanges give users their own bitcoin addresses? Why would they not just give the users their main bitcoin address and ask the users to include a user_id on the transaction memo?
Edit: I asked a similar question recently which stated, that only 2 onchain events happen. This is because the public address the user is given is actually directed to the exchanges wallet. How is an address generated from a public address?
Why would they not just give the users their main bitcoin address and
ask the users to include a user_id on the transaction memo?

Bitcoin is not the Ethereum and historically the fees were cheap in past. With creation of altcoins (shitcoins) a lot of them implemented this memo ability, in many cases wallets of altcoins support it by default. But this feature is available in bitcoin (OP_RETURN script) it isn't implemented in vast majority of bitcoin wallets. So exchanges historically haven't had an incentive to drag users this way.

If the logic above is correct then 3 transaction fees are required to
take place.

Not really, in most modern exchanges the withdrawals are being paid directly from depositors' addresses. So it's 1 transaction to put money into exchange backend, and 1 to withdraw it. With the change usually going to main &quot;hotwallet&quot; of exchange or series of &quot;change&quot; addresses. And deposits aren't swept in if they don't have to usually (to save on fees).

Why would they not just give the users their main bitcoin address and ask the users to include a user_id on the transaction memo?

I think you are misunderstanding how it works, if user controls the address, the exchange is not. When it comes to key ownership, as long as more than 1 party owns the private keys, it can't be deterministically decided who &quot;really&quot; own it, until one of the party decides to manage these coins. When it comes to your memo idea most of the altcoin exchange integration works in a way that exchange is providing user with common exchange hot wallet address and unique memo id. The one exception to above may be some escrow multisig scheme.

why would crypto exchanges give users their own bitcoin addresses?

They never do. Exchange won't cooperate with party that has ownership of their own keys, because of fraud possibility, in the case I mentioned above. The only exception are businesses that sometimes have static addresses in exchange system, that they own - like liquidity providers. But it is a very rare practice and can happen on a basis of complicated legal constructs.