I've read the other questions involving this, including How to solve Blockchain 20 address gap-limit problem? and Blockchain gap limit which don't actually remedy the issue in a practical sense, only further explain why it exists.

I understand why the gap exists, how it works, and how Blockchain.info handles it. (Both with callbacks, checkgap API requests, returning an error when the gap reaches over 20, etc) My question is, what can I, as a developer, do to prevent exhausting this gap? Is this even a valid method for handling a larger website's Bitcoin deposits from users? Do I just have to hope that 20 users don't generate an address for fun, sending operations into a standstill?

1 Answer 1


Any website that is handling user funds should be running a node to ensure they have an accurate view of the network. Depending on an API introduces trust of a third party into the situation, which is an unnecessary risk.

As a developer, you can then simply customize the gap limit to suit your business’ needs. In many cases this likely just means increasing the gap limit to a larger number.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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