What is a Smart Contract Wallet? ERC-4337 Explained
As the name implies, a smart contract wallet uses smart contract code to automate transactions, manage assets, and enable more powerful features. Learn more.
Cryptocurrency has revolutionized the way we think about money, offering decentralization, privacy, and financial sovereignty. Yet, navigating the crypto ecosystem can be intimidating, especially for newcomers. One of the biggest challenges is securely managing your digital assets.
Traditional crypto wallets, while functional, often lack user-friendly features and can pose security risks if misused. This is where smart crypto wallets come into play, offering customizability options.
By adding different types of logic to the smart contract’s code, smart contract wallets unlock powerful new features — such as recoverable wallets, signless transactions, batched transactions.
But what is a smart wallet, and how does it differ from the wallets you're already familiar with? Let’s dive in.
What Is a Smart Wallet in Crypto?
A smart wallet is an advanced type of cryptocurrency wallet that leverages smart contracts to offer enhanced features. Essentially it unlocks capabilities such as automation, multi-signature transactions, and simpler security protocols. Unlike traditional wallets, which store your private keys and facilitate basic transactions, smart wallets integrate programmable logic directly on the blockchain, enabling a more customizable and user-friendly experience.
The History of Smart Wallets
To understand the history of smart wallets, lets first dive into what web3 wallets were at their inception.
What is an externally-owned account (EOA)?
An externally-owned account (or EOA) is a web3 wallet created by generating a public-private key pair. The account owner (individual or organization) can then use the key pair to access and manage the funds associated with the account.
Most of the popular web3 wallets on Ethereum, such as MetaMask or Ledger, are EOAs. You can use them to initiate transactions with other EOAs or smart contracts and send transactions.
While EOAs have been fundamental to interacting with blockchains, their UX is not ideal. Managing the private keys they rely on can pose some logistical issues, not to mention the challenge of keeping them secure.
That's where smart wallets come in.
The introduction of smart contract wallets
At the Ethereum network's launch, smart contracts were introduced. Essentially, smart contracts are computer programs that self-execute when predetermined conditions are met. While they are most popular for web3 apps, they can also be used to create smart contract wallets with more functionality than traditional EOAs. And that's exactly how smart contract wallets were introduced!
What Are Smart Crypto Wallets Used For?
So we know that smart wallets have extra capabilities and are programmable, but lets dive into some of the functionality that unlocks with some tangible use-cases:
Automated payments and interactions
By integrating seamlessly with decentralized applications (dApps), smart wallets unlock the possibility of automated staking and yield farming, or participating in decentralized autonomous organizations (DAOs). They can also be used to set up automated processes to manage liquidity pools or interacting with DeFi platforms.
Adaptable Multisig Functionality
Smart crypto wallets support multi-signature (multisig) functionality, where multiple parties must approve a transaction before it is executed.
For example, you could add your hardware or hot wallet or other people you trust as your co-signers or guardians. Multisig wallets are extremely important for any web3 business or app that relies on multiple people and has any kind of treasury. And with smart wallets, you can customize how your multisig works.
Advanced security measures
Smart wallets also allow you to set up guardians, who can help you recover your wallet and assign a new admin EOA - a mechanism called social recovery. Plus, they also let you add another layer of security using either in-app multi-factor authentication or third-party authenticators.
Personal Asset Management
Smart wallets also give you the power to control your own spending. Unlike EOAs that only allow you to initiate transactions and approve them, smart contract wallets help you set a range of parameters for managing transactions.
For example, you can set a daily transaction limit, blocked addresses, or set a time when you do not need your guardians to sign multi-sig transactions. You can even bundle multiple transactions into one, and automate recurring payments, such as for online subscriptions.
Pre-generated crypto wallets
Companies or projects can easily generate new non-custodial crypto wallets for their users the moment they sign up. Users will no longer have to worry about managing private keys or remembering seed phrases.
Team wallets
Teams can set up team wallets using smart crypto wallets to add multiple users with tiered permissions, thus giving them only the required level of control.
Gas Sponsorship
ERC-4337 introduced the ability for dApp developers to pay the gas on behalf of their users. This can be especially useful for free NFT mints or other kinds of airdrops. Further, smart account users can add fees in any ERC-20 token they prefer, compared to EOAs that only allow gas to be paid in ETH.
It is important to note that these features and customizations may vary depending on the wallet provider you use.
Traditional Wallets vs. Smart Crypto Wallets: What's the Difference?
While both traditional and smart wallets serve the same fundamental purpose—storing and managing cryptocurrency—they differ significantly in their functionality and user experience.
Feature | Traditional Wallets | Smart Crypto Wallets |
---|---|---|
Security | Relies solely on private keys | Multi-signature, social recovery, and programmable security |
Ease of Use | Requires manual management of private keys | User-friendly features like automation and recovery options |
Features | Basic sending/receiving functionality | Advanced features like spending limits and automated payments |
Flexibility | Limited | Highly customizable |
Smart wallets address many of the pain points associated with traditional wallets, providing a smoother and safer user experience.
Types of Smart Wallets
When you hear the term "smart wallet" in crypto, it will typically mean one of two things:
Traditional smart contract wallets
Smart contract wallets are controlled by and deployed by EOAs. To initiate a transaction with a traditional smart contract wallet, you'll need to use an EOA and you'll need to pay a gas fee to do so.
This means any smart contract wallet you make treats the EOA that created it like a parent or admin. While the smart contract wallet has its own wallet address, it doesn't have its own private key: that's why it relies on an EOA. Each transaction executed by the smart contract wallet must be pre-approved and signed with the EOA first.
Examples of traditional smart contract wallets include Biconomy and Safe.
ERC-4337 Account Abstraction Wallets
ERC-4337 is the Ethereum standard that introduced smart accounts to all EVM-compatible blockchains via account abstraction. Account abstraction simply refers to separating (abstracting) an account from the blockchain, without making any changes to the underlying blockchain. The contract accounts created using account abstraction are called smart accounts.
Unlike traditional smart contract accounts, ERC-4773 smart wallets don't rely on EOAs, removing the need for private keys at all!
A good example of ERC-4337 smart crypto wallets are thirdweb Account Abstraction wallets.
How Do Smart Crypto Wallets Work?
Smart wallets operate by integrating programmable blockchain-based logic into wallet functionality. This enables them to perform more complex operations than standard wallets.
Smart Crypto Wallets Leverage Smart Contracts
At the heart of a smart wallet lies a smart contract. You can think of a smart contract like a computer program, apart from it lives on the blockchain rather than a single computer.
Smart contracts are sets of preexisting rules that allow set functions to execute automatically when they are activated, such as transferring funds or approving transactions. Since the action will only be executed when the conditions are met, they can operate autonomously, and without a middleman.
Smart crypto wallets use this programmable capability to implement features to improve their functionality, be it the the wallet’s security, adaptability or compatibility with blockchain apps.
How traditional smart contract wallets work
Traditional smart contract wallets rely on the EOA that creates them to sign and verify transactions. In short, they still rely on a private key they don't directly control. Although they have added functionality over EOAs, they suffer the same issues, namely their complex recovery methods that hinder mass adoption.
How ERC-4337 Smart wallets/ Accounts work
ERC-4337 smart wallets don't use private keys, but can still authorize transactions. Instead, they send a UserOperation object that defines the purpose of the transaction and has the relevant data for verification.
The requested UserOperation goes to an alt mempool — a waiting area specifically for pending smart account transactions — and waits for bundlers (nodes) to pick up transactions, bundle them, pay the gas fee and register the function in a block.
To prioritize transactions, bundlers use a similar logic to how miners or validators prioritize transactions in the mempool based on the fee associated with each of them. Bundlers earn the combined fee paid within all UserOperation they bundled.
Why Are Smart Wallets So Important?
Smart wallets are important since they unlock a world of use-cases not possible with traditional crypto wallets.
No private key management, No Complexity
First of all, traditional wallets require manual management of private keys and seed phrases, which can be daunting for beginners. Mistakes—like losing your private key—can lead to irreversible losses.
Smart wallets simplify this process by adding user-friendly crypto wallet recovery mechanisms, such as social recovery or trusted guardian setups. This ensures that even if you lose access, your funds remain safe.
Increasing Security Without Sacrificing Convenience
Unlike traditional wallets, which rely solely on the strength of a private key, smart wallets can enforce multi-layered security measures. For example, time-locked transactions and multisig wallets are two top-tier security features you can implement with smart crypto wallets.
Unlock true customizability
With a smart crypto wallet, you can essentially customize it to do what you like (within reason of course). While it would have been impossible to set up a recurring payment, such as an art subscription, with a crypto wallet previously; with a smart crypto wallet, the whole process is simple. You can also set up ways to manage your own funds, like spending limits. Plus, you can manage multiple wallets simultaneously and let them communicate with each other without your assistance.
Expanding Standardization across the EVM Ecosystem
While previous smart contract wallets like Argent or Biconomy exist, ERC-4337 standardizes account abstraction throughout the EVM ecosystem. This makes it much easier to create interoperable performant smart wallets and apps supported by them.
How to Choose a Smart Crypto Wallet
The best smart crypto wallet depends on your specific needs. Not every smart wallet will operate in the same way—just like not every smart contract operates in the same way.
Before you choose which smart crypto wallet you want, here’s what to consider:
Security Requirements
If you’re looking for a smart wallet to improve your security, you’ll need one that offers multisig features, and perhaps time-locked transactions if you think you’re at risk of getting drained.
Functionality
For DeFi enthusiasts, choose a wallet that integrates well with your preferred dApps and staking platforms.
Ease of Use
If you want to get started with smart crypto wallets, but you’re not very experienced, opt for wallets with intuitive interfaces.
Blockchain Compatibility
Of course, if you want to use a smart crypto wallet, it will need to be compatible with the blockchain and tokens you plan to use.
How to Create Smart Wallets With thirdweb
thirdweb offers an all-in-one toolkit for deploying secure performant smart wallets powered by ERC-4337 account abstraction. If you're ready to deploy a smart wallet with next-level features, here's a step-by-step guide to get started:
Step 1: Set Up Your Development Environment:
Install the necessary tools, such as Node.js and the Thirdweb SDK and connect to a blockchain network like Ethereum or Polygon.
Step 2: Set Up thirdweb SDK
Install the Thirdweb SDK and configure your environment and connect to a supported blockchain like Ethereum or Polygon.
Step 3: Create your Smart Wallet Contract
Write a smart wallet contract or simply use thirdweb’s pre-built smart wallet contract template. You can customize it with features such as spending limits, multi-signature requirements, or social recovery options.
Step 4: Deploy the Smart Wallet Contract
Use thirdweb's contract deployment tool to deploy your smart wallet securely and efficiently.
Step 5: Integrate With dApps:
Connect your wallet to thirdweb's APIs to enable seamless interaction with DeFi protocols, NFT marketplaces, and more.
With thirdweb Account Abstraction, creating robust, feature-rich smart wallets is accessible to all kinds of developers: no custom code needed!
Programmable Smart Wallets: Level up your experience
Managing digital assets shouldn't be a stressful experience. Smart wallets revolutionize the way we interact with cryptocurrencies, solving key challenges like security, complexity, and flexibility.
thirdweb’s smart crypto wallets are a game-changer for developers and businesses, offering customizable Features, seamless dApp Integration and full developer toolkit.
If you want to implement smart wallets for your web3 app, defi platform or consumer app, thirdweb provides an all-in-one solution.
So what are you waiting for? Dive into thirdweb Account abstraction to build your own smart wallet with programmable features.