Gas Costs in Ethereum

Published by Mario Oettler on

Last Updated on 24. March 2025 by Mario Oettler

Each opcode costs a certain amount of gas. This reflects the amount of computing required for each block proposer. Besides computation, storage is another valuable resource. Therefore, occupying storage space also costs gas.

There are different types of memory in the EVM:

  • Storage: This is the data stored on the blockchain. It is permanently stored and therefore most expensive to write to and read from. Writing to an unallocated storage space costs 21,000 gas.
  • Memory: Memory is only used in the context of execution. This can be the Smart Contract or a function. It is deleted when this context is closed. It is therefore much cheaper than storage.
  • Call data: This is for data passed from external calls as parameters to functions.
  • Stack
Categories:

https://blockchain-academy.hs-mittweida.de/wp-content/uploads/2021/04/logo_bcam_rgb_gross.png

Welcome

Blockchain Academy

Continue with credential

No account yet?

Powered by Hidy

Register with Hidy


Register
Sign in

We need the following credential to register:

please select:

To create a new account, we need the following data from you:

We would appreciate the following additional information from you for the creation of your account:

Welcome

Blockchain Academy

Continue with credential

Already have an account?

Powered by Hidy

Sign in with Hidy


Register
Sign in

We need the following credential to log in:

please select: