Docs
/

Feature / Gas Tracker

In the Celestia ecosystem, the mechanics of gas and transaction fees are integral to its modular blockchain design, focusing on data availability and efficient transaction processing. The fee market, a key feature, employs an auction mechanism that allows users to bid for their transactions to be included in the next block. This is especially critical when network demand is high, ensuring that transactions are processed efficiently and without undue delay.

Transactions specifically aimed at data storage, termed PayForBlobs, are a central aspect of Celestia's operations. These transactions enable developers to publish data on the network, with the fees for these operations denominated in Celestia's native asset, TIA. The calculation of these fees takes into account various factors, including:

  • A fixed cost, which is a static value (65,000 gas),
  • The SparseSharesNeeded for each blob, which indicates the number of shares needed for each blob in the transaction,
  • The Share Size, which is the size of each share, and
  • The Gas Cost Per Blob Byte, a parameter that could be adjusted through governance mechanisms.

For estimating gas, users can use the DefaultEstimateGas function, which estimates the gas based on a linear model dependent on governance parameters such as gasPerByte and txSizeCost. This estimation assumes that the MsgPayForBlobs is the only message in the transaction.

When a user submits any other transaction, they set the gas fee, which is often specified directly by users. The total cost for the transaction is then calculated as the product of the estimated gas limit and the gas price. Users must accurately estimate the gas limit to avoid overpaying, as unused gas is not refunded by the state machine.

Gas Price and Fee Estimation on Celenium

Celenium offers tools to help with fee estimation, tracking gas prices, validating gas usage, and managing other fee-related processes efficiently. For an overview of recent gas price trends, you can check out the Gas Price Tracker Widget on the homepage. This widget displays gas prices as a percentage for transactions set below certain values, based on the last 100 blocks, with prices shown in UTIA.

If you're interested in a more detailed analysis or want to make your own estimates, you can visit the Gas Tracker page by clicking on its widget from the homepage. There, you'll find statistics on average gas prices over different periods, an hour-by-hour gas price heatmap, and a measure of gas efficiency indicating the relationship between the gas limits set by users and the actual gas used. On the left side of the Tracker page, there's a tool for basic fee calculations based on your desired gas limit and the current gas prices, with the formula being quite straightforward: Gas Fee = Gas Price × Gas Limit.

For quick access to the Fee Calculator, Celenium provides a "Run Fee Calculator" option in the developer-friendly Command Center, which can be easily triggered using the CMD + K shortcut on Mac or Ctrl + K on Windows/Linux. This feature makes it easier for developers and users to navigate fee calculations and gas price assessments directly within Celenium's ecosystem.

Links

Claim your ideas or suggestions: Issue Tracker