Difference between revisions of "EIP-1559"

From CryptoWiki

wiki_crypto>Zeb.dyor
 
m (1 revision imported)
 
(No difference)

Latest revision as of 08:50, 23 January 2022

Basics

"EIP-1559 is a proposal to make Ethereum transactions more efficient by using a hybrid system of base fees and tips to more evenly incentivize miners in periods of high or low network congestion. In the proposal, a base fee is defined as an algorithmically determined price that you can pay for transactions on Ethereum. Tips are defined as optional fees that you may include to speed up transactions. If implemented, EIP-1559 could greatly reduce transaction costs and improve Ethereum’s overall user experience."

Specifics

"Traditionally, a user sends a gas fee to a miner for a transaction to be included in a block. That gas fee will now be sent to the network itself as a sort of “burn” called basefee with only an optional tip paid to miners. The burnt fee is algorithmically set as well, ostensibly making it easier for users to pay a fair fee."

Different Fees

"With EIP-1559, what we currently know as transaction fees will be split into two parts: The basefee (set by the protocol) and the tip (set by the market). The basefee of each transaction will be burned, while the tip will continue to go to the miners."

Base fee

"If EIP-1559 is implemented, the current protocol for Ethereum gas fees would be replaced by a mandatory and algorithmically-determined fee called the “base fee.” This base fee would be paid in ether and fluctuate according to network congestion. The proposal aims to keep the network close to a 50% utilization rate, meaning each confirmed block is 50% full. If the network usage exceeds 50% capacity, the base fee automatically increases. If network usage falls below 50% capacity, the base fee decreases slightly. This predictable pricing mechanism would therefore allow transaction costs to be automatically set by wallet providers, thus removing the responsibility from users. Additionally, base fees would be burned or destroyed after collection, and would not be kept by miners."

"First, burning the basefee gives us the opportunity to reduce Ethereum’s linkage between congestion and security budget. Holders (and the market at large) can tolerate a larger permanent block subsidy when they know that if transactional demand is high, the subsidy will be partially or entirely reimbursed via burning.

Second, several studies [1] [2] have shown that when miner revenue is dominated by variable transaction fees instead of a predictable block subsidy, this can cause instability of the blockchain itself."

"The base fee can only change by about 12.5% per block."

"Consider a BASEFEE of 1 billion gwei per gas at block 0. At an ETH price of $240, a typical 21k gas transaction costs $0.0005. After only 10 blocks of 20M gas, the transaction will cost $0.02. After 100 blocks, it will cost $657. This is the power of exponential growth."

Tips

"If you require your transaction to be processed quickly, EIP-1559 would allow you to add a tip on top of the base fee. Unlike base fees, tips go directly to miners, who would therefore be incentivized to prioritize transactions that include transactions with tips. Because blocks are seldom completely full, under the ideal conditions proposed by EIP-1559, there would typically be roughly 50% available block space which could be allocated to transactions from users willing to pay tips. If there is no spike in demand when a user initiates a transaction, then even a very small tip would be enough to guarantee that a transaction will be included in the next few blocks."

"First, [users] determine a GAS_PREMIUM (from now on just called “tip”) as a bid for inclusion. Most often, it must only be high enough to compensate miners for the marginal increase in uncle risk (e.g. 1 Gwei). During times of congestion, it allows for the old first-price auction between transactors.

Second, users determine a FEECAP that represents the most they are willing to pay for inclusion (incl. the tip). This is necessary because BASEFEE can actually move up or down, as we will see in a minute, and users who set an insufficient FEECAP should be able to wait for inclusion in a later block.

In summary, BASEFEE allows the protocol to enforce a minimum fee without incentivizing the formation of an off-chain market. It serves as a foundation for more flexible blockspace utilization mechanisms, such as uniform price auctions and elastic block sizes."

Why Burns and Why Tips

"In order to prevent miners from faking full blocks (including garbage transactions of their own) to increase their future revenue by driving the base fee up, the base fee is burned rather than given to miners. Then, in order to incentivize miners to actually include transactions (which has opportunity cost to miners) rather than just mining empty blocks for the block reward, transactions include a separate per-gas miner bribe (AKA: gas premium, miner tip).

The expectation is that the base fee will account for *most* of the congestion related fee while the miner bribe will likely sit just above opportunity cost which is around 1 nanoeth (gwei) per gas. There is a minor exception here that it is expected that front runners and other people participating in gas price auctions for within-block positioning would be in the form of miner bribes, since it is the miner you are bribing to include your transaction in a certain position."

Block Size

  • If the block size stays static or flexible seems to be depending on your definition.
  • From Deribit Insights (10-6-2020):

"Demand for blockspace can be volatile. As a result, some blocks are half-full while others are highly congested. A slack mechanism would allow some blocks to be larger, as long as other blocks are smaller. That way we could enforce a longer-term average blocksize limit, but allow for variation across individual blocks.

EIP-1559 allows for larger blocks for a short period of time, but not a longer period. A typical pattern under high congestion will be a series of large blocks followed by a series of very small to small blocks."

"EIP-1559 is the Ethereum community’s attempt to sidestep a potentially contentious debate about block size with its proposal to utilize flexible block sizes instead of fixed block sizes. By having a two-tiered system that uses a base fee and tips, EIP-1559 creates dynamic and adjustable block sizes that expand and contract depending on demand, which is defined through a system of base fees and tips."

"Ultimately, the total capacity in a block remains the same, and the supply of transactions doesn’t change."

Alternatives

"It’s also worth noting that there is another EIP (EIP-2593) which is being advertised as an alternative to EIP-1559. You can read a detailed breakdown of that here."

Usage

It’s been a month, almost to the day, since Ethereum’s EIP-1559 upgrade went live, and the milestone was met with the first-ever deflationary day for ETH, where more of the cryptocurrency was burned than issued. Hardware wallets such as those made by Ledger and Trezor are yet to enable EIP1559. Consequently, security-conscious DeFi users continue to utilize the old gas estimation system and only half of the transactions on the Ethereum network currently take advantage of EIP-1559, according to a Dune Analytics dashboard. Over 211K ETH, or about $830M, has been burned in the last four weeks, and net daily ETH emissions have been cut in half, according to Watch The Burn.

Filecoin

  • From their blog (5-1-2021):

"Filecoin has incorporated EIP-1559 into its core protocol, with a small adaptation. Filecoin uses tipsets; its transactions go onto the chain before they are executed, and actual gas usage can’t be determined until that occurs. Filecoin therefore requires users to provide an estimated gas limit on transactions. To properly align incentives, overestimation above a certain margin is penalized via an overestimation burn.

EIP-1559 is implemented and live on the Filecoin mainnet. At present, around 100k to 150k FIL are being consumed per day as the result of network transactions. Incorporating the standard has delivered at least two key wins:

  1. Fast Lane for High-Value Transactions. At times, storage onboarding messages have threatened to price out the more time-sensitive WindowPost messages. As expected, however, integrating EIP-1559 has provided Filecoin participants a straightforward mechanism for navigating this congestion without having to pay exorbitant prices all of the time.
  2. Network Capacity Management. So far, the base fee mechanism of EIP-1559 has done very well at keeping network capacity at one hundred percent of its target.

As time has gone on, transaction creators have also gotten much better at estimating the amount of gas their transactions will require, leading to long-term reductions in overestimation burn.

There’s also been some room for improvement: base fee variance has been high, and its change rate has been spiky. This is due to a large amount of congestion as new storage gets onboarded. In the past, this has led to critical WindowPost messages being priced out as well.

There are a number of different approaches the Filecoin community could investigate to address these pricing issues:

  1. Gas Control Plane. One possible means of addressing network congestion is creating a dedicated gas lane for control plane transactions, setting aside a fraction of every block to specific messages critical for the functioning of the blockchain.
  2. Message Type Fee Structures. Another means of addressing this problem may be reducing the cost of WindowPost, or else increasing the cost of other messages, particularly Pre/ProveCommit messages.
  3. Base Fee Change Rate. Spikiness in the base fee over time implies that the rate is not perfectly chosen, and could be smoother."

NEAR

"At first glance, NEAR has copied EIP-1559 exactly. For example, the maximum fee change per block in Ethereum is 12.5%, and the block time is 12-13 seconds. In NEAR, the maximum change is 1% at 1 second block time.

On second sight, there are two big differences in NEAR:

  1. Users are not allowed to tip (incentivize) block producers in-protocol.
  2. It pays 30% of the base fee to smart contracts.

NEAR’s solutions not only don’t improve the outcome but actively make it worse.

By banning fees paid to block producers, they encourage forming a “black market” for transaction priority. By adding a forced rent to app developers, they can’t change the true market price for transactions but merely force apps to refund their users."

Celo

  • From their docs (1-2021):

"Celo uses a gas market based on EIP-1559. Every transaction is required to pay for gas at or above the gas price minimum in order to be processed. Full nodes will reject transactions whose gas price is below the current gas price minimum, and will discard outstanding transactions if the gas price minimum subsequently falls below the gas price that the transactions specify. The required portion of gas fee, known as the base, is set as base = gas_price_minimum * gas_used and is sent to the Community Fund. The rest of the gas fee, known as the tip, is rewarded to the validator that proposes the block."

Roadmap

"Ethereum Improvement Proposal (EIP) 1559 will be packaged with the London hard fork this coming July regardless of the mining industry’s discontent with the proposal, according to the All Core Developers call Friday. At least five other EIPs are likely to join EIP 1559 in London."

  • Vitalik Buterin already proposed (2-4-2021) changes to EIP-1559 after it is live. His changes would make it more like an AMM curve.

Possible Attacks against EIP-1559

"The most common version of the 51% attack against EIP-1559 goes something like this:

  1. Create a coalition of 51% of miners who all agree to mine empty blocks to drive the base fee down to 0.
  2. Once the base fee is at 0, there will be a permanent state of congestion which means the miner bribe will be the determining factor for whether a transaction is included or not, which puts us right back into our current situation where miner bribes (gas price) is the sole factor for inclusion.
  3. Profit from the high miner bribes.

It is worth noting up front that the worst case scenario here is that we end up right where we are now, with EIP-1559 effectively being a no-op compared to current gas pricing."

Pros and Cons

Pros

  • Makes tx fees predictable.
  • From Gemini (17-2-2021):

"It has been estimated that 90% of user transaction costs could be saved by switching from the current system to EIP-1559.

"Base fees would be burned or destroyed after collection, and would not be kept by miners. This is intended to reduce ether’s circulating supply and potentially drive up the value of the token by increasing scarcity over time."

"There is the straightforward argument that burning the basefee internalizes some of the revenue (in ETH) that miners currently make. This turns ETH from a non-productive asset into a productive asset, like a company starting a new business line that produces a lot of revenue."

"Blockchains that rely only on transaction fees for security (such as Bitcoin in the future) can run into problems when the block subsidy runs out. If transaction fees are burned, we could extend the block subsidy without increasing the overall coin supply."

Cons

"Miners and mining pools have been gathering in opposition against the proposal as it progressed toward mainnet."

"At least denominated in ETH (though not necessarily in USD), Ethereum will pay miners less money than before. We expect this to lower the hashpower pointed at Ethereum."

Team