Minimizing the cost of gas when claiming EOS using MyEtherWalletsteemCreated with Sketch.

in #eos9 years ago (edited)

Safety First:

Please beware of phishing websites. Do not enter your key on a website you arrived at by clicking a link. Use bookmarks. Always triple-check the domain. You are responsible for your safety & security.

Also, please take some time out to read through the Inherent Security Risks of MyEtherWallet, by @sandwich

Understanding the claimAll function

The steps on EOS.IO website suggests you select claimAll to claim your ERC-20 EOS Tokens.

claimAll.png

This function essentially runs the claim() function in a loop for each contribution period that has ended. And each time it executes the function it needs gas. This is a screenshot of me claiming my tokens at the end of Period #2 when my only contribution was during Period #0:

myclaims.png

As you can see it has also tried to claim EOS during Period #1 and Period #2, returning with 0 EOS since I did not make any contributions. This means I have paid 3 times as much gas as I could have paid if I claimed only for a specific window.

Claiming for a specific period

If you are sure in which period you made your contributions, claiming for a specific period is really easy. Most of the steps are taken from @sandwich's The Complete Guide :

  1. Go to https://www.myetherwallet.com/#contracts

  2. Under heading Select Existing Contract is a dropdown, select EOS Contribution

  3. Click Access

  4. Under the "Read / Write Contract" heading, in the dropdown select claim
    claim.png

  5. Under day type in the period number in which you made your contribution. Example: for period #7 you would simply type 7

  6. Load your wallet

  7. Click Unlock button

  8. Click Write button

  9. Set Amount to send to 0 and allow the wallet to suggest a Gas Limit. If it does not auto-populate, enter 90000 or more. If your TX fails, increase Gas Limit.

  10. Click Generate Transaction button

  11. Check the details of the transaction, and if you are confident with the details you have entered, click Yes, I am sure! Make transaction.

  12. If all went well, a green bar will appear at the bottom of the page including a link to your transaction on the blockchain.

Below is screenshot of my claim for Period #3. It returns with a single line of 0 EOS Tokens.
claim.png

Success!

Sort:  

Thanks for the great guide on reducing our gas fees when claiming our EOS tokens! :)

It's a shame that a bunch of gas is being wasted each day because of the recommendation to 'claim all'. The total gas price will be even more horrendous closer to the end of the ICO, imagine paying gas 300 times even though you just invested in one of the ICO days - so that 31 cent gas transaction cost would turn into $93 (.31 * 300)!

The recommendation for claimAll() is to simplify the already arduous process.

If I don't remember which periods I contributed, is there a way to find out without using claimAll ?

Go to: https://etherscan.io/address/xyz
(where xyz is your wallet address) - search for the eth transaction you sent to EOSCrowdSale. See the age column that shows "days ago" that this was sent. For example "4 days ago"
Now go to: https://eosscan.io/ and see what period we're currently at. If its say, 291, then using above example, subtract 4 from the current period and that should be your claim day (or either side of it)

Damn I wasn't aware of this, no wonder why my gas kept going up. Will resteem and upvote

Thank you, @koyn. For sharing this post. I've been looking for a solution to reduce the gas price forever on claiming the EOS tokens!

No problem!

Thanks for the tip. Just claimed my tokens on 17th period.

I'm curious though. Some of the claimAll() do not seem to execute in a loop.

For instance this transaction ran in a loop and cost $3.19, whereas this one ran only once and cost only $0.43, though both used claimAll. Why is it?

You make a good point. My guess is that the claimAll() function will not claim from the same window twice. For example, suppose period #10 has just ended. If this is the first time I'm running claimAll() it will run in a loop for every period between period #10 to period #0. Then 3 days later when period #13 has ended, claimAll() will run in a loop between period #13 to period #11. It will not bother running through periods #0 to #10 again.

At least this is my guess anyway, someone else may be able to confirm

Yes, that is exactly how it works. claimAll will only attempt to claim unclaimed periods

pseudocode: periods[n] === false

Very well and professionally explained
Thank you very much for your help and support
Keep it up

Wow! This is awesome @koyn. I didn't know about that. Thanks.

thanks, very helpful, otherwise I would waste a lot of fee on claiming my daily contribution.