Author

Topic: How does Electrum decide from which of my addresses the BTCs are sent? (Read 105 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
"Freeze"-->Freeze Coin

does that mean that (for the next transaction) this BTC address should be taken or the opposite?
-snip-
I guess "Freeze" means "Don't touch".
All the UTXO (coins) associated with that address wont be used in any of your new transactions.

The freeze setting is permanent until you unfreeze it
But will only work client-side, means that if you have other instance of your wallet, your freeze selections wont apply there automatically.

Quote from: thoste
Whats the difference between

"Freeze"-->Freeze Coin
and
"Freeze"-->Address

?
Shouldn't it be the same?
"Freeze Coin" only freezes certain UTXO. Useful in case you're reusing address and don't want Electrum's default coin-selection that uses all of the UTXOs of the same address.
"Freeze Address" freezes all of the UTXO that's associated with that address.

Quote from: thoste
So if I want the opposite and force an address to be used I have to select "Add to Coin control". Correct?
Correct.
It will apply as long as "Coin control active" message is displayed.
newbie
Activity: 7
Merit: 5
Can I somehow tell Electrum to use another addresses selection strategy?
Or even select the input addresses manually?
If you want to manually spend from an address or some addresses of your choice, use coin control.

On desktop Electrum wallet:
To access coin control, click on 'view' on the generally user interface and check ✔️ coins. The coin tab will appear which you can use to freeze UTXOs, addresses and to spend from addresses that you want to spend from.

Ok, thank you so far. But there is still confusion.
I am now on the "Coins" Tab.
I right click on a certain address and a context menu appears

When I select now

"Freeze"-->Freeze Coin

does that mean that (for the next transaction) this BTC address should be taken or the opposite?

Whats the difference between

"Freeze"-->Freeze Coin
and
"Freeze"-->Address

?
Shouldn't it be the same?

I guess "Freeze" means "Don't touch".

So if I want the opposite and force an address to be used I have to select "Add to Coin control". Correct?
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
As far as I can see its always the addresses with the biggest amount. Here 444444.
Not aways, it depends on the output's amount and each UTXO's state.

Here's a similar scenario created in testnet:
UTXO:0.0028tBTC output amount:0.001tBTC output amount:

Quote from: thoste
Why ?
Electrum is prioritizing "privacy" on its coin-selection before "efficiency".

This comment in Electrum's "coinchooser.py" script explains it in a nice way: github.com/spesmilo/electrum/blob/master/electrum/coinchooser.py
Bonus if you can read python since you can check "why" right there.
legendary
Activity: 2380
Merit: 5213
If you make a transaction from electrum without using coin control, electrum minimize the number of used addresses and at the same time consolidate UTXOs that are assosiated with the same address.

Let's say you have three UTXOs in your wallet.

UTXO A: 0.01 BTC
UTXO B: 0.02 BTC
UTXO C: 0.03 BTC
UTXO D: 0.04 BTC

Assume that UTXOs B, C and D are assoisated with the same address.
Now, if you want to make a transaction spending 0.035 BTC (without using coin control), electrum will use all UTXOs B, C and D.



As already stated by Charles-Tim, use coin control to tell electrum which UTXO(s) you want to be used for your transaction.
sr. member
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
Charles- Tim has said pretty much. Now the way wallets work, they try to be efficient in the way they spend your coins and if you make use of an HD wallet which of course many persons use now, the wallet tries to save fees, and also spend your coins while simultaneously trying to make use of change addresses and sweeping to make your transactions more anonymous and difficult to trace. That's why every time you press receive on Electrum you get a new wallet address so your funds are not traced to a single address.

The idea of spending is your wallet looks for a single address that can pay for the transaction and if there's none it will consolidate funds from the available addresses, meaning you will have multiple inputs.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
Can I somehow tell Electrum to use another addresses selection strategy?
Or even select the input addresses manually?
If you want to manually spend from an address or some addresses of your choice, use coin control.

On desktop Electrum wallet:
To access coin control, click on 'view' on the generally user interface and check ✔️ coins. The coin tab will appear which you can use to freeze UTXOs, addresses and to spend from addresses that you want to spend from.

On mobile Electrum wallet:
You can only use coin control to freeze address, addresses or coins but it can not be used to spend UTXOs.
newbie
Activity: 7
Merit: 5
Assume I have (simplified) the following addresses with BTCs on them

111111 with 0.100 BTC
222222 with 0.200 BTC
333333 with 0.300 BTC
444444 with 0.400 BTC

Now I want to send someone 0.280 BTC.

I go to "Send" tab fill in the target address and amount and click "Pay".
Now Electrum decides automatically from which of my addresses the BTCs are taken.

As far as I can see its always the addresses with the biggest amount. Here 444444.

Why ?

Why not properly do I cleanup and take the money from addresses 111111 and 222222?
If always the biggest amount addresses are taken then users will end up with thousands addresses with micro amounts.

Can I somehow tell Electrum to use another addresses selection strategy?
Or even select the input addresses manually?

Sorry for this newbie question.
Jump to: