AuditOne Blog
Key EIPs In The Ethereum's Pectra Upgrade

Over the years, the Ethereum network has undergone several key upgrades that align with its roadmap, pushing the boundaries of decentralization, scalability, and security.

Notable past upgrades include the Constantinople upgrade, which optimized gas costs and introduced key efficiency improvements, and the London upgrade, where EIP-1559, a proposal that restructured the fee market, introduced base fees, and improved gas predictability, was implemented. More recently, another monumental step was the Decun, which introduced Proto-Danksharding, a process that aims to further increase Ethereum’s transaction throughput and scalability with EIP-4844.

The upcoming upgrade Pectra, however, sets itself apart by focusing heavily on improving user account flexibility, transaction efficiency, and security enhancements. While previous upgrades like the London hard fork addressed gas fee predictability, and the Decun improved the network’s transaction efficiency and scalability, Pectra is more focused on enhancing account abstraction via EIP-7702, introducing transaction delegation via EIP-3074 and optimizing gas usage for calldata via EIP-7623. These changes are designed to make Ethereum more user-friendly and scalable while also providing developers with advanced tools to create more efficient and secure dApps.

Overview of the Pectra Upgrade


The Pectra upgrade is designed to address some of Ethereum’s persistent challenges, focusing on improving the flexibility of user accounts, reducing gas fees, and enhancing transaction execution.


The main goals of Pectra are:

  • Improved account abstraction: Enhancing the way user accounts and smart contracts interact on Ethereum.
  • More efficient transaction execution: Making gas fees and transaction finalization more predictable and cost-effective.
  • Enhanced security features: Introducing measures to protect users and developers from vulnerabilities in contract interactions.

Now, let’s delve into the three key EIPs within the Pectra upgrade.

EIP-3074: Authenticated Transactions and Sponsored Transactions


EIP-3074 introduces the concept of "sponsored transactions" and enhances the way signatures are authenticated on Ethereum and this EIP allows an EOA (Externally Owned Accounts) to delegate transaction signing to another account, which can cover the gas fees or execute actions on behalf of the original account.

It proposes two new Ethereum opcodes: `AUTH` and `AUTHCALL`, aiming to introduce a more powerful form of delegation for EOAs. The proposal allows EOAs to delegate control of their account to smart contracts, enabling actions similar to those performed by smart contract wallets without requiring EOAs to migrate to new accounts.

The primary goal of EIP-3074 is to bridge the gap between simple EOAs and more complex smart contract wallets. With the `AUTH` opcode, users can authorize a contract to act on their behalf, while `AUTHCALL` lets this contract execute transactions from the user’s account. The delegation model significantly enhances EOAs by adding programmability and more control without needing to switch to a full account abstraction model like ERC-4337.

Although it may appear as a step toward account abstraction, EIP-3074 strictly focuses on execution abstraction, making it less comprehensive than ERC-4337, which aims to cover all account functionalities such as gas payments and signature schemes.

This proposal brings essential functionalities, such as batching multiple transactions and creating invokers (contracts that can manage transactions on behalf of the user), into the EOA framework. It simplifies user experience and enables dApps to offer more sophisticated features without complex user interaction, potentially improving security and user flexibility.

EIP-7702: Improved Account Abstraction

EIP-7702 introduces a new type of transaction for EOAs, named SET_CODE_TX_TYPE. It allows for authorization tuples, where each tuple contains a chain ID, address, and cryptographic signature letting EOAs delegate specific code execution, making them function similarly to smart contracts. 

With transaction batching, users can perform multiple operations within a single transaction, simplifying tasks like ERC-20 approvals and transfers. This is particularly beneficial for dApps, which often require several steps to complete a single process. By enabling multiple actions to be bundled into one transaction, EIP-7702 streamlines workflows, reduces the need for multiple approvals, and helps minimize gas fees.

The sponsorship feature has now more flexibility in managing gas fees. It allows one account (Account X) to cover the gas fees for another account (Account Y), which is particularly valuable for dApps and services aiming to improve user experiences by minimizing upfront costs allowing developers to create more user-friendly applications where the gas fee burden is handled more efficiently.

Additionally, privilege de-escalation allows for the creation of sub-keys with restricted permissions. For example, users can create sub-accounts that are only authorized to spend specific tokens or interact with particular dApps enhancing security by limiting the range of actions that a key can authorize, preventing misuse of higher-level account privileges.

The SET_CODE_TX_TYPE transaction works by setting and delegating code execution through delegation designators (0xef0100), which act as pointers to the code that needs to be executed on behalf of the EOA. These designators are tied to the authorization tuples that define the code to be executed. If the transaction includes multiple tuples, they are processed sequentially, even if one fails, ensuring continuity and reliability in transaction execution.

When it comes to delegation and costs, gas fees are determined by the length of the authorization list and interactions with cold accounts. By utilizing the delegation designation mechanism, EIP-7702 ensures efficient code retrieval and execution while bypassing opcode restrictions. This optimization not only saves gas but also enhances the speed of execution, making EOAs capable of handling more complex transactions without the need for a full smart contract.

Overall, EIP-7702 enhances account abstraction by empowering EOAs to manage tasks that traditionally required smart contracts, boosting both flexibility and security across Ethereum’s ecosystem.

EIP-7623: Optimizing Gas Costs for Complex Transactions


One of the long-standing challenges for Ethereum users has been the high gas fees associated with complex transactions, particularly in scenarios involving DeFi interactions or Layer 2 solutions. EIP-7623 addresses this by optimizing how gas is calculated for multi-step operations, leading to lower costs for users who engage with more sophisticated contracts.

EIP-7623 proposes a dynamic pricing scheme for calldata usage in Ethereum transactions, focusing on encouraging efficient use of the network’s resources. Traditionally, calldata is priced at 4 gas per non-zero byte and 1 gas per zero byte. However, due to misuse by applications, like rollups using calldata as a cheaper alternative to on-chain storage, EIP-7623 aims to adjust the pricing based on how much a transaction depends on calldata. With that, the proposal ensures that calldata is used appropriately, especially given the introduction of blobs via EIP-4844 for data availability.

The pricing mechanism dynamically adjusts costs depending on the balance between execution gas and calldata usage. If calldata gas exceeds the defined threshold (execution gas being less than twice the calldata gas), a higher rate (16 gas per non-zero byte and 4 gas per zero byte) is applied, serving as a "social tax" for using calldata inefficiently. For instance, if a transaction relies heavily on calldata for data storage rather than its intended purpose of executing smart contract functions, the cost can quadruple, making it prohibitively expensive for this type of misuse helping Ethereum manage its resources better, especially as more advanced use cases emerge.

Conclusion


Pectra
marks a new step toward a more efficient and secure Ethereum, introducing advancements across multiple aspects of its architecture. 

Each EIP in this upgrade addresses specific challenges: EIP-7702 strengthens account abstraction by empowering EOAs with smart contract-like capabilities, allowing for greater flexibility and security. EIP-3074 brings innovation in transaction authentication and delegation, enabling users to delegate transaction control, and simplifying complex transaction execution. Lastly, EIP-7623 optimizes gas costs, particularly for calldata-heavy transactions, promoting more efficient use of Ethereum’s resources.

As these EIPs are implemented, Ethereum will become a more user-friendly platform, supporting both everyday users and developers with reduced costs, enhanced functionality, and improved security measures. These improvements bring Ethereum closer to its ultimate goal according to its’ foundation: A global platform that continuously evolves to achieve greater scalability, security, and sustainability.

In this article
Author
AuditOne
Team
Share this with your community!
xtelegramlinkedin
Recent Blogs

Looking for more of engaging content?

Explore our community