I want to accept BTC payments but I'm a bit worried about the gap limit.
I've read our wallet could miss the funds beyond the gap limit if that happen.
But I also read that we could fix that easily increasing the gap limit in Electrum for example.
So I'm a bit confused right now, is possible to loose the funds due a gap limit or that problem is just something we can fix easily in our wallet changing the settings?


You won't ever lose funds due to the gap limit; they don't become lost forever. You can still retrieve them.

The gap limit is really only an issue for restoring backups. When restoring a backup, the gap limit is used by the wallet to know how many addresses to lookahead in order to ensure that all funds are seen. If the gap limit is too small, then a long string of unused addresses can cause the wallet to miss funds at higher indexed addresses as it does not generate them when restoring the backup.

The gap limit is not an issue for normal use. It only effects backup restoration and, when doing such restores, it is easy to just increase the gap limit if you find that not all of your funds were seen by the wallet,

| improve this answer | |
  • The gap limit is not only an issue for restoring backups. If his e-commerce software generates 100 consecutive receiving addresses for potential customers that never pay, the gap limit had better be >100. (I'm assuming the addresses are generated outside of Electrum, using the xpub.) – Bitcoin Hodler Jun 4 '19 at 4:35

Also as @bitcoin hodler has pointed out, the gap limit is not just a backup restore issue. usually for commercial purposes your users may be curious to see the checkout page without actually checking out thereby generating unused addresses. I suggest one can satisfy their curiosity by including a demo checkout page thereby reducing the number of them that will proceed to try it out. This coupled with other fix can be useful!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.