Editor's Note: This article comes fromCoin Encyclopedia (ID: coinwiki)Editor's Note: This article comes from
Coin Encyclopedia (ID: coinwiki)
Coin Encyclopedia (ID: coinwiki), Author: A Poplar X, reprinted by Odaily with authorization.
As we all know, after the DeFi boom last year, the average Gas price (Gwei) of the Ethereum network began to soar significantly. It is almost normal for Gwei to exceed 100, and there are some extreme cases of more than 400 in individual cases, and the cost of a single transaction can even be as high as $10 or more. .
Just recently, the EIP 1559 proposal for the reform of the transaction fee mechanism, two and a half years after it was proposed by V God in July 2018, will finally enter the key large block testing stage, and it is said that it is likely to be completed around the middle of this year. Implement deployment.I believe that many friends have heard about "EIP 1559", but they may not know what it is and how it will affect the future development of Ethereum. As it may be the most worthy of Ethereum in 2021 A proposal that I am concerned about, today I will take you to understand EIP 1559 thoroughly.What is EIP 1559? What problem does it mainly solve?The average Gas price (Gwei) of the Ethereum network has been rising all the way. The most direct must be the poor user experience under the high transaction fees. This has almost become an "unbearable burden" for ordinary users when using Ethereum, which is obviously not conducive Healthy development of the Ethereum network.At the same time, this situation has allowed Ethereum miners to earn a lot of money: at present, the average income of each block of Ethereum is about 8ETH (some block income even exceeds 10ETH), and the system block reward is 2ETH , the remaining 6ETH is fee income, that is to say, the fee income exceeds the block reward by three times, but in 2018 it is only 10% of the current average.This transaction fee is much higher than the block reward, which actually brings risks to the security of the Ethereum network. When the transaction fee becomes the main part of the miners' income, because of the huge fluctuation of the transaction fee itself, the miners' investment in computing power also fluctuates in pursuit of profit, and the security of the network will also fluctuate accordingly, thus increasing the Ethereum network security. The risk of the network being attacked by 51% (however, according to senior POW miners, this statement may not necessarily hold water - the development track of Bitcoin itself is that the income of miners gradually moves towards pure transaction fees, and miners are all profit-seeking Yes, miners can immediately switch to ETC if the income of Ethereum fluctuates, drops, or the equivalent algorithm currency of ETC explodes. Because Vitalik did not explain the reasons for this "security threat" in detail, so it is a matter of opinion).
V God once tweeted specifically about the current situation of soaring transaction fees, saying that the continued high transaction fees may threaten the security of Ethereum, and emphasized that "the EIP 1559 proposal can solve this problem."
Therefore, in order to improve the user experience of Ethereum and at the same time ensure the security of the Ethereum network, alleviating network congestion and reducing transaction fees have become the top priority. However, in order to fully understand the key to the EIP 1559 solution, we first need to review the transaction fee mechanism of the Ethereum network.
As we all know, a transaction fee in the Ethereum network = Gas (Used) * Gas Price (Gwei), where:Gas is the total amount of Gas consumed by the transaction. Generally, the amount of Gas consumed by each transaction is fixed;Gas Price (Gwei) is the price we are willing to pay for each unit of Gas in this transaction, so it is the key to directly determine whether the miners are willing to package the transaction quickly;The current Gas Price (Gwei) is mainly a "bidding" game - the Gas Limit capacity of each Ethereum block is fixed, that is, the pit space is limited, so naturally whoever bids the most (Gas Price is higher), whoever The transaction will be packaged into the block for confirmation first.From the perspective of the game, in this "bidding" mode, due to insufficient reference information during congestion, only subjectively vague cost estimates can be made. Naturally, in order to ensure that their transactions can be packaged and confirmed quickly, they will Your own Gas Price (Gwei) is constantly increased to surpass other users who are waiting to be packaged.In the same way, other people will also compete to increase the price, so that they repeatedly "outcry" each other, forming a "vicious auction competition" to some extent, which makes the Gas Price (Gwei) deviate from the normal range at this time, resulting in a high price. The dilemma of handling fees (it does not even rule out that miners consider sending a large number of dust transactions to boost transaction fees in disguise from the perspective of interests).Some friends may say, then increase the number of pits and directly increase the Gas Limit of each ether block, isn't it over? It’s not that it hasn’t done this before. The Gas Limit of Ethereum has actually been expanded more than once.In September 2019, the Gas Limit of the Ethereum network was increased from 8 million to 10 million, and in June 2020, it was increased from 10 million to 12 million again. However, it turns out that simply increasing the block capacity cannot essentially solve the problem:The current block of Ethereum is not congested all the time. The "scientists" who grow vegetables know best that there is no congestion in the early morning and other free periods. The Gas Price (Gwei) is relatively reasonable, and even only congestion 1/5 of the time, only when there is a demand such as UNI airdrops, this kind of "auction congestion" situation that crashes will appear.The data level also supports this view. The market’s demand for block space is actually dynamic and obviously fluctuating—blocks in most periods of time are actually half full (less than 10 million Gas), while the remaining blocks are It is not enough to meet the demand even if the blocks are full.To put it bluntly, in the "auction" mode, when everyone's transaction needs collide, this kind of vicious competition will only have the reverse effect of "instead of sending carbon in the snow, but adding ice", resulting in "more traffic jams, but there are still traffic jams." The abnormal situation of "low cost, non-congested time" appears.At the same time, the unlimited expansion of the block will also increase the burden of running the full node (BSV: I have a deep understanding of this, although I am a counterexample-Ethereum is particularly congested when it is congested, and it is useless to enlarge the block, and I, I can't fill my empty big blocks at any time...), which is also not conducive to the development of the Ethereum network at the decentralized level.Therefore, strictly speaking, how to solve the pain points of congestion and high handling fees in the existing situation is to improve the utilization rate of the Ethereum block network - to balance the real-time user transaction needs in the market, and to arrange peak shifts, similar to the Ethereum network. The adjustment of "shaving peaks and filling valleys" all the time, and one of the keys is naturally the reform of the "auction" mode.At this point, you may have already guessed the solution of EIP 1559: the solution of EIP 1559 is somewhat similar to the electric power bureau’s pricing of electricity prices during the day and night according to demand – when the demand for electricity is strong during the day, the electricity price will be higher. ; The demand for electricity is cold at night, and the price of electricity will be lowered.
In this way, through the clear price tag, users can weigh themselves from the perspective of interests. If the demand is really strong, then bid according to the price, so that all transactions can pay the same rate as much as possible, thus eliminating the deformity caused by poor information. Vicious bidding, according to the official explanation:
EIP-1559 is a mechanism to optimize the Ethereum transaction mechanism, which aims to make the transaction fees on the Ethereum network more predictable and solve the problem of the current "pay-as-you-go" charging model.So, how does the mechanism design of EIP 1559 solve the problem of handling fees and congestion?
How does EIP 1559 solve the problem of handling fees and congestion?
In an article published in July 2018, V God detailed the details of EIP 1559, a transaction fee market reform proposal, which divides the transaction fees paid by users into two parts.
One part is the "Base Fee" (basic transaction fee) determined by the agreement and handed over to the agreement, and the other part is the "tip" paid to the miners. The former is a necessary and clearly marked "entry threshold", and the latter It is the "auction mode" similar to the current one:When the network is not congested, everyone only needs to pay the "basic transaction fee" determined by the agreement to package their transactions;When the network is congested, among the users who pay the "basic transaction fee" determined by the agreement, the packaging order is determined according to the size of their respective "tips";
That is, when the network is not congested, the total fee = "basic transaction fee" (marked price); when the network is congested. Total fee = "basic transaction fee" (marked price) + "tip" (auction), so that in most cases, users only need to decide whether to pay the fee, instead of deciding how much to bid, reducing the possibility of "malicious bidding" .However, it may sound abstract, but if you deconstruct EIP 1559 in a nutshell, the core essence is to further optimize the utilization rate of the Ethereum network through a dynamic adjustment mechanism, thereby reducing the average transaction fee and alleviating network congestion. And this dynamic adjustment mechanism is mainly divided into two modules: Gas price mechanism + "basic transaction fee" fee destruction.1. Gas price mechanism (basic transaction fee + tip)EIP-1559 sets an average block size limit based on the current block usage of the Ethereum network: an equilibrium target of 10 million Gas/block, and a hard cap of 20 million Gas/block.On this basis, the concepts of "Base Fee" (basic transaction fee) and "tip" introduced by EIP 1559 come into play:First of all, the network will take 10 million Gas/block as the equilibrium state in real time, and adjust the "basic transaction fee" according to the demand (so that the actual usage tends to 10 million Gas/block), that is to say, the "basic transaction fee" It is an "access threshold" that is dynamically adjusted every moment, and the goal is to maintain the utilization rate of the block in a balanced state.Specifically, when the block is less than 10 million Gas/block, the "basic transaction fee" will gradually decrease to increase demand; and when the block exceeds 10 million Gas/block, the "basic transaction fee" will gradually increase to reduce demand , to achieve the ideal 10 million Gas/block.The magnitude of this change is determined by the "distance" from 10 million Gas/block, but each block does not fluctuate more than 12.5%. For example, when the utilization rate of a block is higher than 10 million Gas/block, the "basic transaction fee" will increase to 112.5% of the original; on the contrary, if the utilization rate is lower than 50%, the "basic transaction fee" Will be reduced to 87.5% of the original.The change range of 12.5% may sound unintuitive, but the picture above shows the effect of the dynamic adjustment of the "basic handling fee":Assuming that the basic fee in the 0th block is 10Gwei (the price of ETH is calculated at 240 USD), the typical transaction cost of 21000 Gas is 0.0005 USD. According to the dynamic adjustment mechanism, as long as the demand for the next 10 blocks is full. If more than 20 million Gas/block, the transaction cost will increase to $0.02, and after 100 blocks, the transaction cost will increase to $657, which is undoubtedly an exponential dynamic adjustment.
In this way, since the subsidy required by miners for packaging transactions hardly changes with the demand, the fee is fixed when there is no congestion, and the high "basic transaction fee" that is clearly marked when there is congestion directly screens out some users who are not urgent.Users with urgent needs only need to pay a lower "tip" extra, so this can avoid the high handling fee caused by everyone's collective participation in "bidding" to a certain extent.2. "Basic transaction fee" fee burnAt the same time, in order to prevent Ethereum miners from the perspective of maximizing their own interests, the "Base Fee" (basic transaction fee) parameter of each block is increased. Therefore, in the design of EIP 1559, "Basic Transaction Fee" The income of "fees" is no longer obtained by miners, but destroyed by agreement.In this way, every "basic handling fee" generated will be directly burned, reducing the supply of ETH in the entire network, which is equivalent to bringing a "deflationary dividend" to all currency holders.
Of course, for the miners, the burning of the "basic handling fee" will reduce their willingness to package. Even if all users who are anxious to send transactions to the chain can increase the "tip" in the transaction to encourage miners to package their transactions as soon as possible, but in the network When there is no blockage, the "basic handling fee" is burned, and there is no "tip", and the miner's income is equal to the block reward directly (equivalent to taking the part of the income originally belonging to the miner to all coin holders to do " benefits").
However, this also solves the network security problem mentioned by V God - the "basic transaction fee" is burned. Compared with "tips", the proportion of block rewards in miners' income has increased again, thereby reducing the previously mentioned "51% attack" risk.On the whole, EIP 1559 is essentially an adjustment of "shaving peaks and filling valleys", rather than Layer 2 such as sharding and Rollup, which actually expands the capacity of Ethereum. Therefore, no matter how sharding, Rollup, etc. develop in the future, EIP 1559 is theoretically a beneficial innovation to the current Ethereum transaction fee mechanism at the economic model level.The impact of EIP 1559 on Ethereum is still unknownIn EIP 1559, the settings of "basic transaction fee" and "tip", as well as the protocol destruction of "basic transaction fee", are undoubtedly fundamental changes to the existing economic mechanism of Ethereum, and will definitely directly impact miners and other stakeholders, bringing There are many new variables, so since the launch of EIP 1559, the controversy surrounding it has never stopped.The most direct thing is that although the "basic transaction fee" is clearly marked, the "tip" is still in the auction mode, so the miners will try their best to reduce the "basic transaction fee", and then let the "tip" market return to the highest price auction mode, users It is still necessary to get your own transaction packaged on the chain through bidding.V God said in a recent interview that "the merger of eth1 and eth2 may not be realized within a year", which means that in the next one to two years, Ethereum will most likely continue to maintain its current bottom layer status, the deployment of EIP 1559 has a relatively urgent demand."EIP 1559"Interestingly, although the implementation on Ethereum seems to be in the foreseeable future, Filecoin has incorporated EIP-1559 into its core protocol, and the current daily consumption of FIL due to network transactions is about 100,000-150,000. So far, EIP-1559's "base fee" mechanism has done a good job of keeping the network capacity at 100%.