You need to pay ETH as gas fees when you start a transaction on Ethereum with an ETH wallet, and the gas fees can only be paid with ETH. The Ethereum network will prioritize the transactions with higher gas fees.
How to set gas fees?
There are currently two gas fees mechanisms on Ethereum, EIP-1559 and Legacy, both of which are supported by imToken. So there are two tutorials for setting up gas fees in this blog, please find the corresponding tutorial below according to the settings page you are on.
EIP-1559
imToken supports two ways of setting gas fees: Set priority and Customize
Set priority
- There are three transaction speeds: "Fastest", “Standard” and "Economy". Different speeds means different transaction confirmation times, the higher the gas fees you pay, the faster the transaction is confirmed.
Customize
- You can manually set gas fees by modifying MaxFee, MaxPriorityFee, and Gas through the Customize feature.
Tips:
- imToken will set a Gas based on the type of transaction you’re making to ensure its success and does not recommend modifying it. The transaction is likely to fail if the Gas is too low.
- Make sure MaxFee ≥ BaseFee + MaxPriorityFee.
Note
- The gas fees are charged by the Ethereum network rather than imToken.
- Even if the transaction fails, the gas fees you paid to Ethereum network will not be refunded.
How are gas fees calculated on EIP-1559?
Before calculating, you need to know the following 5 concepts first.
- Gas: the Ethereum network consumes computational resources to execute each transaction, and Gas is the unit of measuring resources.
- BaseFee: the lowest price of Gas calculated by the Ethereum network to ensure a successful transaction.
- PriorityFee: the tip you pay for each unit of Gas to speed up the transaction.
- MaxPriorityFee: the maximum tip you pay for each unit of Gas.
- MaxFee: the maximum price you pay for each unit of Gas
Gas Fees = Units of Gas Used * (BaseFee + PriorityFee)
You can think of the process of transferring a certain amount of tokens as driving a car, and the gasoline consumed during the journey is Gas.
The costs(i.e. the gas fees) are the gasoline consumed for the journey multiplied by the price of gasoline (BaseFee + PriorityFee).
BaseFee is calculated by the Etheruem network to ensure the car arrives at the destination successfully; PriorityFee is the tip you set to speed up the car's arrival. The more the tip you pay, the faster the transfer will go through.
The actual gas fees spent are not available until the transaction is confirmed on Ethereum, and what you see on the transfer page is imToken's estimate of the gas fees based on the estimated gas consumed by the transaction and the MaxFee you are willing to pay for Gas.
Legacy
imToken supports two ways of setting gas fees: Set priority and Customize
Set priority
- There are two transaction speeds: “Standard” and "Slow". Different speeds means different transaction confirmation times, the higher the gas fees you pay, the faster the transaction is confirmed.
Customize
- You can manually set gas fees by modifying Gas Price and Gas through the Customize feature.
Tips: imToken will set a Gas based on the type of transaction you’re making to ensure its success and does not recommend modifying it. The transaction is likely to fail if the Gas is too low.
Note
- The gas fees are charged by the Ethereum network rather than imToken.
- Even if the transaction fails, the gas fees you paid to Ethereum network will not be refunded.
how are gas fees calculated on legacy?
Before calculating, you need to know the following 2 concepts first.
- Gas: the Ethereum network consumes computational resources to execute each transaction, and Gas is the unit of measuring resources.
- Gas Price: the price you pay for each unit of Gas
Gas Fees = Units of Gas Used * Gas Price
You can think of the process of transferring a certain amount of tokens as driving a car, and the gasoline consumed during the journey is Gas.
The costs(i.e. the gas fees) are the gasoline consumed for the journey, Gas Used, multiplied by the price of gasoline, Gas Price.
The actual gas fees spent are not available until the transaction is confirmed on Ethereum, and what you see on the transfer page is imToken's estimate of the gas fees based on the estimated gas consumed by the transaction and the Gas Price you are willing to pay for Gas.