Bitcoin Forum
May 07, 2024, 01:04:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Solve this riddle  (Read 1959 times)
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
March 05, 2014, 06:30:14 PM
 #21

It is (supposedly) most likely at XXX, since the client will use old coins/transactions when sending 5 BTC from XXX to YYY.


Is this true? Do older coins get used first prior to newly deposited ones?

I guess it would depend on the wallet you are using.  The protocol doesn't specify, and doesn't care.  That detail is left for each wallet creator to decide for themselves.  In my case, I frequently use coin-control, so I get to pick which output is spent and which isn't.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715087063
Hero Member
*
Offline Offline

Posts: 1715087063

View Profile Personal Message (Offline)

Ignore
1715087063
Reply with quote  #2

1715087063
Report to moderator
1715087063
Hero Member
*
Offline Offline

Posts: 1715087063

View Profile Personal Message (Offline)

Ignore
1715087063
Reply with quote  #2

1715087063
Report to moderator
1715087063
Hero Member
*
Offline Offline

Posts: 1715087063

View Profile Personal Message (Offline)

Ignore
1715087063
Reply with quote  #2

1715087063
Report to moderator
waxwing
Sr. Member
****
Offline Offline

Activity: 469
Merit: 253


View Profile
March 05, 2014, 07:08:37 PM
 #22

Suppose I have 1 BTC.

I send my 1 BTC to an address XXX that has a balance of 50 BTC.

Next, 5 BTC are sent from XXX to YYY.

Where is my 1 BTC now? Does XXX or YYY have it?

The correct answer is "there is no such thing as a bitcoin, so the question is meaningless".

This is by design as it enables proper fungibility, which is maybe the most important property of a currency (as opposed to just an asset).

This is the whole reason CoinJoin, for example, makes any sense. Inputs 1,2,3 and outputs 4,5,6. You cannot deduce which input paid output 6, not because it is hidden, but because the question doesn't make any sense (well, technically there is SIGHASH_SINGLE, but let's ignore that).

PGP fingerprint 2B6FC204D9BF332D062B 461A141001A1AF77F20B (use email to contact)
Automatic
Full Member
***
Offline Offline

Activity: 238
Merit: 105


View Profile
March 05, 2014, 07:15:33 PM
 #23

It is (supposedly) most likely at XXX, since the client will use old coins/transactions when sending 5 BTC from XXX to YYY.


Is this true? Do older coins get used first prior to newly deposited ones?

Hopefully, yes, unless the user has specifically stated otherwise (Coin control). Reason is is that high priority coins are actually free, so, the best method would be (Assuming you didn't care about mixing addresses), if:-
1. You can get a free transaction, use the highest priority input, but, use some sort of weighting system to try and weight it towards using old enough inputs that are closer to the value you're spending (So you don't reset the change for nothing)
2. If there's no free transaction, use the lowest priority coins (That aren't unconfirmed/from a brand new block), as, if you keep using the highest priority coins, then, you'll never get to a state where there's free transactions.

But, if you're like me, you never allow the client to prechoose, and, manually do everything yourself, I wouldn't want my gambling winnings to pay a real-life friend, as, that looks like I'm an addict gambler, I'm much rather use some input I got from a sale where neither address is really 'know' (I.E. google address and you won't find "JustDice.com" or something). On top of that, I like binding transactions up, if I have five inputs from a singular service of 0.01 (0.05 total), and, I'm paying someone 0.03, I'd rather place all the TXINs at 0.05, rather than 0.03, and, change myself 0.02, so that I have a larger TXIN that matures faster (Depending on how mature the inputs are already, however, that may or may not be worth it). In some cases, this can also result in a free transaction (As TXIN priorities are added together).

Please ask for a signed message from my on-site Bitcoin address (Check my profile) before doing any offsite trades with me.
Riffed
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 06, 2014, 08:05:20 AM
 #24

Suppose I have 1 BTC.

I send my 1 BTC to an address XXX that has a balance of 50 BTC.

Next, 5 BTC are sent from XXX to YYY.

Where is my 1 BTC now? Does XXX or YYY have it?

Suppose I have $1 USD in my checking account.

I transfer my $1 to Bill online, who has $50.

Next, Bill transfers Mary $5.

Where is my $1? Does Bill or Mary have it?

The question is meaningless with anything fungible. Ownership doesn't track through a fungible account.
Automatic
Full Member
***
Offline Offline

Activity: 238
Merit: 105


View Profile
March 06, 2014, 02:22:29 PM
 #25

Suppose I have 1 BTC.

I send my 1 BTC to an address XXX that has a balance of 50 BTC.

Next, 5 BTC are sent from XXX to YYY.

Where is my 1 BTC now? Does XXX or YYY have it?

Suppose I have $1 USD in my checking account.

I transfer my $1 to Bill online, who has $50.

Next, Bill transfers Mary $5.

Where is my $1? Does Bill or Mary have it?

The question is meaningless with anything fungible. Ownership doesn't track through a fungible account.

Unfortunately, in this case, it is meaningful, you don't drop all your TXINs into a hat, you actually keep them apart.

Please ask for a signed message from my on-site Bitcoin address (Check my profile) before doing any offsite trades with me.
Pages: « 1 [2]  All
  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!