Still not sure how the fees get applied, surely miners are not going to sign my 2kbyte transaction out of goodness of their heart anymore...
EDIT2: Okay, got 1 confirmation already and it appears a fee of 291.594 sat/B or about 18USD was paid automatically by Electrum. Still wondering how that was determined.
When you sweep, Electrum just treats this as though it were creating a 'normal' transaction from the wallet. Simplified process goes something like:
- Find all the UTXO's on the blockchain that are controlled by the private keys being swept and use them all as inputs... giving you a "TotalIn" amount of BTC
- Set the entered receive address as the output target address.
- It then uses whatever fee setup you have configured to set the fee for the transaction. In your case, you had Dynamic Fees enabled, so it would have received a notification from the Electrum Server Network regarding the current fee rate required (in BTC/kB) and then calculated the total fee based on that fee rate and your generated transaction size. It would then subtract that fee from the "TotalIn" amount to create "TotalOut" amount.
- "TotalOut" amount assigned to output target address.
- Transaction gets signed by the private keys to prove ownership.
- Transaction gets broadcast.
- Bitcoins arrive in new address