Skip to main content

Gas Used in a Block

Updated on
Dec 14, 2023

Overview

What is Gas?

Gas is the unit measuring the computation required to execute a specific operation on Ethereum (also used on other chains). The gas price in Ethereum is a dynamic value determined by the supply and demand mechanics of the network. Users pay gas fees, a gas and gas price product, which varies based on the network traffic.

A block in Ethereum has a gas limit; as of now, the target limit is 15 million gas. This limit ensures the blockchains' sustainability and prevents spam transactions. But, this limit can be decreased or increased to 30 million based on the demand.

Whether you are a developer or trader, tracking gas and related information enables you to use blockchain efficiently and economically.

Gas Used Above 90% of Block Limit

We will track the gasUsed field of the Ethereum block and filter for blocks where the gas used is above 90% of the block limit of 30 million gas. So, we will place a QuickAlert for 27 million gas used.

To create our expression, we will need to target one value:

  1. Gas used within a block - We will track blocks where the gas used is more than 27,000,000, which is 90% of the 30,000,000 block limit. This value gets set as the block_gasUsed.
Expression
Deploy
1
block_gasUsed > 27000000
Share this doc