Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: MintPaw on March 01, 2014, 12:50:19 AM



Title: Quick question about returning coins.
Post by: MintPaw on March 01, 2014, 12:50:19 AM
Hi there, I've started doing some programming involving making a Bitcoin related game and I've come across a problem.

Using Blockchain.info how do I determine who sent coins? Looking at this transaction for example.

http://prntscr.com/2wr324

It has two input addresses. If I wanted to return the coins to the sender which address would I return them to?

Thanks in advance!


Title: Re: Quick question about returning coins.
Post by: DeathAndTaxes on March 01, 2014, 12:51:52 AM
There is no way to know for sure.  Some sites just pick one but that is very poorly designed and that assumption is not always valid.


Title: Re: Quick question about returning coins.
Post by: acoindr on March 01, 2014, 01:10:53 AM
There is also a project called CoinJoin (https://bitcointalk.org/index.php?topic=279249.0) in the works to help out with anonymity. If this ever gets widely adopted you really won't want to assume the inputs to a transaction come from the same owner, as the purpose of CoinJoin is to make sure that doesn't happen.

The correct answer to your question is to ask your user what address they want you to send refunds/withdrawals to. Thank you for asking instead of making an assumption. By the way, transaction IDs are not reliable without confirmations so don't have our app rely on those either.