<p>Every account <strong>should only use 1 stake key</strong>, and it resides within <code>m/1852H/1815H/0H/2/0</code>. Every new address that you generate should use the same stake key. This is so that when you're staking your wallet, it can track your balance across different payment addresses that use the same stake key.</p>
<p>Reference to <a href="https://input-output-hk.github.io/cardano-wallet/concepts/hierarchical-deterministic-wallets" rel="nofollow noreferrer">Address Derivation</a> documentation, under the Path Level</p>

CC BY-SA 4.0
2022-09-01T01:53:31.877Z
Thank you @dani for the explanation.

Doesn't this make it less private as you can discover the user total balance?
Renan Valentin Ferreira
CC BY-SA 4.0
2022-09-01T13:46:56.940Z
Yes, it is. In Daedalus wallet, they inform you about it as well. Refer to [Andrew's video on how addresses work](https://youtu.be/NjPf_b9UQNs?t=323)
Dani Ihza Farrosi
CC BY-SA 4.0
2022-08-30T10:34:20.360Z
2022-08-30T10:34:20.360Z
Dani Ihza Farrosi
<p>I was able to generate a single address following the guide. My question is regarding stake key. Is it necessary to derive a new stake key for each new address or can you just increment .derive(n + 1) and use the same stake key?</p>
<pre><code>const utxoPubKey = accountKey
  .derive(0) // external
  .derive(0)
  .to_public();

const stakeKey = accountKey
  .derive(2) // chimeric
  .derive(0)
  .to_public();

const baseAddr = CardanoWasm.BaseAddress.new(
  CardanoWasm.NetworkInfo.mainnet().network_id(),
  CardanoWasm.StakeCredential.from_keyhash(utxoPubKey.to_raw_key().hash()),
  CardanoWasm.StakeCredential.from_keyhash(stakeKey.to_raw_key().hash()),
);
</code></pre>
<p>Many thanks!</p>

<cardano-serialization-lib><address>
cardano serialization lib - Multiple addresses and stake keys
# cardano serialization lib - Multiple addresses and stake keys

(Asked by: username_0 on 2022-08-30)

I was able to generate a single address following the guide. My question is regarding stake key. Is it necessary to derive a new stake key for each new address or can you just increment .derive(n + 1) and use the same stake key?
const utxoPubKey = accountKey
  .derive(0) // external
  .derive(0)
  .to_public();

const stakeKey = accountKey
  .derive(2) // chimeric
  .derive(0)
  .to_public();

const baseAddr = CardanoWasm.BaseAddress.new(
  CardanoWasm.NetworkInfo.mainnet().network_id(),
  CardanoWasm.StakeCredential.from_keyhash(utxoPubKey.to_raw_key().hash()),
  CardanoWasm.StakeCredential.from_keyhash(stakeKey.to_raw_key().hash()),
);

Many thanks!

**Tags:** cardano-serialization-lib, address

---

## 1 answers

### Answer by username_1 on 2022-08-30. Score: 0 | Accepted answer

Every account **should only use 1 stake key**, and it resides within `m/1852H/1815H/0H/2/0`. Every new address that you generate should use the same stake key. This is so that when you're staking your wallet, it can track your balance across different payment addresses that use the same stake key.

Reference to [Address Derivation](https://input-output-hk.github.io/cardano-wallet/concepts/hierarchical-deterministic-wallets) documentation, under the Path Level

> **Comments:**
> **username_0**: Thank you @dani for the explanation.  Doesn't this make it less private as you can discover the user total balance?  
> **username_1**: Yes, it is. In Daedalus wallet, they inform you about it as well. Refer to [Andrew's video on how addresses work](https://youtu.be/NjPf_b9UQNs?t=323)  

---

