# Gaming Bitcoin by generating millions of wallets [duplicate]

What’s to stop someone from gaming the system and creating millions of wallets, increasing their odds of accidental deposits? If nothing else you could conceive of a DOS attack of sorts, where the addresses are all burned up. This seems like a major flaw to me... regardless of how many possibilities there are, it's not infinite.

• I've heard things like: "Bitcoin already supports OP_HASH256 in script, so it would be trivial to increase the number of addresses if it ever became a problem." here - bitcointalk.org/index.php?topic=24268.0 Commented Dec 22, 2013 at 1:50
• Exercise: estimate the probability that, within 5000 years, such a rig would find a collision with an address already in use, even if every person on the planet has 1 million addresses containing coins. I think you'll find it's much smaller than you expected. 2^160 is a very large number. Commented Dec 22, 2013 at 3:18
• For ID's, it's 34 characters that can be 0..9, a..z, and A..Z. That's 64^34. If you could do 5,000 per second, it's =(64^34)/(5000*60*60*24*365*1E+51) to get 16 percent of the addresses in a year working full time with 100,000,000,000,000,016,384,608,344,632,472,552,568,168,984,184,560 machines on the task. I think that settles it. Can someone please check my math? Commented Dec 23, 2013 at 5:31
• One thing that comes of this is that because the address is Base58encoded, based on my math above, it's 2^40, not 2^106 possibilities as others suggest. A much smaller number. Commented Dec 27, 2013 at 17:16
• I don't see where you're getting 2^40? Your 64^34 (=2^204) is a bit high to start with. First of all, 0-9,A-Z,a-z is 62 characters, not 64; moreover 0,O,I,l are excluded (to avoid visual confusion), which is where we get 58. So 58^34 would be closer, which is roughly 2^199. But not every string of 34 characters is a legal address; some of the bits are a network byte, and others are a checksum. In fact, an address is formed from a 160-bit hash of a public key, so there really are exactly 2^160 possible addresses. Commented Dec 28, 2013 at 2:14