0

Let's say for example I put my public bitcoin address on a website for donations and multiple people for around the world deposit bitcoins simultaneously to that same wallet:

  1. Will all deposit transactions be valid on the bitcoin network or might some transactions "overwrite" the other?
  2. While receiving bitcoins from someone (not yet a verified transaction on the network), can I withdraw or pay bitcoins using the same wallet given the amount only include previous bitcoins and does include the new deposit?
1
  • I can't understand your second question.
    – Nick ODell
    Mar 7, 2015 at 8:02

2 Answers 2

1

For your first question: There is no limit to the number of transactions that can be sent to a single address. Even if someone sent two different payments to your address, from the same address, both for the same amount, at the same instant: they would be two separate transactions, with different transaction ID's, and you'd receive credit for both of them. Murch's answer explains in a little more detail how thsi works.

For your second question: First of all, one should avoid mixing up the words verified and confirmed.; although they are essentially synonyms in everyday English, in Bitcoin terminology they have specific distinct meanings. Verifying a transaction just means checking that it is valid: it spends coins that really exist, and is authorized by the person to whom those coins belong. But verifying doesn't rule out the possibility that this person also authorized another valid transaction attempting to spend those same coins. Excluding that is achieved by confirmation, which essentially ensures that out of any set of conflicting transactions, there is only one which is considered "confirmed" by being included in a growing block chain, and that this choice is permanent.

I think what you really mean to ask is: if someone (call them X) sends you bitcoins, can you spend them right away (by sending them to some other person Y), or do you have to wait for the transaction to be confirmed? The Bitcoin protocol says that if the transaction sending you the coins is valid, then you can immediately create a transaction spending those coins and it will also be valid. However, for confirmation, your transaction to Y cannot be confirmed until after the transaction from X is confirmed. If the first transaction is not confirmed (maybe X forgot to include a transaction fee, or already spent those coins) then your transaction to Y cannot be confirmed either.

So it's possible in principle to spend the incoming coins immediately, but in practice it's probably not a good idea, because it can lead to a confusing situation if the incoming transaction ends up not being confirmed. For this reason, to keep you from shooting yourself in the foot, most Bitcoin client software will make you wait until the incoming transaction receives some number of confirmations before letting you use it as an input for outgoing transactions; until then, you can only spend coins that have previously been received and confirmed. But this is a convenience feature rather than an inherent limitation: if you really wanted, you could patch your software to remove this restriction, and that would be fine with the rest of the network.

2
  • Maybe I should give another scenario: Suppose I have an extremely successful website which attracts nonstop bitcoin "deposits" 24/7. My concern was that I might not be able to "withdraw" anything from that same wallet because there is always another transaction "pending". But if I understand you correctly, a "withdraw" can also happen while another "deposit" is in progress (busy getting "confirmed" on the bitcoin network. Do you agree? Mar 8, 2015 at 18:21
  • @Koning: Yes, that is right. As Murch explains, when you spend coins from a wallet, you are generating a transaction that spends coins from a previous incoming transaction. As long as you choose a previous incoming transaction that's already confirmed (and your client software will do this for you), it's irrelevant whether any other transactions come in; they are completely independent as far as the Bitcoin network is concerned. Mar 8, 2015 at 18:29
1

You seem to be missing Unspent Transaction Outputs (UTXO) as a piece of the puzzle here:
Every transaction on the network results in one or more UTXO. You can think of them as a bill with the value of the received transaction. Every time you make a transaction, the UTXO you put in get destroyed and new ones spendable by the recipient get created. Since each UTXO is unique, they cannot clash with each other (you getting a bill from one person doesn't stop you from getting another from someone else), and you can only spend them once you have received them.

Your Answer

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

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