The gas fee dispute has been going on for many years. Now that Ethereum is about to be converted into a pos chain, the biggest expectation is that the gas fee can be reduced to a very low level. Why?
Because the processing efficiency of pos is much greater than that of pow, and the cost of network resources is low enough, it is just that the verifier needs to mortgage ETH to earn block rewards. The “hardware” cost of the network itself has dropped many times.
After Ethereum transfers POS, how much can the gas fee be reduced? Curiosity drives me to try predictions from a variety of angles.
The algorithm of the gas fee is the gas price multiplied by the gas consumption. The unit price of the gas price is not an order of magnitude in the pos and pow chains. The gas consumption is related to keywords such as transaction size, contract size, block size, and priority transaction tip.
First, let’s disassemble the gas fee on the pow chain in detail.
In the gas price assuming the above price.
We open the data packed in a block.
In this block with a height of 14454322, a total of 62 transfers and 19 contract calls are packaged. Under normal circumstances, the transfer price is low, and the contract call price is high.
These transactions were finally calculated to be around 0.161922 ETH.
Looking at the size of this block and the unit price of gas,
This block finally packs 31965 bytes of data, and the unit gas price is around 27gwei.
Because blocks have a base size, the base size and transaction size add up to the block size. We didn’t have time to check the byte size of all the transaction data and add them up. I tried to find the empty block and found that the size of the empty block is about 540 bytes.
That is, the block above can be calculated, and the size of all transactions is 31425 bytes.
Through the data of eth.gas.station, it can be found that the average transaction cost is about $1.96. The ETH price at the height of 14454322 is around $3,100, and at $3,100, the transaction gas fee in the block is around $500.
In this way, the 62 transfers in the block cost about $122, and the remaining 19 contract calls cost $378.
Why does 19 contract calls cost $378? Through transaction query, these call contracts are all involved in opensea’s nft interaction and uniswap v2 token buying and selling. The average gas consumption of these transactions is $20 per transaction. 19 transactions, only The figure of $378 appeared.
From the above data, on the Ethereum chain, saving 3.1 trillion data, the price reaches $500. If the unit price of gas rises, the price will be outrageous.
From such expensive data, let’s calculate how the data would look if Ethereum merged?
First of all, let’s look at the gas price on Kiln, the test network after the merger of Ethereum. At present, the transaction volume on Kiln is relatively low. This chain that uses the beaconchain mechanism is mainly to test the merged data and the operation after the merger. Because the beaconchain has not yet carried out the actual transaction package operation, just to synchronize some data. So it only works on Kiln.
First we open a block with only 1 transaction.
This block is 119605, the block size is 627 bytes, and there is 1 transaction, but this block has no transaction gas consumption.
Here we can see a key piece of information, the gas unit price has been reduced to 0.000000007gwei. And because this packaged 1 transaction is a reward distributed to the validator address, it is not included in the transaction. Therefore, such a block can calculate the size of a block without other transactions. In order to ensure a variety of situations, by querying the empty block, it is found that the size of an empty block is still 540 bytes.
Since there are fewer transactions now, we find a block that packs 10 transactions.
However, it is found that the transactions in this block are all transactions that do not consume gas, that is, some “system transactions” on the chain. So I looked for some transfer and contract call transactions in the transaction browser.
In a 40ETH transfer, we found some data showing that
Priority Fee / Tip
Transaction Burnt Fee
Gas Used by Transaction
21,000 | 100%
In this transaction, 21,000 gas was used, a total of 0.0000168 ETH, and the price was about $0.052.
And we queried the block packaged by this transaction. There are 6 transfer transactions in the block, which cost a total of 0.0001008 ETH, or about $0.312. These 6 transactions occupy a total of 730 bytes, and each transaction is about 120 bytes.
To find a comparison, we continue to look for some contract call records. Through the query, I found the cost of one contract upload, one contract call and token minting.
The above is a transaction generated by a token contract. The transaction uses 0.021 ETH. Because the contract occupies about 6,000 bytes of space, it uses 1,120,000 gas, which is a huge cost in the pos network.
In this contract, 6 user accounts spend a total of 0.006 ETH after successfully calling the contract, each call is about 0.001 ETH, at the price of ETH 3000 US dollars, about 3U, this price is also due to the relatively large contract size, which is caused by gas Higher fees.
Look at coin minting again. In a dai stablecoin minting contract, a minting of dai costs only 0.000036 ETH as shown in the figure below.
The size of this transaction is around 200 bytes.
To sum up, after switching to POS, the daily transfer fee of users is extremely low, and the gas fee will be relatively high when the project uploads some larger contracts, and users calling such contracts will also cost more gas.
But compared with the cost of the pow chain, the gas consumption of pos is many orders of magnitude worse.
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/how-much-can-the-gas-fee-be-reduced-after-ethereum-is-converted-to-pos/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.