<blockquote>
  <p>For simplicity, each user uses the same wallet address (unique to each
  user) for all subsequent deposits/withdrawals.</p>
</blockquote>

<p>Realistically, this wouldn't be the case - maybe for withdrawals but not for deposits as it gives away too much informations about the individual user. You should track balance by user in a different schema and use invoices to handle payments and withdrawals. The reason I bring this up is because you're asking what is general practice in Question 1. </p>

<blockquote>
  <p>Question 1: Is it generally practised to let each user have a
  different account level node? Eg: User 1 has m/44'/20'/1, user 2 has
  m/44'/20'/2', etc.</p>
</blockquote>

<p>I wouldn't. This system not only links the money in the system, it also links who has how much money.</p>

<blockquote>
  <p>Question 2: Assuming the above question is correct, should the account
  level key be hardened or not hardened?</p>
</blockquote>

<p>As you mentioned the derivation path is as such</p>

<pre><code>m / purpose' / coin_type' / account' / change / address_index
</code></pre>

<p>This means the account depth should be hardened. Failure to do so will be an anomaly and if I put the master private key in a different wallet, different addresses will be generated. So the answer to your question is yes, it should be hardened. </p>

CC BY-SA 4.0
2018-10-17T17:30:01.103Z
2018-10-17T17:30:01.103Z
arshbot
<p>Let's say we have an ETH trading exchange where we employ BIP32/BIP44 to generate a unique wallet address for each user. For simplicity, each user uses the same wallet address 
(unique to each user) for all subsequent deposits/withdrawals.</p>

<p>For safety reasons, we have a hot/online wallet and a cold/offline wallet, where the hot/online wallet is handled by a service (say a NodeJS app) that only contains an extended public key and not the mnemonic/seed of the HD Wallet root node.</p>

<p>We also use the derivation path structure similar to BIP44</p>

<blockquote>
  <p>m / purpose' / coin_type' / account' / address_index</p>
</blockquote>

<p><strong>Question 1:</strong> Is it generally practised to let each user have a different account level node? Eg: User 1 has <code>m/44'/20'/1</code>, user 2 has <code>m/44'/20'/2'</code>, etc.</p>

<p><strong>Question 2:</strong> Assuming the above question is correct, should the account level key be hardened or not hardened? </p>

<p>From my (poor) understanding so far, If we use <code>m/44'/20'/0</code> instead of <code>m/44'/20'/0'</code>, we only need to the extended public key for <code>m/44'/20'</code> to generate deposit addresses for each user <code>m/44'/20'/0</code>, <code>m/44'/20'/1</code>, etc. </p>

<p>However if we use <code>m/44'/20'/0'</code>, we need the extended private key for <code>m/44'/20'</code> to generate deposit addresses for each user, and this is less secure because if the extended private key on the online/hot wallet app is compromised instead of the extended public key, all the funds can be stolen.</p>

<p>Lastly, what is the best practice for implementing BIP32 in such an application (trading exchange, marketplace, etc)? Does the app that handles the wallet and holds the keys communicate via a REST/websockets/jobqueue method with the other services that accepts user input to request withdrawal/deposits?</p>

<wallet><address><exchanges><bip32-hd-wallets>
Should Account-level in BIP32/BIP44 be Hardened?
Nyxynyx
# Should Account-level in BIP32/BIP44 be Hardened?

(Asked by: username_0 on 2018-10-09)

Let's say we have an ETH trading exchange where we employ BIP32/BIP44 to generate a unique wallet address for each user. For simplicity, each user uses the same wallet address
(unique to each user) for all subsequent deposits/withdrawals.

For safety reasons, we have a hot/online wallet and a cold/offline wallet, where the hot/online wallet is handled by a service (say a NodeJS app) that only contains an extended public key and not the mnemonic/seed of the HD Wallet root node.

We also use the derivation path structure similar to BIP44

> m / purpose' / coin\_type' / account' / address\_index

**Question 1:** Is it generally practised to let each user have a different account level node? Eg: User 1 has `m/44'/20'/1`, user 2 has `m/44'/20'/2'`, etc.

**Question 2:** Assuming the above question is correct, should the account level key be hardened or not hardened?

From my (poor) understanding so far, If we use `m/44'/20'/0` instead of `m/44'/20'/0'`, we only need to the extended public key for `m/44'/20'` to generate deposit addresses for each user `m/44'/20'/0`, `m/44'/20'/1`, etc.

However if we use `m/44'/20'/0'`, we need the extended private key for `m/44'/20'` to generate deposit addresses for each user, and this is less secure because if the extended private key on the online/hot wallet app is compromised instead of the extended public key, all the funds can be stolen.

Lastly, what is the best practice for implementing BIP32 in such an application (trading exchange, marketplace, etc)? Does the app that handles the wallet and holds the keys communicate via a REST/websockets/jobqueue method with the other services that accepts user input to request withdrawal/deposits?

**Tags:** wallet, address, exchanges, bip32-hd-wallets


---

## 1 answers

### Answer by username_1 on 2018-10-17. Score: 1

> For simplicity, each user uses the same wallet address (unique to each
> user) for all subsequent deposits/withdrawals.

Realistically, this wouldn't be the case - maybe for withdrawals but not for deposits as it gives away too much informations about the individual user. You should track balance by user in a different schema and use invoices to handle payments and withdrawals. The reason I bring this up is because you're asking what is general practice in Question 1.

> Question 1: Is it generally practised to let each user have a
> different account level node? Eg: User 1 has m/44'/20'/1, user 2 has
> m/44'/20'/2', etc.

I wouldn't. This system not only links the money in the system, it also links who has how much money.

> Question 2: Assuming the above question is correct, should the account
> level key be hardened or not hardened?

As you mentioned the derivation path is as such

```
m / purpose' / coin_type' / account' / change / address_index

```

This means the account depth should be hardened. Failure to do so will be an anomaly and if I put the master private key in a different wallet, different addresses will be generated. So the answer to your question is yes, it should be hardened.


---

