gas
Gas Model
Fueling the decentralized computer.
Gas is a unit of measurement for the computational effort required to execute an operation. Every opcode has a fixed gas cost (e.g., ADD costs 3 gas). This prevents infinite loops and DDoS attacks on the network. If a transaction runs out of gas, all changes are reverted, but the gas is still paid to the miner.
Execution Simulation
Assistant Note
"Currently at PUSH instruction. It's going to place a value on top of the stack."
Program
10 bytesStack
LIFO0 / 1024
Memory
0 bytes00-0708-1516-2324-31
Gas Meter
Consumed0 / 1,000,000
Last Op Cost
-0
Refund
0
* Gas prevents infinite loops and DDoS. SSTORE is the most expensive opcode (20,000 gas for new slots).