Bitcoin Forum
July 08, 2024, 03:48:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How many confirmations do I have to have before I can move/spend BTC?  (Read 1515 times)
cimine (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
December 05, 2013, 09:56:44 AM
 #1

I realize that if I have a wallet with 1 BTC and I receive .5 BTC, have 2 confirmations on it, spend .5 BTC and then it turns out that transaction wasn't legit I will just end up spending .5 of my original 1 BTC... But what if if I have a wallet with 0 BTC and I receive .5 BTC - how soon before I can transfer/spend that .5 BTC?
puchit
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
December 05, 2013, 10:22:11 AM
 #2

I realize that if I have a wallet with 1 BTC and I receive .5 BTC, have 2 confirmations on it, spend .5 BTC and then it turns out that transaction wasn't legit I will just end up spending .5 of my original 1 BTC.

Not really. It depends.
For any ordinary transaction (not block generation), there are inputs and outputs.
If you use your "1 BTC" as an input to create a transaction of 0.5 BTC, you will left with a 0.5 BTC change.
If you use your "0.5 BTC" as an input, and that incoming transaction has been double-spent, your 0.5 BTC outgoing transaction will never get confirmed as well, and you will left with your 1 BTC.

Of course, a transaction with 2 confirmations is very unlikely to be double-spent at this moment (51% attack is very unlikely now).
zubelutte
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
December 05, 2013, 10:22:15 AM
 #3

I realize that if I have a wallet with 1 BTC and I receive .5 BTC, have 2 confirmations on it, spend .5 BTC and then it turns out that transaction wasn't legit I will just end up spending .5 of my original 1 BTC... But what if if I have a wallet with 0 BTC and I receive .5 BTC - how soon before I can transfer/spend that .5 BTC?


This is not how Bitcoin work. Bitcoin client select random inputs, with preference of oldest. And you can send even unconfirmed inputs
cimine (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
December 05, 2013, 10:23:00 AM
 #4

I realize that if I have a wallet with 1 BTC and I receive .5 BTC, have 2 confirmations on it, spend .5 BTC and then it turns out that transaction wasn't legit I will just end up spending .5 of my original 1 BTC.

Not really. It depends.
For any ordinary transaction (not block generation), there are inputs and outputs.
If you use your "1 BTC" as an input to create a transaction of 0.5 BTC, you will left with a 0.5 BTC change.
If you use your "0.5 BTC" as an input, and that incoming transaction has been double-spent, your 0.5 BTC outgoing transaction will never get confirmed as well, and you will left with your 1 BTC.

How do you choose which one you are spending?
togitt
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 05, 2013, 10:31:57 AM
 #5

I realize that if I have a wallet with 1 BTC and I receive .5 BTC, have 2 confirmations on it, spend .5 BTC and then it turns out that transaction wasn't legit I will just end up spending .5 of my original 1 BTC.

Not really. It depends.
For any ordinary transaction (not block generation), there are inputs and outputs.
If you use your "1 BTC" as an input to create a transaction of 0.5 BTC, you will left with a 0.5 BTC change.
If you use your "0.5 BTC" as an input, and that incoming transaction has been double-spent, your 0.5 BTC outgoing transaction will never get confirmed as well, and you will left with your 1 BTC.

How do you choose which one you are spending?

It depends on what wallet you are using.
Some wallets, such as Electrum, allows you to choose it as you wish.
Some wallets, such as Bitcoin-qt, will choose it "randomly" for you.

And just as puchit mentioned, generally speaking, it is safe to use inputs with 2 confirmations.
But if you are doing a big trade, just stick to the use of 6 confirmations.
cimine (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
December 05, 2013, 10:56:59 AM
 #6

Thanks!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!