My questions about storing user assets:

  1. 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?
  2. 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?
  3. 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?

1 Answer 1

  1. It depends but in the long run it doesn't matter if it's HD or not. Yes exchange has all the keys.
  2. 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.
  3. 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.
  • thankyou for your answer but how this aggregated transactions works on EVM based blockchains bitcoin by defualt suports this feature but how about other blockchains Commented Dec 1, 2021 at 11:46
  • with a high chance exchanges use hdwallets per network and in that case how they collect all money in a same manner Commented Dec 1, 2021 at 11:46
  • 1
    Regarding your last paragraph: only public key aggregation was deployed with the Taproot softfork. Cross-input signature aggregation is not live on the network.
    – Murch
    Commented Dec 1, 2021 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.