In the blockchain world, the sending or receiving of digital asset from a certain address is collectively referred to as a transaction. In a transaction, the initiator needs to pay an additional fee, which is also called “miner fee”. This fee is for miners in the blockchain world.
If you want your digital assets to circulate on the chain, which means a transaction to be completed, then you will need miners to package the transaction information and broadcast it in the blockchain network. Since miners’ packaging, broadcasting, and transmission of transaction information will consume hashrate and electricity, the transaction fee can be deemed payment for miners’ efforts.
BTC transaction fees
1. The transaction fee is related to the size of the transaction itself. The larger the transaction volume, the higher the transaction fee should be paid to obtain block confirmation. Under the same other conditions, if there are two transactions of the same size, the transaction with the higher transaction fee will be confirmed by the block faster.
2. The transaction fee is also related to the degree of congestion in the blockchain network. The more congested the network, the higher the transaction fee to be paid to get block confirmation. When the network is not congested, the transaction can be confirmed by paying a small transaction fee. Once network congestion occurs, if you want to confirm a transaction with the same conditions, you need to pay a higher transaction fee.
Transaction Fee = Fees (satoshi/byte) * Size (byte)
Fees: The transaction fee rate, which refers to the fee that the transaction initiator is willing to pay per byte. The higher the fee, the higher the priority of the transaction being packaged.
Size: The transaction volume. The transaction volume is related to the number of UTXOs used in the transaction itself. The larger the number of UTXOs, the larger the volume.
ETH transaction fees
1. The transaction fee is related to the resources that need to be consumed, such as CPU, storage, bandwidth of each node. The more resources the transaction consumes, the higher the transaction fee that needs to be paid to obtain block confirmation.
2. The transaction fee is related to the degree of congestion in the blockchain network. The more congested the network, the higher the transaction fee to be paid to get block confirmation.
Transaction Fee (Gas) = Gas Price * Gas Limit
1. Gas: When you initiate a transfer on the Ethereum chain or call a smart contract to initiate a transaction, you will consume resources on the Ethereum chain. The gas you pay is essentially for the resources consumed to perform a certain operation.
2. Gas Price: Refers to the price that you are willing to pay per unit of gas. The higher the gas price, the higher the priority of the transaction being packaged.
3. Gas Limit: Refers to the maximum amount of gas that you are willing to pay for this transaction. If the gas used is greater than the gas limit set by you, then the transaction will fail; if the gas used is less than the gas limit set by you, then the transaction will succeed. The unused gas will be returned to the user. If the type of transaction initiated is to call a smart contract, the transaction will be automatically terminated when the gas used reaches the gas limit.
1. If the transaction fails, the paid gas will still be consumed and will not be refunded.
2. Transfers for ERC20 tokens can only use ETH to pay transaction fees.