Author

Topic: What happens to Bitcoins that are sent to a non-existent address? (Read 21611 times)

member
Activity: 84
Merit: 10
Well, this is how I learn,  Perfect.

Even if I misunderstood the OP.
donator
Activity: 1218
Merit: 1079
Gerald Davis
Well the OP wasn't asking that.  Your scenario is different in a couple of ways and I also think you are confusing some key terms.

1) While you could produce an address randomly it would be useless.  The address is the hash of the public key which is derived from the private key.   The private key (secret) for the address give you control over funds sent to that address. Generating a random address without a private key simply produces an address where coins are lost forever.

2) Addresses have a 32 bit checksum.  4,294,967,295 out of 4,294,967,296 random addresses will just result in an invalid address.  Your client decodes and checks the address and if it is invalid it will not create the transaction.

3) If you did happen to beat the odds (1 in 4,294,967,296) and randomly generate a valid address then whoever has the private keys controls the funds.  Given how many possible addresses there are, the probability that you would randomly type an address someone (anyone) has the key for is essentially 0%.   If you did that person would have access to any funds sent to their address. Otherwise any funds sent to it will be lost forever.

3)  Address =/= Wallet.  A wallet is a client side "concept".  It is a collection of private keys (and other tx data).  The network doesn't "know" about wallets, just addresses.  The input for every txn is the output of a prior txn.  If nobody has the corresponding private key then nobody can spend the coins.


member
Activity: 84
Merit: 10
Can I attempt to "dumb this down?"

I think the OP was asking, what if, offline I create a wallet address with 1BbwCCkwWDVJXLojxYpZrtPp8LSSRghisH by just typing it out... better yet, my five year old just bangs on the keys of the computer and she created my new address.  Now I physically hand someone a piece of paper with 1BbwCCkwWDVJXLojxYpZrtPp8LSSRghisH written on it for a fellow bitcoin'er and they send money to that aforementioned address.

For the first time ever, I bring my wallet online and find out that this mysterious wallet address belonged to Jane SMith for the past year, but never knew. 

Did Jain Smith just receive that money?  Is my wallet "Invalid" but "Online with the P2P network?"
legendary
Activity: 906
Merit: 1002
Thats what I explained or not? To explain why it cannot check the "existence" of a bitcoin address, i explained how the bitcoin secret / public key thing works.
newbie
Activity: 32
Merit: 0
Most that have been said is true...

DeathAndTaxes let me help you Smiley

Whenever you install a new bitcoind or generate a new wallet.dat you are generating out of random numbers a "secret key". With this "secret key" and more random numbers you can generate several "public keys", know as "addresses". With your secret key, you can "claim" your public keys as a proof those are yours.

This can happen complete offline, so the network doesnt know your "addresses" nor your "secret key". The second you solve a block and generate 50 BTC or you receive a transaction, your address will appear in the "chain" and therfor is public visible. As a result you can send BTC to "valid" addresses, but those addresses dont necessary need to exist. So it could happen, that you install a new bitcoind, generate an address and instantly have funds in your wallet, because someone else send some BTC to that address before it was actually existing.

An address is "valid" when its hash has a special value. So like already said, its nearly impossible that you can misstype an address and its still "valid".

Just to make it clear, "valid" and "existing" are not the same. Addresses can be valid and not exist (not yet generated) at the same time!
DeathAndTaxes wasn't trying to say "how do I prove to the network that address is mine?" but rather "how does the network know that there is a person in existence with a private key paired to that address?". That is, if I generated an address, and never said anything to the network, how could the network know that sending to that address is "more correct" than sending to an unowned but valid address?

The answer is "it can't".
legendary
Activity: 906
Merit: 1002
Most that have been said is true...

DeathAndTaxes let me help you Smiley

Whenever you install a new bitcoind or generate a new wallet.dat you are generating out of random numbers a "secret key". With this "secret key" and more random numbers you can generate several "public keys", know as "addresses". With your secret key, you can "claim" your public keys as a proof those are yours.

This can happen complete offline, so the network doesnt know your "addresses" nor your "secret key". The second you solve a block and generate 50 BTC or you receive a transaction, your address will appear in the "chain" and therfor is public visible. As a result you can send BTC to "valid" addresses, but those addresses dont necessary need to exist. So it could happen, that you install a new bitcoind, generate an address and instantly have funds in your wallet, because someone else send some BTC to that address before it was actually existing.

An address is "valid" when its hash has a special value. So like already said, its nearly impossible that you can misstype an address and its still "valid".

Just to make it clear, "valid" and "existing" are not the same. Addresses can be valid and not exist (not yet generated) at the same time!
full member
Activity: 237
Merit: 100
How would the network know an address hasn't been generated before?

I take my offline computer, generate a keypair and print it out on a piece of paper.  How would the network "know" that address has been generated.

As far as "not been used before" that would be even more useless.

So I generate an address but I can't send funds because it has no funds and I also can't receive funds because it has never been used before.  So it is impossible to receive or send funds to new addresses.

Exactly. If you talk about "non-existent" addresses I think you are misunderstanding how Bitcoin works.
donator
Activity: 1218
Merit: 1079
Gerald Davis
How would the network know an address hasn't been generated before?

I take my offline computer, generate a keypair and print it out on a piece of paper.  How would the network "know" that address has been generated.

As far as "not been used before" that wouldn't be very useful check.  A new address by default hasn't been used before so you could never send coins to a new address.
full member
Activity: 210
Merit: 100
What I mean by non-existent address is a 34-character address that has never been generated or used before.

For example, my address:

1F2ZoMkKXpjxe4SbhmU8LvXHkmCdANdsDS

But mistakenly modified as

1F2ZoMkKXpjxe4SbhmU8LvXHkmCdANdsDA

But as long as that checksum is in place, I feel safe.
donator
Activity: 1218
Merit: 1079
Gerald Davis
ah, thank you two for the help! I was always under the impression that if coins were sent to a completely non-existent address, it would still leave the wallet, but later return to the sender's address.



There is no such thing as "non-existent" address. 

There are valid addresses and invalid addresses.

If you send it to a valid address it is gone.
If you try to send it to an invalid address the client/nodes/protocol/miners won't let you.
full member
Activity: 237
Merit: 100
ah, thank you two for the help! I was always under the impression that if coins were sent to a completely non-existent address, it would still leave the wallet, but later return to the sender's address.

Define "non-existent address." In a sense, an address doesn't "exist" until coins are sent to it. There might be a corresponding private key on someone's computer, or there might not, but the network doesn't know that. For example, I have my Bitcoin savings in an address that doesn't have its private key stored anywhere but my brain. There's no way for the network to say, "Whoops, nobody is using this address--return to sender!"
full member
Activity: 210
Merit: 100
ah, thank you two for the help! I was always under the impression that if coins were sent to a completely non-existent address, it would still leave the wallet, but later return to the sender's address.

donator
Activity: 1218
Merit: 1079
Gerald Davis
the 3 situations are exactly the same.

If you send coins to an INCORRECT but VALID address they are gone forever.

Bitcoin addresses have a 32 bit checksum so the odds of creating a typo which is INCORRECT but VALID is about one in 4 billion.
Still it could happen.  If you are copying and pasting the odds are essentially zero (that you could drop or add an extra digit and still produce a valid address with the same checksum).

The much more common problem is doing something stupid:
For example thinking you are sending coins to yourself (i.e. your address) but copying the last outgoing address and sending a boatload of coins to someone you sent coins to before.
Obviously the network can't protect you from that.
hero member
Activity: 728
Merit: 500
165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
There is a checksum to prevent sending to a completely bogus address.

However, if you send to the wrong address, you lose your money.  If you send to the wrong address and you happen to know who it is, you can ask them to give your money back, but it's on their honor to actually do so.
full member
Activity: 210
Merit: 100
In three situations:

1) If the coins are sent from a local wallet
2) If the coins are sent from an online wallet with a static address
3) If the coins are sent from an online wallet with a dynamic address

I've always been afraid of mis-copying/mis-pasting an address into the corresponding field, so I want to get this cleared to prevent future worry.

Would appreciate any info :]

Thanks!
Jump to: