
Written article: 0xjs@:
At the 183 ACDE meeting held on April 12, 2024, the EIP-3074 was officially included in the next Ethereum hard fork PECTRA upgrade (referred to as Prague upgrade).
Therefore, the EIP-3074 has received the attention of the Ethereum community.Many people in the Ethereum community believe that this EIP will always change the way users interact on the EVM chain, making the wallet user experience simpler, cheaper, and stronger.
So what is EIP-3074?
What is EIP-3074?
Description in one sentence:EIP-3074 essentially entrusts EOA’s control to smart contracts,Including the ability to conduct single transactions, batch transactions, wallet assets, and sponsorship transactions.
EIP-3074 was proposed by developers and others of Ethereum researcher Sam Wilson and Go Ethereum. By adding two new EVM operating codes Auth and Authcall, the existing EOA was turned into smart contracts.These two operations are coordinated, allowing smart contracts to act on behalf of EOA.
Auth operation code (0xf6): This operating code allows users to authorize specific EOA by checking the ECDSA signature.The signature must be performed with EOA’s private key, and a specific message (submission) must be covered.
AuthCall operating code (0xf7): This operating code allows authorized smart contracts to start trading from the EOA account.Its working principle is similar to the existing call operation code, but the authorized EOA is used as the sender rather than the contract itself.
AUTH obtains user signatures and expected operations, and verifies whether its signature is correct.It sets a variable to illustrate the original address of TXN, allowing a smart contract to represent an EOA execution operation, thereby realizing the entrustment of authorization control.AuthCall and then use the initiator address as the callor rather than the actual msg.sender to call the target contract.
EIP-3074 workflow and new use case
as follows:
The user signs a message (under the chain, not a transaction) — & gt; user or initiator sends the message as a transaction to the caller contract — & gt; caller uses Auth and AuthCall to verify and call each target contract user as aThe address of the sender
Some cases have been obtained in this new transaction process, such as::
Use case 1: sponsorship transaction.Suppose that there is no ETH in the Bob’s wallet.Applications can provide GAS for BOB’s transactions without the need to buy/bridge ETH.This may be huge for obtaining large -scale retail investors.
Use case 2: Multiple operations in a transaction.In order to exchange tokens on Uniswap, users must first approve UNISWAP to use their own tokens, and then run the actual SWAP.With EIP-3074, these two operations can be approved to be processed into a single transaction.
Use case 3: Asset recovery.You can set up a special called contract contract so that users can use social recovery to restore assets when they lose their private keys.If you meet social recovery conditions, you can submit the signature to the call to mobile assets.
What does EIP-3074 mean for Ethereum?
Before EIP-3074: Smart contracts require users to sign a transaction when interacting with smart contracts.Therefore, users need to participate in some news signatures for the daily chain tasks.
After EIP-3074: The user can sign a key and award the authority to sign the transaction from the user’s wallet.Users can sign this permit with their own key, and then start.It will become the game rules of the web3 game. Users can sign a session in it, and then play the entire game without worrying about interaction with smart contracts.
Different from the upgrade of ERC-4337 at the contract level, the advantage of EIP-3074 is to upgrade from the EVM instruction levelThere is no need to set up extra settings to allow users to enjoy the function of smart contracts.For example, the three use cases mentioned in the last section will greatly improve the Utopo user experience.
Speaking of so many advantages, the disadvantages of EIP-3074
The biggest is the caller.The involved contract needs to be fully reviewed, not upgraded, and no trust, otherwise the user’s funds are easily stolenEssence
In addition, some existing re-entry inspections may not be suitable for EIP-3074.
Since the EIP-3074 adds two new operating codes, it is necessary to add a hard fork to add this change.This is some of the reasons that EIP-3074 was postponed and ERC4337 was first adoptedEssence
The account abstracted ERC-4337 does not require a hard fork, which is purely a change in contracts and under-linked systems.