1. Gas:
- Unit that measures the amount of computational effort required to execute specific operations on the Ethereum network. From August 5th, 2021 (after London update): better transaction fee estimation.
Total transaction fee = Gas units (limit) * (Base fee + Tip)
---> Miner receives the tip. Base fee is burned.
- Wallet providers will automatically set a recommended transaction fee.
- EIP-1559: Fee market change for ETH 1.0 chain --> making gas fees more predictable.
(*) WHY DO GAS FEES EXIST?
- Prevent bad actors from spamming the network.
- Avoid accidental or hostile infinite loops
(*) WHAT IS GAS LIMIT? --> refers to the maximum amount of gas you are willing to consume on a transaction. A standard ETH transfer requires a gas limit of 21,000 units of gas.
(*) WHY CAN GAS FEES GET SO HIGH? --> Gas space is limited per block
(*) INITIATIVES TO REDUCE GAS COSTS
- Layer 2 scaling: https://ethereum.org/en/developers/docs/scaling/layer-2-rollups.
- New proof-of-stake model: Anyone with at least 32 ETH can stake them and become a validator responsible. who have less than 32 ETH can join staking pools.
- Tool: estimate gas:
- https://etherscan.io/gastracker
- https://chrome.google.com/webstore/detail/blocknative-eth-gas-estim/ablbagjepecncofimgjmdpnhnfjiecfm
- https://ethgasstation.info/
2. Block size
- Each block has a target size of 15 million gas.
- Size of blocks will increase or decrease in accordance with network demand (up to 2x the target block size).
3. Base fee
- Every block has a base fee.
- When the block is mined this base fee is "burned", removing it from circulation.
- Increase by a maximum of 12.5%/ block if the target block size is exceeded.
4. Priority fee (tips)
- Incentivize miners to include a transaction in the block.
- Transactions that need to get preferentially executed --> higher tip.
5. Max fee (maxFeePerGas)
- For a transaction: Max fee must exceed the sum of the base fee and the tip.
- Sender is refunded the difference between the max fee and the sum of the base fee and tip.
Refund = max fee - (base fee + priority fee)
Nhận xét