Bitcoin Forum
November 04, 2024, 10:47:13 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to tell Electrum from which address(es) to send Bitcoins?  (Read 196 times)
pxstein (OP)
Newbie
*
Offline Offline

Activity: 25
Merit: 22


View Profile
June 03, 2018, 10:09:39 AM
Merited by hugeblack (2)
 #1

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?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
June 03, 2018, 10:22:45 AM
Merited by hugeblack (3), pooya87 (1)
 #2

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.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pxstein (OP)
Newbie
*
Offline Offline

Activity: 25
Merit: 22


View Profile
June 07, 2018, 04:14:52 AM
 #3

@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
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
June 07, 2018, 05:05:04 AM
 #4

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.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
buwaytress
Legendary
*
Offline Offline

Activity: 2982
Merit: 3687


Join the world-leading crypto sportsbook NOW!


View Profile
June 07, 2018, 01:46:46 PM
 #5

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.

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
jaybee888
Newbie
*
Offline Offline

Activity: 10
Merit: 9


View Profile
April 29, 2022, 10:48:37 AM
 #6

Not possible to select UTXO in Android version of Electrum! Very bad, I cannot pay anythng because transaction cost is tens of dollars.
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6329


Self-proclaimed Genius


View Profile
April 29, 2022, 11:42:14 AM
 #7

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!