Author

Topic: How to tell Electrum from which address(es) to send Bitcoins? (Read 195 times)

legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
Not possible to select UTXO in Android version of Electrum! Very bad, I cannot pay anythng because transaction cost is tens of dollars.
That's unfortunate but there's a workaround.
You can still freeze addresses in Android Electrum so its associated UTXO(s) wont be used in your transaction.

To get there:
  • Tap menu (3-dots), select "Addresses".
  • Tap the addresses with the UTXO that you don't want to include then tap "Freeze".
  • Frozen value will switch from "False" to "True".
  • Do the same to the other addresses of your choice.

The drawback is if the unwanted and preferred UTXO are tied to the same address, you can't select them individually.

BTW, it's off-topic to this thread.
If you have further concerns, please create a new thread.
newbie
Activity: 10
Merit: 9
Not possible to select UTXO in Android version of Electrum! Very bad, I cannot pay anythng because transaction cost is tens of dollars.
legendary
Activity: 3010
Merit: 3724
Join the world-leading crypto sportsbook NOW!
There used to be a "coin selection" policy setting in Electrum with the options "privacy" and "priority". However this was removed as the "priority" concept in Bitcoin was effectively removed when zero fee transactions were no longer a thing.

- "Priority" would spend your oldest coins, as there used to be a priority value in Bitcoin that would prioritise transactions for inclusion in a block based on the "age" of a UTXO... but this was removed at some point.
- "Privacy" would spend ALL the inputs within an address regardless of how much you were actually attempting to spend. The change would then be sent to a new change address. The idea was to prevent a leftover UTXO in AddressA from then being used in another transaction and then linking all the addresses in the two transactions together.

However, these options are no longer offered... (the concept of "Priority" in Bitcoin transactions isn't used anymore)

Currently, I "believe" that the strategy in Electrum is to use the smallest number of inputs as possible to make up the required sending amount... but not 100% sure what the actual UTXO selection algorithm is... I haven't looked at that part of the code recently.

Can users tell Electrum which strategy to use?
As far as I'm aware, the only way to tell Electrum what strategy to use is to do it yourself using the coin control methods of manually selecting UTXOs from the "coins" tab. There is no setting anywhere.


Is the default strategy for other Wallets the same?
From personal experience... no. Wallets all use different strategies. I've seen some that work simply on FIFO... they just used the oldest UTXOs first. I've seen some work the same and try and minimise the total number of UTXOs required... and I've used some that just seem a bit random.

Adding my own experience observed from 2.8x pre native Segwit update, when allowing Electrum to choose inputs, it has always taken the single input option when possible instead of combining multiple inputs, which meant I often had to perform consolidations myself or at times forcing spends from multiple inputs. I assumed this was just for smallest possible tx size.

Since updating 3x and bech32, incidentally, haven't allowed Electrum to choose, so not sure of behaviour.
HCP
legendary
Activity: 2086
Merit: 4363
There used to be a "coin selection" policy setting in Electrum with the options "privacy" and "priority". However this was removed as the "priority" concept in Bitcoin was effectively removed when zero fee transactions were no longer a thing.

- "Priority" would spend your oldest coins, as there used to be a priority value in Bitcoin that would prioritise transactions for inclusion in a block based on the "age" of a UTXO... but this was removed at some point.
- "Privacy" would spend ALL the inputs within an address regardless of how much you were actually attempting to spend. The change would then be sent to a new change address. The idea was to prevent a leftover UTXO in AddressA from then being used in another transaction and then linking all the addresses in the two transactions together.

However, these options are no longer offered... (the concept of "Priority" in Bitcoin transactions isn't used anymore)

Currently, I "believe" that the strategy in Electrum is to use the smallest number of inputs as possible to make up the required sending amount... but not 100% sure what the actual UTXO selection algorithm is... I haven't looked at that part of the code recently.

Can users tell Electrum which strategy to use?
As far as I'm aware, the only way to tell Electrum what strategy to use is to do it yourself using the coin control methods of manually selecting UTXOs from the "coins" tab. There is no setting anywhere.


Is the default strategy for other Wallets the same?
From personal experience... no. Wallets all use different strategies. I've seen some that work simply on FIFO... they just used the oldest UTXOs first. I've seen some work the same and try and minimise the total number of UTXOs required... and I've used some that just seem a bit random.
newbie
Activity: 25
Merit: 22
@HCP:

Ok, thank you.
Regarding Option 1:

What is the internal strategy of Electrum for selecting the addresses?
I can think of:

- oldest first
- try to minimize the number of local addresses
- try to pay with using a minimum of addresses
- random pick of addresses until amount is filled.

Can users tell Electrum which strategy to use?

Is the default strategy for other Wallets the same?
HCP
legendary
Activity: 2086
Merit: 4363
Now I want to send an amount of 0.0000600 Bitcoin (plus fees) to someone else.

How do I tell Electrum from which of my addresses the amount (resp.how much) should be taken?
How do I tell Eletrum from which of my addresses the (currently unknown) fees should be taken?
You have two options...

Option 1. Don't do anything and let Electrum work it all out for you... It will pick UTXOs as required to cover the amount to send + fees automatically.

Option 2. Use the "Coin Control" features of Electrum:
- 2a: use the "Coins" tab (View -> Show Coins)... this lists all the UTXOs in your wallet, and you can pick and choose which ones you want to include. Then right click and select "Spend".
- 2b: use the "Addresses" tab (View -> Show Addresses)... You can see which of your addresses have a balance. Select which ones you want to include, then right click and select "Spend From".

Note that Electrum doesn't treat the amount to send and fees individually... it sums them up into one value.
newbie
Activity: 25
Merit: 22
Assume I hold Bitcoins on multiple addresses managed by my local Electrum wallet.
Simplified example with shortened addresses:

address:        amount:
556677         0.0000410
334422         0.0000500
229977         0.0000700

Now I want to send an amount of 0.0000600 Bitcoin (plus fees) to someone else.

How do I tell Electrum from which of my addresses the amount (resp.how much) should be taken?

How do I tell Eletrum from which of my addresses the (currently unknown) fees should be taken?

The "send" tab does not provide a "take xxx from local address" entry field (resp.fields)

How does this work?
Jump to: