user129263: My questions about storing user assets:

An exchange creates unique deposit addresses for each users. Are these addresses all derived from a HD wallet and exchange controls all the keys and indexes?
If the above answer is yes, then imagine an exchange need to collect all funds periodically from a hot HD wallet to a cold wallet. Do they iterate over each wallet address index and transfer funds using that index private key for each user address and pays a fee each time or there is something I missed?
Can I use only a HD wallet master private key and move all funds and pay fee just one for moving all fund from different addresses?


user26873: 
It depends but in the long run it doesn't matter if it's HD or not. Yes exchange has all the keys.
IF the exchange decides to move funds from their hot wallet to cold wallet, yes they will need the private key for each address they are moving funds from. If it's an HD wallet they will iterate through each private key and sign the transaction accordingly.
No the master key cannot by itself sign for any address derived from it. The master key derives the child keys deterministically. You still need to sign for each output with the corresponding private key. You can do it all in a single transaction with a lot of inputs and signatures, so you'll pay one BIG fee.


129263: <p>My questions about storing user assets:</p>
<ol>
<li>An exchange creates unique deposit addresses for each users. Are these addresses all derived from a HD wallet and exchange controls all the keys and indexes?</li>
<li>If the above answer is yes, then imagine an exchange need to collect all funds periodically from a hot HD wallet to a cold wallet. Do they iterate over each wallet address index and transfer funds using that index private key for each user address and pays a fee each time or there is something I missed?</li>
<li>Can I use only a HD wallet master private key and move all funds and pay fee just one for moving all fund from different addresses?</li>
</ol>
 26873: <ol>
<li>It depends but in the long run it doesn't matter if it's HD or not. Yes exchange has all the keys.</li>
<li><em>IF</em> the exchange decides to move funds from their hot wallet to cold wallet, yes they will need the private key for each address they are moving funds from. If it's an HD wallet they will iterate through each private key and sign the transaction accordingly.</li>
<li>No the master key cannot by itself sign for any address derived from it. The master key derives the child keys deterministically. You still need to sign for each output with the corresponding private key. You can do it all in a single transaction with a lot of inputs and signatures, so you'll pay one BIG fee.</li>
</ol>
