What is the "Address gap limit" for Daedalus?

During wallet restoration, how many addresses does Daedalus check after finding the first unused address, before it stops and shows the final balance ?

I am talking about “Address gap limit” described in BIP-0044 as follows:

“Address gap limit is currently set to 20. If the software hits 20 unused addresses in a row, it expects there are no used addresses beyond this point and stops searching the address chain. We scan just the external chains, because internal chains receive only coins that come from the associated external chains.
Wallet software should warn when the user is trying to exceed the gap limit on an external chain by generating a new address.”

I don’t know the answer but I’m curious why anyone would need to know that. There’s a reason it stops after 20 unused addresses – there’s no reason why there would be so many.

What about plausible deniability?

I can’t see how that would work. The wallet will display your total holding regardless of how addresses are used internally.

Even if you load funds to address after the checked gap?

OK I see what you mean now. Sort of… :smile: Don’t know enough, will leave it for someone else…

The reason that I am interested in this topic is that some people have reported Daedalus doesn’t show correct balance on the testnet and I think this problem could be in some cases related to the Address gap limit in Daedalus.

Since used addresses with zero balances are not included in the snapshot, if a wallet has more than 20 used addresses with zero balances in a row, when Daedalus restores that wallet on the testnet and searches for those addresses in the snapshot, it doesn’t find them and assumes they are unused addresses, while in reality on the mainnet they are used addresses with zero balances which don’t constitute an Address gap but they do constitute an Address gap on the testnet and therefore Daedalus doesn’t show balances of addresses beyond this gap on the testnet.

Well I still don’t know enough to tackle this myself, but I’ve changed the category to one I think is more appropriate, and I’ll flag this topic up in other channels.

The current (soon to be legacy) format for Daedalus wallets is not BIP-44. You can read about the differences here.


If I am not mistaken, according to Charles in his Dubai-AMA-video-1:40 on 2019-11-21, wallet backend was implemented in accord with BIP-39 and BIP-44 standards around March 2018.

Which Daedalus do you mean? Testnet-Daedalus or Mainnet-Daedalus?

Daedalus Tesnet and Mainnet are currently both on Byron and use HD Random formats described in wiki links above.
The input provided was limited to these wallets (not wallets used by Yoroi/icarus or shelley / balance check versions) given the topic of the thread.

1 Like