Send transaction with all ether (fees) – EIP 1559

eip-1559etheretherscanfeestransactions

I'm not sure I right understand structure of fees (EIP 1559).

Because I cannot guess what will be base fee for my transaction, 'cause I will not know how much transactions will be in block (base fee is fee per block; but transaction base fee = base fee / number of transaction in block), then change (Txn Savings) will pay back to sender. If I right understand.

And I'm interesting how will I able to send all ethers if network will be returning savings fee every time?

I want my wallet will be empty after I'll sent all ethers to another wallet. And I'm prefer to sign offline transactions.

How will look structure of fee in my case. And is it possible at all?

For example.

This transaction will return 0.000391250761377 Ether (Txn Savings) to sender.

Best Answer

The base fee for a transaction is not the block base fee divided by the number of transactions in the block. Each transaction in the block has to pay at least the full base fee for that block, plus an optional tip (priority fee).

To send all Ether from an account, you have to use the same max fee and max priority fee, so that the full difference between the base fee and the max fee will be paid out to the miner as a tip.

For example, if you have 1 Ether in your account, the current base fee is 50 Gwei, and your transaction uses 21,000 gas, you can use a max fee and max priority fee of 60 Gwei (in case the base fee goes up) for a total transaction fee of 0.00126 Ether, and send the remaining 0.99874 Ether.

Related Topic