1

I'm trying to figure out what the input address is from a transaction with multiple inputs. Can it safely be said that the first input in the inputs of the transaction is the sender's?

1
  • It would help if you clarify what you intend to use the sender's address for. – Murch Aug 25 '20 at 7:24
4

Can it safely be said that the first input in the inputs of the transaction is the sender's?

No, no such ordering exists.

Transactions consume UTXOs as inputs, and create new UTXOs as outputs. A transaction can have multiple inputs from one person, or inputs from multiple people. In some cases, more than one person can own an input. So there isn't really any useful way to point to a particular input in a random transaction, and say "this is from the sender".

In cases where there are two or more inputs, there is also the potential that the transaction is a 'payjoin' style transaction, which is specifically built to break common heuristics that attempt to determine UTXO ownership/transaction participation.

More generally, it is prudent to craft transactions in ways which do not surrender information needlessly, so that you can maintain privacy while still engaging with the Bitcoin network.

2

No, that would not necessarily be true.

  1. If multiple users have created the transaction in collaboration (e.g. during a coinjoin, a payjoin, or other type of multiparty transaction), the address that received the first input could be owned by another party than the one paying you or could have shared ownership by more than one party.

  2. If the sender used a custodial service to initiate the transaction, the address may not be associated with the sender at all. Many custodial services use so-called "omnibus wallets" where all funds are co-mingled, and addresses only link to specific users for deposits, not for withdrawals.

So, while often transactions are created by a single entity that owns all addresses the inputs were received to, this is not always the case, and even when it is, the initiator of the transaction and credited party for the address may be two different users. The notion of a "from address" in Bitcoin is dangerously misleading, you should rather think of addresses as "invoice identifiers": not to be reused, especially not, if you don't know what metadata may be associated with the original invoice.

You didn't specify why you were looking for a "sender address". Should you intend to return funds, please ask the sender for a destination address, otherwise the funds may be lost to your intended recipient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.