1

After messing around on the Remix IDE, I realized that initializing a uint (to any value other than 0) costs about 20,000 gas. Because of this, an ERC-20 token transfer to an account with balance 0 must cost at least 41,000 gas (transaction + initialization).

Now, is the behavior the same for an ETH transfer to a new address or would it cost less gas?

2

21000 is the gas limit for standard transactions for all the ETH addresses.

Initializing + making the transaction only impact the ERC-20 or other smart contract which needs to store data on chain, an ETH address does not need to be initialized.

  • 1
    Looking at transactions on etherscan.io, you seem to be correct in saying a transfer of ETH always costs 21000 gas. This must be because it happens at the protocol level and not on the EVM. – Jonah May 10 '18 at 0:10
0

Depends on the contract implementation.

I just checked LivePeer and OmiseGo, and there a transfer costs around 37,000 gas on average.

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.