Transaction
Last updated
Last updated
Gas refers to the unit that measures the amount of computational effort required to execute specific operations on the Ethereum network.
Since each Ethereum transaction requires computational resources to execute, those resources have to be paid for to ensure Ethereum is not vulnerable to spam and cannot get stuck in infinite computational loops. Payment for computation is made in the form of a gas fee.
The gas fee is the amount of gas used to do some operation, multiplied by the cost per unit gas. The fee is paid regardless of whether a transaction succeeds or fails.
Gas fees have to be paid in Glide native currency (GLDR). Gas prices are usually quoted in gwei, which is a denomination of GLDR. Each gwei is equal to one-billionth of an GLDR (0.000000001 GLDR or 10-9 GLDR).
For example, instead of saying that your gas costs 0.000000001 GLDR, you can say your gas costs 1 gwei.
In short, gas fees help keep the Ethereum network secure. By requiring a fee for every computation executed on the network, we prevent bad actors from spamming the network. In order to avoid accidental or hostile infinite loops or other computational wastage in code, each transaction is required to set a limit to how many computational steps of code execution it can use. The fundamental unit of computation is "gas".
Although a transaction includes a limit, any gas not used in a transaction is returned to the user (i.e. max fee - (base fee + tip)
is returned).