DeFi

·

March 13, 2024

Ethereum Dencun upgrade and gas fees 

Anthony Allen

The latest Ethereum hard fork brings better layer-2 gas efficiency through blobspace. Here’s what EIP-4844 and the upgrade known as Dencun does for token swaps, liquidity, and gas prices.

Scaling Ethereum is challenging. As a computation-heavy blockchain, data is a bottleneck. Each time you interact with a smart contract you pay gas fees to validators, and as ETH prices and network congestion rise, the cost of making a transaction increases. 

The Ethereum Dencun upgrade which launched today implements several Ethereum Improvement Proposals (EIPs), including EIP-1153, EIP-4844 and EIP-4788. Let’s break down how these help optimize gas and improve scalability. 

What is Dencun? 

Dencun is a hard fork, meaning an upgrade that is not backwards-compatible with earlier Ethereum specifications. It gets its name from combining the names of two simultaneous upgrades to separate parts of the Ethereum post-merge stack: Deneb, the name of the consensus layer upgrade, and Cancun, the execution layer upgrade. 

Following the Merge, where the most significant change was Ethereum’s move to Proof-of-Stake, Dencun marks the start of the Surge phase of the Ethereum roadmap. 

This phase is explicitly aimed at scaling Layer-2 (L2) rollups to achieve transaction throughput exceeding 100,000 transactions per second (TPS). 

The next phase, the Scourge, is expected to be tackled toward the end of 2024 at the earliest, with the upcoming Electra consensus layer upgrade focused on Proposer-Builder Separation (PBS) and reducing MEV risks, and the Prague execution layer upgrade addressing Verkle trees, on the roadmap as the Verge phase.

EIP-4844 effect on gas fees

EIP-4844, known as proto-danksharding, is a proposal which will help optimize L2 rollups data usage through a new data type called a blob. These blobs (an acronym for large binary objects) are temporary data that is stored on the consensus layer by beacon nodes for around two weeks before being pruned. Blobs are an alternative to calldata, which is an external call of a function that is stored permanently.

"EIP-4844 can bring rollup fees down by orders of magnitude and enable Ethereum to remain competitive without sacrificing decentralization." EIP4844.com

Blobspace as a storage mechanism is expected to lower gas fees on EVM L2 rollups by as much as 90% by providing a dedicated space for rollup data. It will not have a direct effect on Ethereum mainnet fees, but reducing the amount of rollup data may have a knock-on effect of lowering transaction fees as rollups currently account for a fifth of L1 gas usage. 

Blobs shown as a data layer between L2 rollups and the Execution layer
Blobs only store data for a short period to make it available to validators.

L2 gas fee savings come from the fact that the burden of storing transaction data is reduced substantially as blobs are never sent to the Ethereum Virtual Machine (EVM), and non-blob transactions on mainnet won’t impact blob gas costs.

While adoption of proto-danksharding is expected to be quick, each L2 must upgrade manually for the changes to take effect, which means some chains will see the benefits before others.

EIP-4788 enshrined oracles

This upgrade is designed to improve trustless execution from consensus to execution layer, where the execution layer can independently access the state of validators without relying on a trusted oracle, managed by a third party service like Lido or RocketPool.

EIP-4788 is referred to as enshrined oracles because it is the first time that the EVM will have built-in oracle-like capabilities that allow it to know consensus layer states. It does so by storing small amounts of consensus data in a new smart contract on the execution layer.

This part of the upgrade is most significant for Liquid Staking and Restaking applications, as it will decentralize the inherent trust assumptions which arise from depending on a small number of third-party oracles and potentially reduce slashing risks.

Combined with EIP-7044 and EIP-7055, which make it easier to unstake and are also part of the Dencun upgrade, staking as a whole will see significant improvements following the Surge. 

EIP-1153 transient storage

This is a long-awaited improvement that is most discussed in terms of introducing the opcodes which will enable the launch of Uniswap v4 and other next-generation liquidity sources like the recently announced PancakeSwap v4.

Transient storage is a new type of EVM storage which sits between short-term and persistent storage as an intermediate form of memory that is only kept for the lifecycle of a transaction. This will allow liquidity pools to replace current methods of storing inter-account transaction data and then deleting it before the transaction is over, simplifying smart contracts and EVM design. 

"Transient storage is useful for any case where a contract needs to store data in one call frame, for use in another call frame during the same transaction." EIP1153.com

EIP-1153 is complemented by the more recent proposal EIP-5656 which Dencun also introduces, providing the MCOPY opcode to further reduce the gas needed to copy memory in contracts.

What you need to do for Ethereum Dencun

As an end-user or trader, the benefits of Dencun should start to appear in the coming days, weeks and months across the different dApps and protocols you use. 

Gas fees should reduce on L2 rollups such as Abritrum, Optimism, Base and more as they upgrade, but fees can be expected to rise again in future as blobs fill up under greater network usage, as bandwidth will not increase until danksharding is fully implemented.

If you are a validator and run your own node, you will need to upgrade both your consensus and execution clients to the latest versions, as well as making sure you are on the v1.7 of MEV boost software if you use it. 

Even better value on Matcha

One of the most anticipated parts of Dencun is the prospect of lower gas fees on layer-2 EVM chains. This is great news for Matcha users, as you will soon see the benefits of lower fees whenever you use a feature that interacts with a smart contract on an L2. 

That means costs of token swaps, which are already fee-free, cancelled limit orders, and cross chain bridging should be better value than ever, so you can save even more on top of the industry-leading liquidity, smart order routing, and low slippage we already provide. Make the most of the Dencun era and start using Matcha today!

Swap now on Matcha!
Contents
Subscribe to our newsletter
By submitting you're confirming that you agree with our Terms and Conditions.
Yay! You’re signed up.
Oops! Something went wrong, but it's not your fault.
DeFi

·

March 13, 2024

Ethereum Dencun upgrade and gas fees 

Ethereum Layer-2 gas fee upgrades

The latest Ethereum hard fork brings better layer-2 gas efficiency through blobspace. Here’s what EIP-4844 and the upgrade known as Dencun does for token swaps, liquidity, and gas prices.

Scaling Ethereum is challenging. As a computation-heavy blockchain, data is a bottleneck. Each time you interact with a smart contract you pay gas fees to validators, and as ETH prices and network congestion rise, the cost of making a transaction increases. 

The Ethereum Dencun upgrade which launched today implements several Ethereum Improvement Proposals (EIPs), including EIP-1153, EIP-4844 and EIP-4788. Let’s break down how these help optimize gas and improve scalability. 

What is Dencun? 

Dencun is a hard fork, meaning an upgrade that is not backwards-compatible with earlier Ethereum specifications. It gets its name from combining the names of two simultaneous upgrades to separate parts of the Ethereum post-merge stack: Deneb, the name of the consensus layer upgrade, and Cancun, the execution layer upgrade. 

Following the Merge, where the most significant change was Ethereum’s move to Proof-of-Stake, Dencun marks the start of the Surge phase of the Ethereum roadmap. 

This phase is explicitly aimed at scaling Layer-2 (L2) rollups to achieve transaction throughput exceeding 100,000 transactions per second (TPS). 

The next phase, the Scourge, is expected to be tackled toward the end of 2024 at the earliest, with the upcoming Electra consensus layer upgrade focused on Proposer-Builder Separation (PBS) and reducing MEV risks, and the Prague execution layer upgrade addressing Verkle trees, on the roadmap as the Verge phase.

EIP-4844 effect on gas fees

EIP-4844, known as proto-danksharding, is a proposal which will help optimize L2 rollups data usage through a new data type called a blob. These blobs (an acronym for large binary objects) are temporary data that is stored on the consensus layer by beacon nodes for around two weeks before being pruned. Blobs are an alternative to calldata, which is an external call of a function that is stored permanently.

"EIP-4844 can bring rollup fees down by orders of magnitude and enable Ethereum to remain competitive without sacrificing decentralization." EIP4844.com

Blobspace as a storage mechanism is expected to lower gas fees on EVM L2 rollups by as much as 90% by providing a dedicated space for rollup data. It will not have a direct effect on Ethereum mainnet fees, but reducing the amount of rollup data may have a knock-on effect of lowering transaction fees as rollups currently account for a fifth of L1 gas usage. 

Blobs shown as a data layer between L2 rollups and the Execution layer
Blobs only store data for a short period to make it available to validators.

L2 gas fee savings come from the fact that the burden of storing transaction data is reduced substantially as blobs are never sent to the Ethereum Virtual Machine (EVM), and non-blob transactions on mainnet won’t impact blob gas costs.

While adoption of proto-danksharding is expected to be quick, each L2 must upgrade manually for the changes to take effect, which means some chains will see the benefits before others.

EIP-4788 enshrined oracles

This upgrade is designed to improve trustless execution from consensus to execution layer, where the execution layer can independently access the state of validators without relying on a trusted oracle, managed by a third party service like Lido or RocketPool.

EIP-4788 is referred to as enshrined oracles because it is the first time that the EVM will have built-in oracle-like capabilities that allow it to know consensus layer states. It does so by storing small amounts of consensus data in a new smart contract on the execution layer.

This part of the upgrade is most significant for Liquid Staking and Restaking applications, as it will decentralize the inherent trust assumptions which arise from depending on a small number of third-party oracles and potentially reduce slashing risks.

Combined with EIP-7044 and EIP-7055, which make it easier to unstake and are also part of the Dencun upgrade, staking as a whole will see significant improvements following the Surge. 

EIP-1153 transient storage

This is a long-awaited improvement that is most discussed in terms of introducing the opcodes which will enable the launch of Uniswap v4 and other next-generation liquidity sources like the recently announced PancakeSwap v4.

Transient storage is a new type of EVM storage which sits between short-term and persistent storage as an intermediate form of memory that is only kept for the lifecycle of a transaction. This will allow liquidity pools to replace current methods of storing inter-account transaction data and then deleting it before the transaction is over, simplifying smart contracts and EVM design. 

"Transient storage is useful for any case where a contract needs to store data in one call frame, for use in another call frame during the same transaction." EIP1153.com

EIP-1153 is complemented by the more recent proposal EIP-5656 which Dencun also introduces, providing the MCOPY opcode to further reduce the gas needed to copy memory in contracts.

What you need to do for Ethereum Dencun

As an end-user or trader, the benefits of Dencun should start to appear in the coming days, weeks and months across the different dApps and protocols you use. 

Gas fees should reduce on L2 rollups such as Abritrum, Optimism, Base and more as they upgrade, but fees can be expected to rise again in future as blobs fill up under greater network usage, as bandwidth will not increase until danksharding is fully implemented.

If you are a validator and run your own node, you will need to upgrade both your consensus and execution clients to the latest versions, as well as making sure you are on the v1.7 of MEV boost software if you use it. 

Even better value on Matcha

One of the most anticipated parts of Dencun is the prospect of lower gas fees on layer-2 EVM chains. This is great news for Matcha users, as you will soon see the benefits of lower fees whenever you use a feature that interacts with a smart contract on an L2. 

That means costs of token swaps, which are already fee-free, cancelled limit orders, and cross chain bridging should be better value than ever, so you can save even more on top of the industry-leading liquidity, smart order routing, and low slippage we already provide. Make the most of the Dencun era and start using Matcha today!

Swap now on Matcha!

Subscribe for an instantly better inbox

By submitting you're confirming that you agree with our Terms and Conditions.
Yay! You’re signed up.
Oops! Something went wrong while submitting the form.