<p>With a deterministic wallet you create from an initial seed a sequence of bitcoin addresses. Imagine counting 1, 2, 3, 4, etc.</p>

<p>You can create as many addresses as you like, but not all of them will appear on the blockchain. For instance I might create one especially for you to give me 1,000,000 BTC. That is (alas!) probably not going to be used. </p>

<p>When you are recreating a wallet from scratch you do not know which is the last address used. So you start at the beginning and see what is on the blockchain. Then you look for the next one in the sequence. The gap limit is how many 'misses' you accept before you give up and stop looking. </p>

CC BY-SA 3.0
2013-08-15T15:56:02.050Z
So let's say gap is 10 and I've looked from 1 to 10 and found nothing. Do you mean that if address 20 is actually used and contain coins, then I would have lost those coins?
Pacerier
CC BY-SA 3.0
2013-08-17T06:59:15.707Z
No, it doesn't mean that the coins are lost, it just means that you set the gap limit too small.  If you set the gap limit higher, then you'll find the coins.  The only way this happens is if you gave out 20 different addresses in a row and the first 19 didn't receive any coins.  Usually it's not a problem, because when you give someone an address, usually they send you coins to it!
Eyal
CC BY-SA 3.0
2012-07-22T19:02:05.070Z
2012-07-22T19:02:05.070Z
jim618
<p>I don't understand <a href="https://en.bitcoin.it/wiki/Electrum/Documentation#What_is_the_.22Gap_Limit.22.3F">this explaination</a>.</p>

<electrum><thin-clients><gap-limit>
What is "the gap limit" in Electrum?
ripper234
# What is "the gap limit" in Electrum?

(Asked by: username_0 on 2012-07-22)

I don't understand [this explaination](https://en.bitcoin.it/wiki/Electrum/Documentation#What_is_the_.22Gap_Limit.22.3F).

**Tags:** electrum, thin-clients, gap-limit


---

## 1 answers

### Answer by username_1 on 2012-07-22. Score: 8 | Accepted answer

With a deterministic wallet you create from an initial seed a sequence of bitcoin addresses. Imagine counting 1, 2, 3, 4, etc.

You can create as many addresses as you like, but not all of them will appear on the blockchain. For instance I might create one especially for you to give me 1,000,000 BTC. That is (alas!) probably not going to be used.

When you are recreating a wallet from scratch you do not know which is the last address used. So you start at the beginning and see what is on the blockchain. Then you look for the next one in the sequence. The gap limit is how many 'misses' you accept before you give up and stop looking.

> **Comments:**
> **username_2**: So let's say gap is 10 and I've looked from 1 to 10 and found nothing. Do you mean that if address 20 is actually used and contain coins, then I would have lost those coins?  
> **username_3**: No, it doesn't mean that the coins are lost, it just means that you set the gap limit too small.  If you set the gap limit higher, then you'll find the coins.  The only way this happens is if you gave out 20 different addresses in a row and the first 19 didn't receive any coins.  Usually it's not a problem, because when you give someone an address, usually they send you coins to it!  

---

