DEV Community

Cover image for WHAT IS GAS IN BLOCKCHAIN?
Clara Situma
Clara Situma

Posted on

WHAT IS GAS IN BLOCKCHAIN?

clara_situma-blockchain-gas_fees

Whenever a transaction is executed on a blockchain, a miner or validator—someone operating the blockchain software—receives a small amount of the blockchain's currency as compensation.

The amount they're paid depends on the gas fees associated with the transaction.

Gas is a unit of measurement that quantifies the computational effort required to execute a transaction. The more complex the transaction, the higher the gas fee required. For example, sending Ether (ETH) typically incurs a low gas fee, whereas minting a Non-Fungible Token (NFT) demands a higher fee due to its complexity.

Additionally, the overall demand on the blockchain influences gas prices; more transactions and higher activity levels mean higher gas fees, as the network becomes busier and more competitive for processing power.

The cost of a transaction is determined by the formula: GAS PRICE * GAS USED = TRANSACTION FEE. The "gas price" is the amount of currency (e.g., ETH) that one is willing to pay per unit of gas, and the "gas used" represents the total amount of gas necessary to complete the transaction.

clara_situma-blockchain_gas_fees

Top comments (0)