Send BTC with Electrum: which address is used?

5

1

I'm new to bitcoin and I've downloaded Electrum. I can see the new wallet generated a few addresses for me.

If I want to receive BTC, I just need to give one of those addresses.

But if I want to send BTC (using the Send tab), I don't see any field to choose which address will send the BTC.

  1. So, how does it work? How will Electrum choose the address to take them from?
  2. Can it be sent from multiple addresses? (e.g. To send 1 BTC, address A send 0.4 and address B send 0.6)
  3. Is it possible to choose a specific address to send the BTC? (e.g. I want specifically address C to send the 1 BTC)

Thank you.

JDoe

Posted 2016-08-24T19:09:01.470

Reputation: 53

Answers

3

Electrum appears to have two Coin Selection policies that users can select from.

CoinChooserOldestFirst

  • selects oldest first
  • prunes any unneeded inputs starting from the smallest
  • standard policy

CoinChooserPrivacy

  • randomly selects UTXO until sufficient
  • prunes any unneeded inputs starting from the smallest
  • attempts to create a change within 0.75 and 1.33 of the sent amount
  • alternative "private" policy

I'm not aware of a function to control which funds are picked, but I haven't used Electrum myself, yet.

Murch

Posted 2016-08-24T19:09:01.470

Reputation: 41 609

(Sorry on mobile, for some reason it won't let me comment on my answer) I'm actually not sure, haven't used Electrum since 1.x days xDWhyte the Weeabear 2016-08-24T21:11:05.217

@WhytetheWeeabear Don't worry, the question will be there tomorrow still. ;) Nice work writing so many answers by the way! :)Murch 2016-08-24T21:14:47.637

2Thanks! The quality of questions and answers here are so much better than bitcointalk, IMO.Whyte the Weeabear 2016-08-24T21:21:43.620

3

Great question, I've always wondered this too. But im pretty sure that Electrum, by default, will send your oldest unspent outputs first. (Sorry if example is a little repetitive)

E.g. If you recieved 0.4 on address A 3 days ago, 0.2 on address B 2 days ago and 0.1 in address A again 1 day ago, it would send 0.4 from address A, then 0.2 from address B, then 0.1 from address A again.

Im pretty sure you can change this in Dev mode. I'll look into it.

  1. As I said, in order of oldest unspent outputs (balances)

  2. Yes, they can send from multiple addresses. But it will try to send from one address if possible.

  3. Try the coin selection setting in settings.

EDIT - Ah, yes you can get it to spend from certain addresses. Go into your Electrum settings, and set your "Coin Selection" mode to privacy.

Whyte the Weeabear

Posted 2016-08-24T19:09:01.470

Reputation: 530

1Does it actually allow you to designate coins to be picked, or does it just change the selection policy?Murch 2016-08-24T21:08:29.857