<p>It depends what you are trying to build. If you are building something with cardano-wallet it is safe to increase that default gap if you don’t want to use this wallet across other clients. (other clients will stop at 20 which will result in no longer display the balances of the other addresses)</p>
<p>Setting it to 1k, 10k, or even 50k is not a problem but the performance will decrease the higher you set this value.</p>
<p>Fun fact: in 2019 a Ransom attack appeared which exploited this mechanism: <a href="https://blog.sia.tech/a-ransom-attack-on-hardware-wallets-534c075b3a92" rel="noreferrer">https://blog.sia.tech/a-ransom-attack-on-hardware-wallets-534c075b3a92</a> (it generated a receiving address which belongs to your private key, but based on a very high random index)</p>

CC BY-SA 4.0
2021-08-15T07:11:15.383Z
2021-08-15T07:11:15.383Z
adatainment
<p>On the cardano developers site, the example they have on accepting payments using <code>cardano-wallet</code> its stated to retrieve an unused address from the wallet and have clients send to that address.</p>
<p>However, if I can only create &quot;20&quot; addresses (from the recommended <code>address_pool_gap</code> option), what happens when I have more than 20 transactions?</p>
<p>Would I need to send balance to a &quot;main&quot; wallet address and re-use the previous used addresses? or I am missing something else?</p>

CC BY-SA 4.0
2021-08-15T11:30:01.637Z
Could you provide a link to the developers page you mentioned?
eddex
CC BY-SA 4.0
2021-08-15T11:37:07.630Z
@eddex https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-wallet
Raggaer
<wallet><cardano-cli>
cardano-wallet maximum amount of addresses
# cardano-wallet maximum amount of addresses

(Asked by: username_0 on 2021-08-14)

On the cardano developers site, the example they have on accepting payments using `cardano-wallet` its stated to retrieve an unused address from the wallet and have clients send to that address.

However, if I can only create "20" addresses (from the recommended `address_pool_gap` option), what happens when I have more than 20 transactions?

Would I need to send balance to a "main" wallet address and re-use the previous used addresses? or I am missing something else?

**Tags:** wallet, cardano-cli
> **Comments:**
> **username_1**: Could you provide a link to the developers page you mentioned?  
> **username_0**: @eddex https://developers.cardano.org/docs/integrate-cardano/listening-for-payments-wallet  

---

## 1 answers

### Answer by username_2 on 2021-08-15. Score: 8 | Accepted answer

It depends what you are trying to build. If you are building something with cardano-wallet it is safe to increase that default gap if you don’t want to use this wallet across other clients. (other clients will stop at 20 which will result in no longer display the balances of the other addresses)

Setting it to 1k, 10k, or even 50k is not a problem but the performance will decrease the higher you set this value.

Fun fact: in 2019 a Ransom attack appeared which exploited this mechanism: <https://blog.sia.tech/a-ransom-attack-on-hardware-wallets-534c075b3a92> (it generated a receiving address which belongs to your private key, but based on a very high random index)


---

