Problem with fee estimation when emptying an account
If you want to empty all the ether in an account, Mist (OS X) requires that you deduct enough from the transaction to cover the maximum fee (typically 0.00605) instead of the estimated fee (0.00105), which is always the cost right now for sending a basic transaction. This makes it difficult to empty an account without leaving dust.
BTW- It would be a really nice feature if there was a button that allowed you to send the maximum amount possible from the account. This is not an uncommon need and it is a pain to try to back calculate out the fees.
+1
It is impossible to completely 'empty' an account now, which is weird imho. I have one with 0.00237742 Ether as a result and it can't be completely emptied.
Agreed - there should be a 'send max amount' button that automatically deducts the fee and then empties the account. MyEtherWallet has this. On Sun, Mar 6, 2016 at 4:55 AM woftor [email protected] wrote:
It is impossible to completely 'empty' an account now, which is weird imho. I have one with 0.00237742 Ether as a result and it can't be completely emptied.
— Reply to this email directly or view it on GitHub https://github.com/ethereum/mist/issues/219#issuecomment-192860844.
The problem is you can't 100% estimate the fee. If you would empty the account to a contract address, then the contract could charge more than the 21k gas.
If the state of the contract internally would change before you send, then it may be even higher, because the contract does something with it.
I could make up such a button, but its not a 100% secure fix
I think it would be ok to have a small note saying that it will only work if sending to a regular account (not a contract). The other alternative would be to allow the user to specify the maximum fee and then have the transaction fail if required fee is higher than the maximum fee. The way it is now is problematic because there is an option for the user to set the fee (faster vs. cheaper) but the transaction fails if the maximum possible fee (not the user selected fee) + amount is greater than total in account. This is not the expected behavior. Finally, it is impossible to empty accounts right now and people hate having dust addresses - there must be some solution.
On Mon, Mar 7, 2016 at 5:51 AM Fabian Vogelsteller [email protected] wrote:
The problem is you can't 100% estimate the fee. If you would empty the account to a contract address, then the contract could charge more than the 21k gas.
If the state of the contract internally would change before you send, then it may be even higher, because the contract does something with it.
I could make up such a button, but its not a 100% secure fix
— Reply to this email directly or view it on GitHub https://github.com/ethereum/mist/issues/219#issuecomment-193202239.
+1
Emptying an account is very difficult now.
The latest develop of the wallet repo has that already in. The only problem is that the wallet will think then that its a failed tx, as it used exactly the gas it provided (our mechanism right now to deter failed tx), but it didn't fail actually.. So we have to think of how we better show that
Implemented it
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.