Bitcoin Forum
November 06, 2024, 09:52:43 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help me understand these transactions [0.05 BTC Bounty]  (Read 681 times)
jgalt (OP)
Newbie
*
Offline Offline

Activity: 36
Merit: 0



View Profile
May 26, 2013, 01:57:19 PM
 #1

I'm going to pay BTC0.05 for the best explanation of what's happening in these two Satoshi Dice transactions so I can better understand how Bitcoin works.

Transaction #1:

https://blockchain.info/tx/25010ba2364ff3c0981b078644d7608e34be8c854bf6d782b1914b48abf524b6

2 Inputs:
BTC0.149 from 19xF...
BTC0.019 from 1HmE...

2 Outputs:
BTC0.017 to 1Jjs...
BTC0.15 to 1dice.. (The SatoshiDICE 50% roll)

Questions:
- I see the SatoshiDice address because it has a comment on it, but what are the other 3 addresses? 1 of them is the person who made the bet, but which one? And what are the other 2?
- What exactly does "Estimated BTC Transacted" of 0.15 mean here? It's showing two output addresses with a total of 0.167.
- SatoshiDice is going go have to pay out if the person who sent this bet in wins - where will they pay it out to?

Transaction #2:

https://blockchain.info/tx/a49072ee98d8d9ca39066216b43b1ca26bcc62c939be6be4f8086c4e455e14ff

4 Inputs:
BTC0.0001 from 17Ffh...
BTC0.0008 from 1Nez...
BTC0.0000543 from 1CdhW...
BTC0.0195 from 14oAS...

2 Outputs:
BTC0.01 to 1dice... (Again, the SatoshiDice address)
BTC0.01002 to 1Dharx...

Questions:
- Why is the Estimated BTC Transacted 0.0100243 instead of 0.01 if this is supposed to be a SatoshiDice transaction?
- And again, where would SatoshiDice send the winnings if this was a winning bet?

If any of the moderators would be so generous as to post this in the appropriate section outside of the "Newbie" category (Technical perhaps?) it would be much appreciated.
BitCoinNewGuy
Member
**
Offline Offline

Activity: 84
Merit: 10

'That Guy'


View Profile
May 26, 2013, 02:01:57 PM
 #2

https://bitcointalk.org/index.php?topic=216665.0
jgalt (OP)
Newbie
*
Offline Offline

Activity: 36
Merit: 0



View Profile
May 26, 2013, 02:04:11 PM
 #3


lol - I'm not in any way affiliated with Satoshi Dice, this is purely an exercise in trying to understand how transactions work.
Akka
Legendary
*
Online Online

Activity: 1232
Merit: 1001



View Profile
May 26, 2013, 02:16:28 PM
 #4

Aswer is simple, all Outputs are belonging to the person that made the bet.

The 4th address is change.

Bitcoin can always only spend the whole output received in one transaction.

So you have revived 1 BTC to Address A and 1 to Address B.

Now you try to send 1.5 BTC, your client has to spend the whole 2 BTC from both addresses send 1.5 BTC to the reviving address and send 0.5 BTC to a new change address.

See: https://en.bitcoin.it/wiki/Change

Hope that clarifies this for you.


- Why is the Estimated BTC Transacted 0.0100243 instead of 0.01 if this is supposed to be a SatoshiDice transaction?

Blockchain doesn't know the receiving address or the change address, so they are just guessing that the receiving address is the one that receives the higher amount.

- And again, where would SatoshiDice send the winnings if this was a winning bet?

Don't know, I guess they just take the first one of the two, but as they both belong to the same person it doesn't matter.


Send the bounty to: 1BTC1oo1J3MEt5SFj74ZBcF2Mk97Aah4ac

All previous versions of currency will no longer be supported as of this update
DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4801



View Profile
May 26, 2013, 02:39:43 PM
 #5

Transaction #1:

https://blockchain.info/tx/25010ba2364ff3c0981b078644d7608e34be8c854bf6d782b1914b48abf524b6

2 Inputs:
BTC0.149 from 19xF...
BTC0.019 from 1HmE...

2 Outputs:
BTC0.017 to 1Jjs...
BTC0.15 to 1dice.. (The SatoshiDICE 50% roll)

Questions:
- I see the SatoshiDice address because it has a comment on it, but what are the other 3 addresses? 1 of them is the person who made the bet, but which one? And what are the other 2?
- What exactly does "Estimated BTC Transacted" of 0.15 mean here? It's showing two output addresses with a total of 0.167.
- SatoshiDice is going go have to pay out if the person who sent this bet in wins - where will they pay it out to?

It is impossible to know the answer to some of your questions with 100% certainty, but we can make some reasonable assumptions.

Lets start by assuming that the person who made the bet is using the Bitcoin-Qt wallet (each wallet has its own way of building transactions, therefore if they are not using the Bitcoin-Qt wallet, then some of what I say here might not be accurate).

Using that assumption, we can generally assume that the owner of the wallet has multiple addresses in their wallet.

They previously received 0.149 BTC sent to that wallet using a receiving address of 19xFMxnr89ViAjb5xPB7TReucamtUPz5zg in the following transaction:
https://blockchain.info/tx-index/74835497/0

They also previously received 0.0193848 BTC sent to that wallet using a receiving address of 1HmEWevgeRyfb7TVrwT2WWjh7tUDtPSx1Q in the following transaction:
https://blockchain.info/tx-index/74812243/0

When they told Bitcoin-Qt to send 0.15 BTC to SatoshiDice at 1dice97ECuByXAvqXpaYzSaQuPVvrtmz6, their wallet searched through its list of unspent outputs to find one or more previously received outputs that would add up to more than 0.15 BTC.  Having found those two previously received outputs, the wallet used them both as inputs to the transaction you are asking about.  This provided a total of 0.1683848 BTC funding the transaction.  Then the wallet created an output sending the desired 0.15 BTC to SatoshiDice.

This left 0.0183848 BTC unspent in the transaction.  If this 0.0183848 BTC isn't sent somewhere, then the miner that includes the transaction in a block gets to claim it as transaction fees and add it to their block reward.  The wallet (or the sender) determined that the transaction should only have a fee of 0.0005 BTC.  So, subtracting 0.0005 BTC from 0.0183848 BTC, we see that they needed to send the remaining 0.0178848 BTC somewhere.

It is possible that the sender had a second person that they had to pay, and as such they sent the 0.0178848 BTC to someone else (a single transaction can send to multiple receivers).  More likely however (again assuming this is the Bitcoin-Qt wallet), the wallet used a brand new address of 1JjsgDvPGpPutUYoJDvbxokpcb6JGQwr5G that it keeps track of in the wallet.dat file, but that it doesn't tell the user about.  The 0.0178848 BTC is sent right back into the original sending wallet.  As such, all three addresses belong to the same wallet, and the same person.

SatoshiDice's default behavior is to send the "winnings" back to one of the addresses from the input side of the transaction.  I'm not sure how SatoshiDice chooses which address to use when there are multiple inputs.  If I had to guess, I'd say they just use the first address in the transaction. So they would most likely pay the winnings back to 19xFMxnr89ViAjb5xPB7TReucamtUPz5zg.

"Estimated BTC Transacted" is a feature that the creator of the blockchain.info website has added to their own analysis of the data.  When they see a transaction, they use some assumptions about the typical behavior of the various known wallets types (Armory, Electrum, Bitcoin-Qt, MultiBit, etc.) and how each of those wallets builds transactions.  Then they try to guess at which outputs are the ones being "sent" to intended recipients, and which outputs are just "change" being sent back into the sender's own wallet.  Then after they've made their guess, they display their guess on the website as "Estimated BTC Transacted".  In this case, they are guessing exactly what I just described (that SatoshiDice was the only intended recipient from the transaction, and that all three of the other addresses probably belong to the sender's wallet.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4801



View Profile
May 26, 2013, 02:45:36 PM
 #6

Transaction #2:

https://blockchain.info/tx/a49072ee98d8d9ca39066216b43b1ca26bcc62c939be6be4f8086c4e455e14ff

4 Inputs:
BTC0.0001 from 17Ffh...
BTC0.0008 from 1Nez...
BTC0.0000543 from 1CdhW...
BTC0.0195 from 14oAS...

2 Outputs:
BTC0.01 to 1dice... (Again, the SatoshiDice address)
BTC0.01002 to 1Dharx...

Questions:
- Why is the Estimated BTC Transacted 0.0100243 instead of 0.01 if this is supposed to be a SatoshiDice transaction?
- And again, where would SatoshiDice send the winnings if this was a winning bet?

blockchain.info did a poor job of guessing which output was the intended recipient here.  They appear to have assumed that the larger output is the intended recipient and that the smaller output is the change.  This isn't always true (as you can see in this transaction).

Only the creator of SatoshiDice knows for certain how their software chooses an address to send the winnings to.  I'd guess that they most likely choose the address associated with the first input in the transaction.  As such they will most likely send the winnings to 17FfhD7vV5TGDQrqjDeGgamd6RN3FTh5vc
jgalt (OP)
Newbie
*
Offline Offline

Activity: 36
Merit: 0



View Profile
May 26, 2013, 02:53:06 PM
 #7

Sorry Akka, but Danny wins the bounty.

Thanks Danny - that's really helpful. So when you say, "only the developer of SatoshiDice knows which one" are you essentially saying that it doesn't really matter which one? That if the winnings were sent to either of the input addresses that the original person making the bet would receive it?

PS - Danny, I can't see your wallet in your profile and I'd like to send you the bounty.
ironcross360
Full Member
***
Offline Offline

Activity: 140
Merit: 100


Troll of the Fourth Reich.


View Profile
May 26, 2013, 02:57:16 PM
 #8

You probably have anonymous mixing

Why are you just staring at this? Just send it! 1MHZjADM41ttjbPUiTPYWGYGm45XLf8ZeS
DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4801



View Profile
May 26, 2013, 03:07:33 PM
 #9

Thanks Danny - that's really helpful. So when you say, "only the developer of SatoshiDice knows which one" are you essentially saying that it doesn't really matter which one? That if the winnings were sent to either of the input addresses that the original person making the bet would receive it?

It is a really bad idea to try and guess where to send bitcoins based on the inputs of a transaction.  There are several situations where doing so will result in the bitcoins being received by an unintended recipient.  Unfortunately, SatoshiDice doesn't care about that possibility.  Instead they specifically tell users on their website to only send bets from wallets where all inputs provide valid addresses to send your winnings.  If a user sends from some "wallet" where they don't have control of all the addresses associated with the inputs, then SatoshiDice just blindly sends the winnings to one of those addresses, and the bettor has to figure out where they went and how to get them.

If my assumptions that the user was betting from the Bitcoin-Qt wallet are correct, then yes SatoshiDice can send to any of the addresses and the original person making the bet would receive it.

PS - Danny, I can't see your wallet in your profile and I'd like to send you the bounty.

I don't include an address in my profile or signature, because I prefer to use a separate address for every transaction (as recommended by Satoshi Nakamoto in his whitepaper).  I don't like to re-use addresses.  If anyone ever feels an overwhelming desire to tip me, they typically PM me and request an address to send the tip to.

If anyone has ever sent me a tip they should never re-use that same address to re-tip me in the future.  It is necessary to get a new tip address every time.  I frequently discard old private keys and addresses after I've used them, so tips sent to an address that I've used before will likely end up in the great bitbucket in the sky never to be spent by anybody again.
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!