Tokens

Gas

A unit measuring the computational work an Ethereum operation requires, from a simple transfer to a complex contract call.

Gas is how Ethereum prices computation. Every operation, from storing a value to calling another contract, costs a set amount of gas. A plain ETH transfer costs 21,000 gas. A token swap on a decentralized exchange might cost ten times that. The busier the network, the more each unit of gas costs to buy.

The design exists to stop abuse. Because every step has a price, no one can loop a contract forever or spam the network for free — they would run out of funds first. Gas also separates the amount of work, fixed by the code, from the price per unit, set by the market.

Related terms