EIP-3074: AUTH and AUTHCALL opcodes
represents a significant advancement. It allows users to use some features of smart wallets without paying contract deploy gas fees:
Compared to ERC-4337, EOA wallets can benefit immediately by supporting EIP-3074.
However, since EIP-3074 is based on EOA, it currently does not support exciting features already in ERC-4337, such as 'change owner,' 'use any signature algorithm,' and 'social recovery.'
If you are interested in the specific execution flow of EIP-3074, you can continue reading:
sponsor
negotiate an invoker contract
that they both support.sponsor
.sponsor
verifies off-chain whether the transaction can be sponsored. If approved, the sponsor
sends the transaction to the invoker contract
.invoker contract
first verifies the user's signature using AUTH
and then executes the user's transaction using AUTHCALL
.In this scenario, the user can 'send a transaction' using their EOA without needing any tokens.
sponsor
negotiate an invoker contract
that they both support.sponsor
.sponsor
verifies the data submitted by the user off-chain. If verified, the sponsor
sends the transaction to the invoker contract
.invoker contract
verifies whether the user's ERC20 tokens are sufficient and transfer the ERC20 tokens in advance. Then, it verifies the user's signature using AUTH
and executes the user's transaction using AUTHCALL
. After execution, any excess ERC20 tokens withheld earlier are refunded to the user based on the actual gas cost, and the final ERC20 tokens received are transferred to the address provided by the sponsor
.In this scenario, users can pay gas fees using ERC20 tokens.
If you want to know more details, I've also prepared an example Invoker contract
that supports batch transactions:
https://github.com/jayden-sudo/InvokerDemo/blob/main/contract/Invoker.sol