Author

Topic: Using specific input to pay fees on Electrum (Read 64 times)

legendary
Activity: 2758
Merit: 3408
Join the world-leading crypto sportsbook NOW!
December 14, 2022, 12:55:52 PM
#5
@Charles-Tim @hosseinimir93

I only wondered about coin chains. Because I'm not sure how it worked, but hosseinimr93 suggests that they are all combined together anyway so then my question is no longer important... and I will send the coin I need as fee (and just spend it all as a fee).

@o_e_l_e_o yeah thanks for that explanation, which helps me understand a bit more (after 6 years, haha). I'd always somehow assumed that coin trails are quite specific... and "taint" goes deeper than address linkage, to actual input/coin linkage.

To offer an explanation of why I asked or what I thought as I asked -- in my mind, and again, I don't mind sounding dumb here:
Inputs A, B, C (let's say) come from sources A, B, C, all sitting on the same address. I don't know these sources, but it doesn't matter, as all these inputs will be sent to Entity X, Y, Z, and I am only a "custodian" that will never need to declare the source inputs. MY address merely hosted it.

Input D (which I intended to use for fee) is from my own source, on a different address, which I may need to verify and prove if need be. I figured, if I only used input D to pay the fee and the change is sent back to me from input D, that's fine.

But I now understand it doesn't work that way. Everything is combined, so I will have to send the fee separately... I did not want to touch the Inputs A, B, C, or the balance on the address but it's probably more cosmetic than anything else.

Hope that made sense, I'll lock topic. Thank you all!
legendary
Activity: 2268
Merit: 18492
December 14, 2022, 12:52:15 PM
#4
I failed to account for fees, however, and instead of sending an additional amount to one of these inputs, I'd prefer to simply use another input to pay for fees, leaving all the spend inputs intact.
So include all the inputs you want, add an extra input to cover the fees, set the outputs you want, set the fees you want, and the left over from the extra input will be returned to you as change.

Is there a way to do this? Coin control only seems to let me select inputs to use, but not to determine which is used to pay for fees.
There is no way to select this, and indeed, no such thing. When you have a transaction with multiple inputs and multiple outputs, it is impossible for anyone to say which bitcoin ended up where.

At a protocol level, your fee is simply whatever amount of bitcoin you don't specify an output for. There is no "fee" field in your transaction; it is simply whatever is left over. And so there is no way to assign specific bitcoin to the fee (or indeed to any output).

Or are all inputs combined anyway, before being split up?
Essentially, yes.
legendary
Activity: 2324
Merit: 5033
Non-custodial BTC Wallet
December 14, 2022, 12:06:25 PM
#3
When you use multiple inputs in a single transaction, there are all combined together.
It doesn't make sense to say which of the inputs has paid the transaction fee and which of them has been sent to the recipient(s).

May I ask what you are trying to achieve?
legendary
Activity: 1498
Merit: 4776
December 14, 2022, 11:55:57 AM
#2
You have several inputs, you want to use all in a transaction, using another input for the fee, so that remaining balance after the fee is deducted would be on the change address? The other input you used for the fee and the remaining coins sent to change address are still going to be seen on blockchain if privacy is what you are trying to achieve.

Or you mean the input that would be used for fee would be from another wallet entirely? Why not first send the coin you want to use as fee to the wallet you want to spend the several inputs first and then make your transaction.
legendary
Activity: 2758
Merit: 3408
Join the world-leading crypto sportsbook NOW!
December 14, 2022, 11:38:56 AM
#1
Hey. Sorry if there's already an answer (and please point me to it). And apologies in advance if this ends up being a trivial query...

I need to make a batch transaction using several inputs. They will be specific amounts that use up 100% of the input coins.

I failed to account for fees, however, and instead of sending an additional amount to one of these inputs, I'd prefer to simply use another input to pay for fees, leaving all the spend inputs intact.

so...

Inputs A, B, C, D... to be used to spend, plus Input 1 to pay fees (any balance from this sent back to me).

Is there a way to do this? Coin control only seems to let me select inputs to use, but not to determine which is used to pay for fees.

Perhaps, more importantly, does it make a difference in the coin trail? Or are all inputs combined anyway, before being split up?
Jump to: