Glossary definition

Gas optimization

Gas optimization reduces the execution or deployment cost of EVM code while preserving its intended behavior, readability, and security properties.

also: Solidity gas optimization, gas efficiency · reviewed July 22, 2026

Gas is a transaction fee on the Ethereum blockchain. Every time a transaction is sent to the blockchain, a gas fee must be paid for the computational resources used by that transaction.

Gas is expensive. It is in our best interest to create contracts that are as gas-efficient as possible without compromising security.

Gas optimizations refer to:

  • doing what is cheap and avoiding what is expensive in terms of gas costs on EVM blockchains
  • doing what needs to be done as cheaply as possible

Ethereum’s gas documentation explains how computational work, fees, and execution cost relate.