Bitcoin Forum
May 07, 2024, 02:26:19 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)
whtchocla7e (OP)
Full Member
***
Offline Offline

Activity: 392
Merit: 116


Worlds Simplest Cryptocurrency Wallet


View Profile
March 01, 2014, 02:39:08 AM
 #1

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?

Quote
▂▂▂▂▂▂▂▂▂▂▂▂▂▃▅▆█ L E A D █▆▅▃▂▂▂▂▂▂▂▂▂▂▂▂
World's Simplest and Safest Decentralized Cryptocurrency Wallet!
▬▬▬▬▬▬▬ • STORE • SEND • SPEND • SWAP • STAKE • ▬▬▬▬▬▬
1715091979
Hero Member
*
Offline Offline

Posts: 1715091979

View Profile Personal Message (Offline)

Ignore
1715091979
Reply with quote  #2

1715091979
Report to moderator
1715091979
Hero Member
*
Offline Offline

Posts: 1715091979

View Profile Personal Message (Offline)

Ignore
1715091979
Reply with quote  #2

1715091979
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715091979
Hero Member
*
Offline Offline

Posts: 1715091979

View Profile Personal Message (Offline)

Ignore
1715091979
Reply with quote  #2

1715091979
Report to moderator
Zooey
Sr. Member
****
Offline Offline

Activity: 241
Merit: 250


Time you enjoy wasting is not wasted time.


View Profile
March 01, 2014, 02:52:23 AM
 #2

It's a phoney bone of contention. 

Whaddo I win?

✘ www.NOTFORSALECAMPAIGN.org ✘
Human trafficking enslaves 30 million people: Join the movement to re-abolish slavery. | A 05:49s Vimeo |
Trance
Hero Member
*****
Offline Offline

Activity: 551
Merit: 500


View Profile
March 01, 2014, 03:10:54 AM
 #3

It can all be traced, but the amount of power needed to compute all these transactions is quite large =P

XXX and YYY  Roll Eyes

Some people are so poor ALL they have is money
jimhsu
Sr. Member
****
Offline Offline

Activity: 364
Merit: 264


View Profile
March 01, 2014, 03:14:41 AM
 #4

Depends on the exact unspent outputs in XXX, and how your client implements change.

Bitcoins don't exist as a "balance" (that's a convenience for puny humans). Everything is either a unspent or a spent output.

Dans les champs de l'observation le hasard ne favorise que les esprits préparé
hostmaster
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile WWW
March 01, 2014, 03:16:03 AM
 #5

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?
your BTC  is unknown place. May be YYY or XXX but more truer is it2s on every pc of bitcoin qt exist.
giszmo
Legendary
*
Offline Offline

Activity: 1862
Merit: 1105


WalletScrutiny.com


View Profile WWW
March 01, 2014, 03:18:36 AM
 #6

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?

Not sure if trolling but maybe it is educative to the one or the other:

In Bitcoin you don't spend coins or "from addresses" but "from transactions" (and miners may also spend new coins into existence).

This said, if the 1Ƀ was accumulated over time and the 50Ƀ in XXX were accumulated over time, they are really many transactions and not one address that you could spend.
Assume that XXX got transaction X1, X2 and X3.
Now that you send 1Ƀ there you create just another X4 and X1 – X4 are now spendable if you have the private key to XXX.
To send 5Ƀ from XXX to YYY you could send a new transaction Z1 consisting of X1 or X2 and X4 and if none of your addresses contains exactly 5Ƀ + fee, you end up with some left over that you could either send to a new address of yours, or back to YYY.

So bitcoins are actually never in addresses but in transactions and the private key of the recipient of the transaction can create new such transactions.

ɃɃWalletScrutiny.comIs your wallet secure?(Methodology)
WalletScrutiny checks if wallet builds are reproducible, a precondition for code audits to be of value.
ɃɃ
donking
Jr. Member
*
Offline Offline

Activity: 38
Merit: 2



View Profile
March 01, 2014, 03:22:13 AM
 #7

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

Activity: 392
Merit: 116


Worlds Simplest Cryptocurrency Wallet


View Profile
March 01, 2014, 03:23:42 AM
 #8

Not sure if trolling but maybe it is educative to the one or the other:

I'm not trolling, just speaking in terms that most people on here use to simplify the situation.

Quote
▂▂▂▂▂▂▂▂▂▂▂▂▂▃▅▆█ L E A D █▆▅▃▂▂▂▂▂▂▂▂▂▂▂▂
World's Simplest and Safest Decentralized Cryptocurrency Wallet!
▬▬▬▬▬▬▬ • STORE • SEND • SPEND • SWAP • STAKE • ▬▬▬▬▬▬
whtchocla7e (OP)
Full Member
***
Offline Offline

Activity: 392
Merit: 116


Worlds Simplest Cryptocurrency Wallet


View Profile
March 01, 2014, 03:27:16 AM
 #9

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


So, this means it is client dependent?
I'm not convinced that this the proper way to trace "my coin"

Quote
▂▂▂▂▂▂▂▂▂▂▂▂▂▃▅▆█ L E A D █▆▅▃▂▂▂▂▂▂▂▂▂▂▂▂
World's Simplest and Safest Decentralized Cryptocurrency Wallet!
▬▬▬▬▬▬▬ • STORE • SEND • SPEND • SWAP • STAKE • ▬▬▬▬▬▬
jimhsu
Sr. Member
****
Offline Offline

Activity: 364
Merit: 264


View Profile
March 01, 2014, 03:29:05 AM
 #10

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


So, this means it is client dependent?
I'm not convinced that this the proper way to trace "my coin"

You can find out by looking at the 5 BTC transaction, opening up transaction details, and determining what transaction outputs make up it.

Dans les champs de l'observation le hasard ne favorise que les esprits préparé
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
March 01, 2014, 03:32:28 AM
 #11

The 1 BTC was destroyed when you sent it to XXX.  For your purposes it's either in YYY or ZZZ, the change address.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
hashman
Legendary
*
Offline Offline

Activity: 1264
Merit: 1008


View Profile
March 01, 2014, 11:09:35 PM
 #12

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 answer actually depends on the choice of inputs for the transaction from XXX to YYY.  However lets assume that XXX's controller sweeps all inputs into a single TX because I think that's the gist of your question. 

XXX at first with 51 coins has 1 coin from you and 1/51 of it's balance is from your coin.

YYY then gets 5 BTC from XXX, thus 5/51 of your coin is there. 

XXX still has 46/51 of your coin. 

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
March 03, 2014, 06:32:38 PM
 #13

As an analogy:

Think of each transaction that you receive as being a single "coin" that contains an equivalent amount of a precious metal (gold?).

So if you receive 0.05 BTC, in this analogy you receive a single coin that contains 0.05 BTC worth of that precious metal.

When creating a transaction, you melt together enough of these "coins" that you hold, and recast a new "coin" for the person you are paying that contains exactly the amount you intend to send.  Then you cast the remainder of the melted "coins" into a "coin" as "change" that you keep.

Now, imagine your wallet has a handful of these "coins" from previous transactions that you've received:

  • 1 "coin" with 0.5 BTC of precious metal
  • 1 "coin" with 0.6 BTC of precious metal
  • 1 "coin" with 0.25 BTC of precious metal
  • 1 "coin" with 0.8 BTC of precious metal

You need to send 1 BTC to a recipient.

Your wallet chooses some of these coins (let say the wallet you are using decides to choose the 0.8 BTC "coin" and the 0.5 BTC "coin"

The wallet melts them together and you now have 0.8 + 0.5 = 1.3 BTC of liquid metal.  The wallet pours off 1 BTC worth of the metal into a new 1 BTC "coin" which you send off to the person that you are paying.  Then it pours off the remaining 0.3 BTC of metal into a new "coin" that you keep in your wallet.

Your wallet now contains:

  • 1 "coin" with 0.6 BTC of precious metal
  • 1 "coin" with 0.25 BTC of precious metal
  • 1 "coin" with 0.3 BTC of precious metal

If we assume that your recipient had previously created a brand new wallet and then received a single payment of 50 BTC from someone. Then he now has 2 "coins" in his wallet:

  • 1 "coin" with 50 BTC of precious metal
  • 1 "coin" with 1 BTC of precious metal

All of this melting and re-casting is permanently recorded in the blockchain.  So by looking at the blockchain, anyone can see that the 0.8 BTC and the 0.5 BTC transaction that were recevied at your address were melted, and that 2 new coins were cast (one sending 1 BTC to the recipent's address and one sending 0.3 BTC to an address that your wallet happens to control).

Now your recipent is going to send 5 BTC to someone.  There are two ways his wallet could choose to do it.  Which method is used depends on the coin selection logic used in the wallet that he is using.

He could just melt down the 50 BTC "coin" and cast it into 2 separate "coins" (a 5 BTC "coin" and a 45 BTC "coin") sending the 5 BTC "coin" to his recipient and the 45 BTC "coin" to an address that his wallet controls.  If his wallet does this, it will contain the following:

  • 1 "coin" with 45 BTC of precious metal
  • 1 "coin" with 1 BTC of precious metal (the coin that you sent him)

Alternatively, he could melt both the 50 BTC "coin" and the 1 BTC "coin" together and cast it into 2 separate "coins" (a 5 BTC "coin" and a 46 BTC "coin") sending the 5 BTC "coin" to his recipient and the 46 BTC "coin" to an address that his wallet controls.  If his wallet does this, it will contain the following:

  • 1 "coin" with 46 BTC of precious metal

With the first example, it is clear that "your coin" is still in the wallet of person that you sent it to.

With the second example, it is not possible to say with certainty how many of "your coin's" molecules made it into each of the newly cast coins.  At best, we can assume that the liquid was evenly mixed before casting the new coins, meaning that 5 / 51 ~ 9.8% of your coin has been send to the second recipient, and 46 / 51 ~ 90.2% of your coin is still held by the person that you originally sent the 1 BTC to.

Now, stepping back from the analogy to real world...

Without the precious metal that needs to be melted, this is how bitcoin actually works.  There isn't an "account" with a "balance", and there are no distinct unique "coin files" that can be tracked. Your wallet keeps track of individual transaction outputs.  When you want to send bitcoins, your wallet combines one or more of those previously received outputs into a single transaction that blends together all the value.  Then it re-assigns portions of that value to each new transaction output (including an output to send the "change" back to an address that your wallet controls).
Automatic
Full Member
***
Offline Offline

Activity: 238
Merit: 105


View Profile
March 03, 2014, 06:35:15 PM
 #14

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


So, this means it is client dependent?
I'm not convinced that this the proper way to trace "my coin"

Yes, it's client dependent on what coins it chooses to spend. If you have a 50BTC input and a 1BTC input, then tried to spend 5BTC, you'd 100% spend the 50BTC input, as, 1BTC doesn't cover it, it'd then return 45BTc change, and, you'd have a 45BTC input and a 1BTC input, unless, specifically told otherwise, in which case it'd use both (50BTC input & 1BTC input), and, get change of 46BTC, as, a singular 46BTC input, although, no client would do this automatically as it'd reset the priority of the address, lose anonymity, and, be absolutely worthless.

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

Activity: 252
Merit: 250


View Profile
March 04, 2014, 05:16:28 PM
 #15

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?

Your 1btc comes back to your current 80 Activity point! Try withdrawing and sending again..
E.exchanger
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500


NEED CRYPTO CODER? COIN DEVELOPER? PM US FOR HELP!


View Profile
March 05, 2014, 06:00:38 PM
 #16

OK you have enough answers now tell us the correct one if you are not trying to troll !!!
erre
Legendary
*
Offline Offline

Activity: 1666
Merit: 1205



View Profile
March 05, 2014, 06:05:49 PM
 #17

wow really educational thread  Smiley

Roll a dice FOR FREE every hour, and win up to $200 in btc ---> CLICK HERE

Tip me using the LIGHTING NETWORK! -->https://tippin.me/@Erre96344121
Peter Lambert
Hero Member
*****
Offline Offline

Activity: 756
Merit: 500

It's all fun and games until somebody loses an eye


View Profile
March 05, 2014, 06:15:50 PM
 #18

As an analogy:

Think of each transaction that you receive as being a single "coin" that contains an equivalent amount of a precious metal (gold?).

...

Without the precious metal that needs to be melted, this is how bitcoin actually works.  There isn't an "account" with a "balance", and there are no distinct unique "coin files" that can be tracked. Your wallet keeps track of individual transaction outputs.  When you want to send bitcoins, your wallet combines one or more of those previously received outputs into a single transaction that blends together all the value.  Then it re-assigns portions of that value to each new transaction output (including an output to send the "change" back to an address that your wallet controls).

Excellent analogy!

This is bitcoin, not bitledger. All unspent amounts are "coins", that is why there is the change address, because you have to make change from your large coin to pay an amount smaller than that coin.

Use CoinBR to trade bitcoin stocks: CoinBR.com

The best place for betting with bitcoin: BitBet.us
MegaHustlr
Hero Member
*****
Offline Offline

Activity: 601
Merit: 500


Vote 4fryn :)


View Profile
March 05, 2014, 06:21:27 PM
 #19

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?




                  ▄  ▀▄▄   ▀▄▄ ▀▄ ▀▄
             ▀█▄▄▄▄███▀▀▀▀▀▀▀█████████ ▄
         ▀████▀▀    ▄▄▄▄▄▄▄▄▄▄▄▄▄    ▀███▄
 ▄▄▄▄▄  ▄▄▀      ██▀▀     ▄██▀▀▀   █     ██
██    ▀█  ▄█▀▀▀▄  ▀█   ▄█▀   ▄▄▄ ▀██  █▀▀▄▀▄

▀▀▀   ▐█ █▌    ▐▌  █  ▐█ ▄█▀▀   █ █  ▄▀ ▄█ ▌
      ▐▌ ▀█ ▄▀▄█  █▀  █  █      ▐▌ █▀ █    ▀▄
      █     ▄█▀  ▀▀▀▀▄█  ▀█▄▄▀ ▄▀  █▄ █  ██ ▐▌
     █   ▄███▄▄███▄▄▄▄       ▄█▄▄▄▄ █▄    ▀  █ ▄
   ▄█▀▀▀▀     █▀      █   ▄█▀▀███    ▀▀▄▄   ▄██
  ▐█         ▐▌       ▐▌▄▀     ██        ▀███ ▐█
  █           ▀▄      ▐█▀       ▀█           ▀▀
  █▄           ██     ██         ██▄
   █▀            ▀     ▀          ▀█▀



.







                 ▄████▄▄    ▄
██             ████████████▀
████▄         █████████████▀
▀████████▄▄   █████████████
▄▄█████████████████████████
██████████████████████████
  ▀██████████████████████
   █████████████████████
    ▀█████████████████▀
      ▄█████████████▀
▄▄███████████████▀
   ▀▀▀▀▀▀▀▀▀▀▀




       ▄▄▄▄▄▄
    ▄████████
    █████▀▀▀▀
   ▐████
   ▐████
████████████
████████████
   ▐████
   ▐████
   ▐████
   ▐████




  ▄██▄▄                ▄▄██▄
  ████████▄▄▄▄▄▄▄▄▄▄▄███████
  ██████████████████████████
  ██████████████████████████
▄████████████████████████████▄
██████████████████████████████▌
█████▀                  ▀█████▌
████    ███▄      ▄███    ████▌
████   ▐████      ████▌   ████
 ███    ▀██▀      ▀██▀    ███▀
  ▀██▄                  ▄██▀
    ▀▀██████████████████▀▀




             ▄██▄
     ▄      ▐████   ▄▄
   █████     ██████████
    █████████████████▀
 ▄████████████▀████▌
██████████     ▀████    
 ▀▀   █████     ██████████
      ▀████▌▄████████████▀
    ▄▄▄███████████████▌
   ██████████▀    ▐████
    ▀▀▀  ████▌     ▀▀▀
         ▀███▀
Peter Lambert
Hero Member
*****
Offline Offline

Activity: 756
Merit: 500

It's all fun and games until somebody loses an eye


View Profile
March 05, 2014, 06:24:53 PM
 #20

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?

Why don't you go look in the source code and find out?

Edit: I don't mean to sound rude, I am trying to look at the source code myself now. Anybody know where this logic is held?

Use CoinBR to trade bitcoin stocks: CoinBR.com

The best place for betting with bitcoin: BitBet.us
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!