<p>The case 1 is easy from a technical perspective: you create a single hierarchical deterministic wallet and take full custody of your users' balances. To do so, you provide distinct addresses to each user whenever they want to deposits or receive coins. You keep track which addresses are associated with which account, but only show them their balance aggregated from what they received and sent. When they send to another user on your service, you only update your database and do not move any coins. To create withdrawals or send transactions, you use whatever coins are convenient to do so. Note that this is simple only from a technical perspective, it is difficult from a legal and regulatory perspective.</p>

<p>Case 2 is impossible: The two requirements of the users holding their own private keys and being able to transfer coins without paying transaction fees are not compatible.<br>
If you want users to hold their own keys, to sign over bitcoins, they need to be transferred to the control of another key. This requires an on-chain transaction and thus requires fees. On the other hand, to transfer balances without a fee, the coins must be under your service's control so that you can unilaterally amend the balances in your database.</p>

CC BY-SA 3.0
2017-07-01T17:34:16.317Z
2017-07-01T19:13:47.173Z
2017-07-01T19:13:47.173Z
Murch
<p>I want to implement the wallet to create bitcoin and altcoins exchange and store system. </p>

<ol>
<li>Somehow create random or HD wallet that holds and store upto 50 user public keys.But users will not have access to private keys so the user cannot sell coins directly. User A should be able to transfer coins to user B without paying transaction fee using our system.
<strong>(Thinking of some kind of HD wallet on which I control all the private keys and only provide users with public address within this wallet for receiving the coins)</strong></li>
<li>Users hold the private keys themselves on mobile/pc using our system. User A should be able to transfer coins to user B without paying transaction fee using our system.<strong>(I think its not possible without private key in this case)</strong></li>
</ol>

<p>How to create wallet for case 1 and different wallet for case 2 ?</p>

<bitcoind><wallet><e-wallet><wallet-development><custody>
How to create multi-user wallet or wallets supporting off-chain transactions
Abhaya
# How to create multi-user wallet or wallets supporting off-chain transactions

(Asked by: username_0 on 2017-06-30)

I want to implement the wallet to create bitcoin and altcoins exchange and store system.

1. Somehow create random or HD wallet that holds and store upto 50 user public keys.But users will not have access to private keys so the user cannot sell coins directly. User A should be able to transfer coins to user B without paying transaction fee using our system.
   **(Thinking of some kind of HD wallet on which I control all the private keys and only provide users with public address within this wallet for receiving the coins)**
2. Users hold the private keys themselves on mobile/pc using our system. User A should be able to transfer coins to user B without paying transaction fee using our system.**(I think its not possible without private key in this case)**

How to create wallet for case 1 and different wallet for case 2 ?

**Tags:** bitcoind, wallet, e-wallet, wallet-development, custody


---

## 1 answers

### Answer by username_1 on 2017-07-01. Score: 1

The case 1 is easy from a technical perspective: you create a single hierarchical deterministic wallet and take full custody of your users' balances. To do so, you provide distinct addresses to each user whenever they want to deposits or receive coins. You keep track which addresses are associated with which account, but only show them their balance aggregated from what they received and sent. When they send to another user on your service, you only update your database and do not move any coins. To create withdrawals or send transactions, you use whatever coins are convenient to do so. Note that this is simple only from a technical perspective, it is difficult from a legal and regulatory perspective.

Case 2 is impossible: The two requirements of the users holding their own private keys and being able to transfer coins without paying transaction fees are not compatible.  
If you want users to hold their own keys, to sign over bitcoins, they need to be transferred to the control of another key. This requires an on-chain transaction and thus requires fees. On the other hand, to transfer balances without a fee, the coins must be under your service's control so that you can unilaterally amend the balances in your database.


---

