Users need to pay an amount of fees to the miners who maintain the Ethereum network, whenever using the Ethereum wallet from imToken to do any on-chain operations (transfer, call contract, read-in data). These fees are the miner fees.
How to calculate the miner fees
Before knowing how to calculate the miner fees, we must know the following three concepts.
The concept of Gas was introduced by Ethereum. Each operation step in the transaction process requires gas consumption, and the Ethereum system specifies the amount of gas consumption for all operations and contracts. To put it plainly, Gas embodies the "workload" of each transaction. Transactions with a low workload consume a small amount of Gas, and transactions with a high workload consume a large amount of Gas. So Gas is also called the "fuel" of the Ethereum network.
Gas Limit is the maximum amount of gas consumption that the user is willing to set for a successful transaction. If the actual gas consumption exceeds the Gas Limit set by the user, the transaction will fail; if the gas consumption of the transaction is less than the Gas Limit, then the transaction will succeed, and unused gas will be "returned" to the user. (ImToken refers to Gas Limit as Gas in general)
Gas Price is the price that users are willing to pay for each Gas, the unit is GWEI, 1 GWEI = 0.000000001 ETH.
Miner's fee = the amount of gas consumed by the transaction * the unit price of Gas = Gas * Gas Price
So Ethereum's miner fee is calculated by Gas and paid with ETH.
- The miners prefer to pack transactions with higher miner fees. If you want to finish the transaction quickly, please be sure to set the miner fees higher.
- The transaction will consume Gas, no matter whether it is successful or not. This is like driving somewhere, and the car is running out of gas in the middle of the way. Although you didn’t reach your destination, gasoline has been consumed.
- Users can only use ETH to pay miner fees when they are doing transactions on Ethereum wallets, and cannot use other tokens.