2

I tried making a eth transaction to poloniex. However, I keep getting the error that I ran out of gas. How can I avoid this? Do I have to keep increasing the GWEI? Until what number?

Here a screenshot from etherscan:

enter image description here

  • Could you provide some code? – user9402 Jun 9 '17 at 12:15
  • @Eric I added a screenshot form the error I am getting. – Walter Monecke Jun 9 '17 at 12:19
  • Getting closer, could you show the actual contract/function code? – user9402 Jun 9 '17 at 12:37
  • @Eric where can I see this? – Walter Monecke Jun 9 '17 at 12:55
  • what exactly you are trying to execute? Show us txid, contract function that you are trying to execute. What gas limit you are setting and gas price. Have u tried to estimate the current gas cost for the contract you are trying to execute. – rstormsf Jun 9 '17 at 17:28
1

I found this whole "how much gas do I need?" issue very annoying as well.

I think I figured it out, and the amount is different depending on whether you are sending ether or sending tokens...

  1. Sending Ether to Another Address: It costs maximum 0.001 ether for gas fee when sending ether to another address, so always subtract 0.001 ether from the ether amount you are trying to send to ensure that you have enough ether for gas fee! It may not be exactly 0.001 ether that is eaten up in gas fee, but if you use 0.001 as a standard, you will find that if you are left over with any ether still in the sender address that it should be a very very small amount.

  2. Sending Tokens to Another Address: It costs 0.01 ether to send ERC-20 tokens. So when sending tokens, make sure that you have at least 0.01 ether lying around to pay your gas fee!

Hope this helps. It seems to work for me :)

Regards, Homer Simpson

|improve this answer|||||
  • 2
    Purely anecdotal and obviously no longer holds true. – Madbreaks Jan 15 '18 at 20:21
  • 1
    Incorrect answer, with no supporting evidence. – John Murphy May 9 '18 at 9:58
0

I am curious what could the transaction to Poloniex be, it seems not to be Ether transfer (gas is not 21000) nor ERC20 token transfer (ETH value is not zero).

Gas fees vary, so it is not forever safe to recommend a single constant, but at the time of writing this safe median gas price is considered 21 GWei, with confirmation expected within 2 blocks (about a minute). As per Eth Gas Station safe low (if you do not mind waiting for hours) is currently 1 GWei gas price (unsafe low, when you do not know if the transaction gets through in reasonable time or at all, is zero). In this view your gas price (~20 GWei) is more than enough.

What is too low and what caused the error in your case is gas limit (as indicated by the red "Out of gas"). It is the maximum value you are willing to pay for the transaction. If the actual gas consumed by the transaction surpasses this value, the transaction fails. Lowering this value does not save you money; it is only an insurance that the transaction does not get crazy and consume all your Ether. For Ether transfer the cost has been set to exactly 21000 gas, ERC20 token transfer takes maybe 100-150k gas, depending on the particular smart contract, so your gas limit should be above that.

|improve this answer|||||
0

use 100000 gwei the metamask man said and it solved my issue

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.