What Are Smart Contract Wallets? Account Abstraction Demystified
The Ethereum Foundation’s ERC-4337 account abstraction went live on Ethereum’s mainnet on March 1. While some expressed excitement for the news and the potential for smart contract wallets, the leading smart contract wallet providers reminded everyone that they already exist.
So what’s different? And what in the world is a smart contract wallet again?
Key takeaways:
- Smart contract wallets provide a means of self custodying crypto assets.
- They enable bundled transactions, customizable recovery options, the ability to pay gas fees in a different token, greater privacy in identity management and more.
- Not all smart contract wallets remove the EOA from the equation.
- There lacks a universal standard to account abstraction that can address risk concerns.
- ERC-4337 is an account abstraction approach that removes the need for centralized relayers and EOAs.
- It can potentially provide a universal standard that addresses security concerns but needs further infrastructure.
What are smart contract wallets?
A smart contract wallet is a device or application that lets users customize the way they would prefer to manage their digital assets.
Account abstraction is how developers make smart contract wallets possible. They abstract all the essential functions of the Externally Owned Account (EOA) and plug them into a smart contract full of new levers and buttons.
In other words, it’s a choose-your-own-adventure approach to self custody.
Use Cases
You can program the smart contract wallet for the use cases that mean most to you — things like social recovery and bundled transactions. Proponents believe that it will onboard millions more to Web3 by revolutionizing the user experience, and critics fear that it introduces additional risks.
The Ethereum account model explained
Before we explain how it works and the significance of ERC-4337 account abstraction, it’s worth refreshing our understanding of the Ethereum account model.
Unlike Bitcoin and other cryptocurrencies, Ethereum uses an account model instead of a UTXO (unspent transaction output) model. This allows users to deploy and use self-executing smart contracts that can run applications such as Uniswap.
There are two types of accounts on the Ethereum network: externally owned accounts (EOAs) and smart contract accounts.
- Both are represented by a unique public address, which is essentially a string of letters and numbers.
- Both can be used to send, hold or receive ether.
However, EOAs and smart contract accounts differ in how they are controlled and used. EOAs are controlled directly by the user through a private key signing function. This authorizes the account to perform three primary tasks:
- Validate transactions
- Execute transactions
- Pay transaction fees
In contrast, smart contract accounts are controlled by their embedded logic — a series of if-then statements. But this design makes smart contracts dependent on EOAs. They are still needed to deploy the smart contracts and prompt smart contract actions.
The smart contract’s dependence on EOAs makes it difficult for wallet providers to program new ways for users to validate, execute and pay transaction fees.
Limitations of this model
This accounts model limits many wallet providers to only offer users a seed phrase in the case that they lose access. The seed phrase though is notoriously vulnerable to users forgetting it or losing it to theft — which discourages users from interacting with the blockchain, and makes it difficult for them to manage their digital assets.
Read More: What is a seed phrase and are they necessary?
Another pain point is the number of steps it takes for a user to interact with a smart contract. Since every interaction with a smart contract requires a signature, gas fees can get expensive quickly. This also adds vulnerability for the user, as each transaction increases risks associated with potential network congestion, errors in smart contract code, or other technical issues.
Lastly, the standard EOA model limits the innovation of wallet providers. There are workarounds that use smart contracts that enable more use cases with greater customization, but they come with a new set of risks.
How does account abstraction work?
Before ERC-4337, smart contract wallets had two general approaches to account abstraction. They could either use third party relayers with an abstracted EOA or use a layer-2 solution with native account abstraction.
The EOA and relayer approach
Smart contract wallets like Safe use an EOA as the basis of a smart contract wallet and a transaction relay service to bundle and process transactions on behalf of the smart contract account.
Remember, the current EVM logic requires users to deploy a smart contract with their EOA account. So in this approach, safe wallets use an EOA for its initial set up. But once the account is created, users can add a layer of customization to the authorization process.
Benefits
For example, with Safe, users can configure several types of transaction confirmation methods, including multi-sig, time-lock, and threshold signatures.
- A multi-sig confirmation method is a security feature that requires multiple parties to approve a transaction before it can be executed. It adds an extra layer of security to transactions and helps prevent fraudulent activity.
- In a time-lock confirmation method, a transaction is scheduled to execute at a future time and is confirmed automatically when that time is reached, without requiring any additional approval. This approach is useful for scenarios where a group of people want to agree on a transaction in advance, but don’t want to coordinate their approval at a specific time.
- Threshold signatures is a multi-signature scheme where a transaction can be authorized by a subset of a group of signers, instead of requiring all signers to approve it. This allows for greater flexibility in the approval process and can increase security by reducing the likelihood of all signers being compromised at the same time.
This layer of abstraction can also be used to customize account recovery. For example, it lets users add trusted accounts that can help recover the account in case the user loses access. The recovery process involves a time delay and a confirmation from a majority of trusted accounts to prevent unauthorized access.
Since the smart contract is on Ethereum, it still costs gas to execute actions that require multiple transactions. So instead of executing a set of transactions individually, the smart contract can be programmed to send authorized transaction metadata to a transaction relay service that executes them on the user’s behalf.
Risks
This allows third parties to cover the gas fees for the user or let them pay the fees with a different token. The challenge though is, not all third party relayers are the same. Some contain unique centralization risks that the average user is not going to understand.
Layer-2 native account abstraction
Smart contract wallets like Argent have partnered with ZK-Era to provide account abstraction through a layer-2 solution. This avoids the need for third party relayers and removes the need for a user to set up an EOA.
ZK-Era’s native abstraction uses Zero-knowledge proof rollups to bundle a set of transactions from an Argent smart contract account that are then settled using the ZK-Era smart contract on the Ethereum blockchain.
Benefits
Since the accounts are on a layer-2, users don’t need to use an EOA for initial set up and authorization. This adds greater scalability and complexity because smart contracts on layer-2s can process more computations without delegating to a third party like a relayer.
Risks
The exact process is too complicated to explain here, but the main concerns are rooted in the security and dependency of the layer-2 smart contract responsible for settling deposits and withdrawals.
ERC-4337 account abstraction
ERC-4337 account abstraction offers an approach that doesn’t require third party relayers, layer-2 smart contracts, or a consensus layer change. It lets people manage a smart contract wallet without ever needing an EOA.
It does this through providing a new standard of transaction messaging. Instead of executing transactions individually or sending the metadata of a set of authorized transactions to a relayer, smart contract wallets can send a series of user operations to a bundler.
So what is a bundler and user operation? And how are they different from a relayer and transaction?
Benefits and risks
To get a full breakdown of how this works, keep an eye out for an upcoming report from Blockworks Research analyst Ryan West.
In short, the model offers the potential for a more decentralized version of what relayers do for smart contract wallets like Safe.
But many on Twitter have pointed out that the current bundler infrastructure is centralized and fragile.
Twitter user @blockomotive stated, “there’s been other projects and technology offering transaction relaying services for a while.”
“However,” they added, “until many bundlers are up and running (which still requires dedicated [infrastructure]), the system remains centralized and fragile. Currently, only a few projects offer API services to run bundlers, increasing the centralization of 4337.”
And @Safe stated in February 2023:
“We are evaluating an EIP-4337 integration (also based on a module). We will only roll out this integration when we meet our very tough security standards.”
Final thoughts
Even though the majority of the smart contract wallet discussion is centered around alternative account recovery systems, there are many more exciting use cases. Smart contract wallets have the potential to customize the way users manage their identity online, vote on governance proposals, delegate user responsibilities of DAO wallet and more.
Read more: What Is Decentralized Identity? The Pillar of Web3
Most account abstraction methods still require some form of dependency — whether it is a relayer, bundler or layer 2 smart contract. Web3 users shouldn’t be expected to understand the difference in risk between the three primary alternatives.
But if the industry adopts a universal standard, users may feel more comfortable using smart contracts wallets — unlocking the smart wallet advocate’s promised new wave of adoption.