Gas

Beginner
Community Submission - Author: Obasi Ifegwu
The term gas refers to the pricing mechanism used on the Ethereum network. Such a mechanism calculates the costs (fees) for performing a transaction or executing a smart contract┬áoperation. While ether (ETH) is the currency that fuels the Ethereum network, Gas is a special unit that is used to measure how much ÔÇŁworkÔÇŁ (computational resources) certain task requires. Naturally, demanding tasks will have a higher gas cost than other operations that require less computational resources.

Note that fees are still paid in ether (ETH), but gas and ETH are two different things. Simply put, computational tasks are measured in terms of ÔÇťgas costÔÇŁ. On the other hand, each unit of gas has a ÔÇťgas priceÔÇŁ that is defined in ether (ETH). As such, every transaction has a particular ÔÇťgas priceÔÇŁ for each unit of gas.┬á

Put in another way, the gas cost is the amount of work, and the gas price is the price paid for ÔÇťeach hourÔÇŁ of work. The relation between these two, along with the gas limit, defines the total fee for an operation or transaction.

So if you need your transaction to be validated quickly, it makes sense to pay higher gas prices, so that validators (miners) are incentivized to verify your transaction first than others. Similarly, setting a low gas price can cause your transaction to be stuck as miners wonÔÇÖt have any incentive to validate it.

The gas pricing mechanism is important because it guarantees that fees are being charged in a fair and appropriate way. So it prevents resources from being wasted on operations that are not valuable to the Ethereum network.

It is worth noting that because the gas price is made of very small numbers, they are usually expressed in ÔÇťgweiÔÇŁ instead of ETH, where 1 gwei is equivalent to 0.000000001 (or 10-9) ETH. You can find the other denominations of ether here.
Zdie─ża┼ą pr├şspevky
Súvisiace glosáre
Zaregistrujte si ├║─Źet
E┼íte dnes vyu┼żite svoje znalosti v┬ápraxi otvoren├şm ├║─Źtu Binance.