Definition
Gas is an accounting unit for computational work, used by Ethereum and other compatible execution environments. It is not itself a cryptocurrency. Operations consume different quantities of gas based on protocol rules. Transferring an asset and executing a complex contract can therefore require different amounts of work even if their monetary values are similar.
How It Works
A transaction specifies a gas limit, which caps the execution work it may consume. The execution fee depends on gas used and the effective price per gas, commonly quoted in gwei on Ethereum and paid in ETH. Metering work helps limit resource consumption and makes users pay for computation that validators must process.
Key Considerations
A transaction can consume gas even if contract execution fails, because the network still performs work. Unused gas allowance is not the same as consumed gas and is generally not charged as execution work. Network demand influences prices, while contract design influences required gas. A gas estimate is conditional on the transaction and state; it does not guarantee successful execution.