Introduction
What is the Filecoin blockchain?
Filecoin is a peer-to-peer network that stores files, with built-in economic incentives to ensure files are stored reliably over time.
Filecoin is making the web more secure and efficient with a decentralized data storage marketplace, protocol, and cryptocurrency. It is a blockchain-based decentralized digital storage and data retrieval method, allowing users to rent unused hard drive space reliably and with confidence.
More information on official Filecoin web page ↗️.
What Is Gas (Filecoin)?
Gas refers to the fee or pricing value required to successfully conduct a transaction on the Filecoin blockchain. Often priced in the smallest and common fractions of the cryptocurrency fil (FIL) - attoFIL - the gas is used to allocate resources of the Filecoin network so that transactions can occur.
The supply and demand between the network's miners determine the exact price of the gas. Miners can decline to process a transaction if the gas price does not meet their threshold for users on the network who seek processing power.
Understanding gas in Filecoin
The concept of gas was introduced to maintain a distinct value layer that solely indicates the consumption toward computational expenses on the Filecoin network. A separate unit for this purpose enables a practical distinction between the actual valuation of the cryptocurrency (FIL) and the computational cost of using the filecoin network. Here, gas refers to the Filecoin network transaction fees, not to be confused with gasoline used to power vehicles.
-
Gas limit
refers to the maximum amount of gas (i.e., number of units of gas) the user is willing to spend on a particular transaction. A higher gas limit means you are willing to spend more gas units to execute a transaction on the Filecoin network. This limit sets an upper limit for the total units of gas the transaction execution will consume. This parameter is measured in units of gas and is not to be confused with the filecoin token. -
Gas fee cap
measured in attoFIL/gas unit, refers to the maximum price of a gas unit the user is willing to spend for the transaction execution on the filecoin blockchain. This works in conjunction withgas limit
to determine the maximum cost of transaction.To summarize
GasLimit * GasFeeCap
will be the maximum amount of fees (FIL) the transaction will cost to the end user. -
Gas premium
refers to the tip (an additional reward) the miner receives to process/execute the transaction. This allows miner to prioritize a submitted transaction and execute it sooner. It is the price per unit of gas (measured in attoFIL/gas) and applied togas limit
. A user will typically payGasFeeCap - BaseFee
as Gas Premium to the miner. -
Base fee
is the price per unit gas (measured in attoFIL/gas) that is consumed for every transaction on the network. This fee is set by the network and depends on the network load.
To help better understand gas here's an analogy, running a real-world car for X
miles may require Y
gallons of fuel,
OR moving X
amount of money from your bank account to your friend’s credit card account may cost you Y
dollars in a
processing fee. In both cases, X
indicates the utility value, while Y
indicates/suggests the cost (fees) of
performing the process of the car trip or financial transaction.
Similarly, a transaction on Filecoin may be worth 50 FIL (X
), and the gas price to process this transaction at that
particular time might be 1/100,000 FIL (Y
).
Filecoin miners, who perform all the important tasks of verifying and processing transactions on the network, are awarded a particular fee in return for computational services. If the gas price limit is too low, miners can choose to ignore such transactions. As such, the price of gas fluctuates (priced in FIL) with supply and demand for processing power.
Learn more about gas in Filecoin network specification ↗️️️️️.
Know how much gas to pay
Knowing the gas values for submitting transaction on filecoin blockchain is important. Not knowing this might mean either of the following things:
- Wasting money paying higher fees than required
- Setting a price too low for the transaction, results in it getting stuck in the network and never getting executed.
To get more accurate insights about gas price required for transaction to successfully execute, using gas trackers is the way to go. Filgas is a gas tracker for filecoin network. A practical tool that will allow users to spend fees more wisely. Filecoin gas, or "filgas," aims to provide a service for fees-related data insights for an end-user on the Filecoin blockchain.
Learn more about Filgas (Filecoin gas estimator tool)