Gas Prices & Nonces

If you have interacted with a smart contract on Ethereum Mainnet, you have probably heard of gas or had to pay gas for your transaction. Gas is typically measured in gwei. Demand for block space on Ethereum Mainnet currently outpaces its supply, so the richest users tend to pay a premium to put their transactions through first. Many believe this will likely be an end-state for many of the monolithic blockchains existing today that claim to solve scaling. Block space will continue to be a premium and as more users are onboarded, the richest users will outbid others for block space.

If you’re like me and counting your coins, for low priority transactions, you can edit how much gas you’re willing to pay for the transaction through Metamask. This sounds nice if you could keep sending limit gwei transactions where the sequence the transaction was submitted does not affect the execution order; you would never have to pay high gas fees again. However, because of something called a transaction nonce, this is not possible.

A nonce is what the Ethereum Virtual Machine uses to keep track of the number of transactions an address has sent, the virtual machine does not let a pending transaction with a higher nonce execute before one with a lower nonce e.g. transaction with nonce 2 will not execute before a transaction with nonce 1.

Subscribe to KozukiOden
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.