The DeFi world is booming, with multiple cryptocurrencies everywhere. Where does anyone store their digital money and assets? That’s right, in their digital wallets.
So, imagine if your DeFi wallet could now store multiple NFTs. Or your seed phrase in your wallet got lost. Or what if you could automate transactions from your wallet like a smart contract?
Well, account abstraction in Web3 turns those dreams into reality. And the Safe Wallet by the Gnosis chain is here to aid you on your journey to transition from your ordinary Web3 wallet to a smart contract wallet that is a game changer in Web3.
This blog explores Web3 wallets, account abstraction, and ERC 4337… and to top it off, we’re also looking at Safe Wallet from the Gnosis Chain and Wallet Connect.
We will also explore how Wallet Connect works with the SAFE wallet for a better UX.
A Brief on Web3, Cryptocurrency, and Web3 Wallets
Web3 is a decentralized iteration of the World Wide Web where data is open, transparent, accessible, and yet safe within the custody of the user and secure with encryption.
The idea for such a space came to Satoshi’s genius mind only to create Bitcoin. A peer-to-peer network where transactions can occur among friends and strangers. Transactions that are viewable but immutable by anyone present within the network
Wait! But how does one transfer currency here? Well, we have a different type of currency altogether. Gone are the days when you used Venmo or PayPal to pay your contact in € or ₹.
Thus, Web3 uses digital tokens as currency. These tokens are of a standard that represents a particular blockchain or organization.
Consequently, there are numerous coins from different blockchains, protocols, DEXs, DeFi organizations, DAOs, games, etc. And the total supply for each coin varies depending on the blockchain.
And again, where do you store these crypto coins? In a Web3 wallet that is compatible with the tokens and the standards, they are built in.
Also read: Getting to Know Web3 Wallets
Simply put, Web3 wallets are specialized wallets in the decentralized space. These digital wallets store cryptocurrencies, NFTs, and stablecoins. Basically, all your Web3 assets.
However, they never work in an automated fashion and always require a party to sign when a transaction occurs. This ensures the security of the transaction, as the person who signs it is solely responsible for the transfer.
But, just imagine if they could work in an automated way — much like smart contracts in blockchain! Wouldn’t life be a little easier and nicer?
Account Abstraction and ERC 4337
Account abstraction is a concept in decentralized finance (DeFi) and Web3 that allows users’ Web3 wallets to interact with smart contracts without needing to hold or manage the underlying cryptocurrency themselves.
With account abstraction, users can pay transaction fees in any cryptocurrency, rather than being limited to the specific token used by the smart contract. This means that users can participate in DeFi applications without needing to hold multiple cryptocurrencies or worry about gas fees.
Additionally, account abstraction allows for more complex transaction types, such as escrow or atomic swaps, to be executed on the blockchain with greater ease and efficiency. Account abstraction makes DeFi more accessible and efficient.
Moreover, account abstraction within smart contracts enables users to interact with decentralized applications without requiring the specific cryptocurrency the contract uses. It simplifies the transaction process by allowing users to pay fees in any cryptocurrency.
Realtime Use Cases of Account Abstraction
Account abstraction is a great way to automate many DeFi processes from a wallet or an account. Some examples where account abstraction aids in real-time are:
Decentralized exchanges (DEXs):
Account abstraction enables users to trade tokens on DEXs without holding the specific cryptocurrency to pay transaction fees. With this feature, account abstraction makes it easier and more cost-effective for users to participate in trading activities.
Cross-chain atomic swaps:
Account abstraction facilitates cross-chain atomic swaps between different blockchain networks. With account abstraction, users can send and receive tokens on different blockchains without needing to hold multiple cryptocurrencies. Thus simplifying the transaction process and making it more accessible to a wider range of users.
Account abstraction aids in creating decentralized escrow services where two parties can agree to a transaction and hold their tokens in a smart contract until certain conditions are met. With account abstraction, users can pay transaction fees in any cryptocurrency, making it easier and more cost-effective to use escrow services for various purposes, such as online marketplaces or dispute resolution.
Account Abstraction and Ethereum
Account abstraction makes Ethereum more flexible and scalable by reducing the need for users to hold multiple cryptocurrencies and simplifying the transaction process. By enabling users to pay transaction fees in any cryptocurrency, account abstraction makes it easier for users to interact with decentralized applications, including DeFi.
Further, this reduces the burden on the Ethereum network, leading to increased scalability.
Additionally, account abstraction allows for more complex transaction types, like atomic swaps, which execute with greater efficiency and lower costs.
Overall, account abstraction enhances the flexibility and scalability of the Ethereum network, making it more accessible and usable for a range of users and use cases.
The ERC 4337
What started as an EIP 4337 [Ethereum Improvement Proposals], the ERC 4337 is an Ethereum Request for Comment #4337 that allows a wallet or an account to have account abstraction functionality without changes occurring at the consensus layer.
Deployed to the network on March 20, 2023, this standard helps automate certain transactions like smart contracts. The system contains an object called UserOperation that carries the details of the transaction and the required signatures.
Further, EIP 4337 is a proposal that’s ready to deploy because it doesn’t change the protocols at the consensus levels and only aids in better transactions.
Need for ERC 4337
We know that smart contract accounts only deploy as per predefined conditions within the network. As per Ethereum’s documentation, the need for EIP 4337 and ERC 4337 arose because, although smart contract accounts are available, one cannot operate the accounts like an EOA.
Despite that, Ethereum believes that the ERC4337 standard will bring a lot more benefits to the blockchain than account abstraction. This would further ease its functions for users, validators, and nodes.
Further, ERC 4337, not only provides smart contract functionality to the contract but also bundles up transactions. Bundling transactions eases the hassle of multiple signatures for multiple transactions occurring from the same wallet.
Did anyone tell you about the recovery feature of crypto wallets yet? Because recovering seed phrases/ private keys just got easier. Well, that’s an account abstraction for you!
Benefits of ERC 4337
The ERC 4337 token from Ethereum came with a lot of benefits. The most benevolent benefits blockchain has are:
- Account Abstraction: Give users access to a single account with the smart contract and EOA functionality.
- Decentralization: Enable participation from any purported bundlers.
- Consensus Changes: As the Ethereum consensus layer concentrates on scalability-oriented upgrades, avoid consensus changes to facilitate speedier adoption
- Novel Use Cases: There are novel use cases such as aggregated signatures, daily transaction limits, account freezing in an emergency, whitelisting, and privacy-preserving software..
- Savings: One can save on gas and time because bundlers can combine UserOperation objects into a single operation.
Benefits of Account Abstraction
Account abstraction makes the Web3 smart contract account behave like an EOA. Some benefits of account abstraction are:
- Better UX: Account holders can now go through a transaction process where they need not look into the nitty-gritty details of the transaction. It also makes it easier to interact with DApps and other Web3 protocols.
- Complex Transactions: Account Abstraction enables complex transactions, such as sending money from escrow services. These transactions occur on the blockchain through smart contracts that contain the code to follow the instructions.
- Network Load: By letting users pay transaction fees in almost any cryptocurrency, account abstraction reduces the network load multifold, especially on Ethereum.
- Interoperability: Account abstraction allows for interoperability between blockchains and multiple Web3 accounts. The interoperable function makes it easier for users to shift between blockchains whenever they want to.
- Enhances Security: Account abstraction enhances security by letting users send and receive tokens without exposing their private keys or requiring them to hold multiple cryptocurrencies.
The Safe Protocol
What is the Safe Protocol?
The Safe Wallet, by the Gnosis Chain, is a non-custodial wallet that runs on account abstraction. The smart contract-based digital wallet service comes from Gnosis Safe. This protocol came into existence to provide a safer, more secure, and easier way of transferring digital assets over Web3.
Further, this open-source project contains protocols, APIs, and SDKs for programmers to integrate the protocol into their applications. It’s quick, efficient, and, most of all, easy to work with while making your Web3 wallets secure.
So, why should you adopt the SAFE protocol? Because the features and advantages this protocol provides are like no other. Don’t believe it? Well, here’s a list of features and advantages one may have with the Safe protocol.
Features of the Safe Protocol
Some of the main features of the Safe Protocol are:
- Easy On-Boarding: Using Web3 Auth to authenticate sign-in, the Safe protocol allows for an easy transition for users new and old to Web3.
- Wallet-less Sign-in: Users can now sign in to their accounts without connecting to a wallet address. They can sign in with the sign-in account the user has.
- Gas-less Transactions: Gelato provides users with gas-less transactions, i.e., although one may have to pay a fee, the gas fee would be much less than before.
- Transaction fee Flexibility: Although one cannot escape the transaction fee, one can choose how to pay. One can either pay with the native token or the ERC-20 token. So, one needn’t worry if they are low on ETH.
- Purchasing Power: The Safe Wallet Protocol allows one to purchase digital assets such as cryptocurrencies and NFTs using crypto coins or credit cards! [This feature is still being built with careful consideration and limitations on functionality.]
- Self-custody: The wallet is yours to control. All the data and asset information present are not under the control of or visible to a third party.
- Multisig Transactions: A wallet is in the control of multiple parties, i.e., a transaction cannot occur without the voting and approval of the majority of the co-owners. Thus providing a more secure wallet with multiple private keys.
- Account Abstraction: One of the most amazing features that Safe Wallet offers is account abstraction. The safe wallet attains this feature by executing smart contracts with predefined conditions.
Advantages of the Safe Protocol
The Safe Wallet by Gnosis is a non-custodial Ethereum wallet that offers several advantages, including:
- Enhanced Security: The Safe Wallet incorporates multiple security features, including multi-signature functionality and hardware wallet integration, to ensure your funds are safe and secure.
- Customizable Access Control: With the Safe Wallet, you can set up custom access controls, including multi-factor authentication and time-based restrictions, to ensure that only authorized parties can access your funds.
- Easy Management of Multiple Assets: The Safe Wallet supports multiple assets, including ETH, ERC20 tokens, and NFTs, and offers an easy-to-use interface for managing your holdings.
- Support for DeFi Applications: The Safe Wallet is integrated with popular DeFi applications such as Uniswap, Compound, and MakerDAO, making it easy to manage your investments and earn yield.
- Open-source and Community-driven: The Safe Wallet utilizes open-source software. It is maintained by a community of developers and contributors, ensuring that it is constantly evolving and improving.
- Multi-chain Functionality: The Safe wallet is compatible with most of Web3’s prominent blockchains, such as Polygon, Optimism, Aurora, Arbiutrum, Ethereum, and Gnosis (of course). One can use their wallet across different blockchains for various needs and have an easy time signing in and signing out.
Security of Wallets Within Safe
The security of the Safe Wallet comes from the multi-signature character it possesses. Having multiple parties take control of the transaction only means that the transaction has been approved and wasn’t faux.
Further, the essence of the multi-signature wallet’s security comes from each individual co-owning the wallet having different private keys. No one can validate a transaction using someone else’s private key.
Consequently, the smart contract-based wallet protocol is crucial to secure the wallet. So, let’s see how digital agreements aid in wallet security.
How Safe Wallets Work
The Safe Wallet Protocol is a smart contract-based digital wallet system that utilizes multi-signature technology to provide enhanced security features. Here’s a simplified explanation of how it works:
Wallet Creation: To create a Safe wallet, a user sets up a smart contract on the Ethereum blockchain using the Safe Wallet Protocol. The user then defines a list of addresses that can control the wallet, including their own and those of any other individuals or entities they choose.
Multi-Signature Authorization: Transactions sent from the Safe wallet get executed if a specified number of authorized signatures are present.
For example, if the wallet is set up such that it requires two signatures to authorize a transaction, both of the authorized signers must provide their signatures for the transaction to execute.
Enhanced Security: The multisig feature within Safe tightens security for the digital assets present in a wallet. This helps protect against hacks, thefts, and other security risks when using a single-signature wallet.
User-Friendly Interface: In addition to its security features, the Safe Wallet Protocol also offers a user-friendly interface for managing wallets based on the protocol. The Gnosis Safe team provides a web-based interface that allows users to easily view transaction history, manage multiple wallets, and customize wallet settings.
Overall, the Safe Wallet Protocol provides a secure and user-friendly way to store and manage digital assets on the Ethereum blockchain. It offers enhanced security features, multi-signature authorization, and a user-friendly interface to make it accessible to users with varying levels of technical expertise.
Account Abstraction with Safe Protocol
The Safe Protocol attains account abstraction without ERC 4337. Additionally, the protocol allows for a Web3 wallet that can run from the command lines present within the smart contract.
Smart contracts are tailored in a way to suit the needs of traditional external accounts and can deploy the necessary transaction upon meeting the prerequisite conditions.
It allows for multiple transactions to occur at once while sending them across the block with a much lower gas fee.
Wallet Connect and Safe
What is Wallet Connect?
Wallet Connect is an application that facilitates connections between DApps and Web3 wallets.
Why is connecting wallets essential in Web3?
Well, everyone knows that to work in Web3 and use any application in Web3, one must connect their Web3 wallet to the particular DApp.
The Web3 wallets behave not only as a mode of “signing in” but also as an account or identity with a particular Web3 wallet address.
Consequently, it allows users to interact with multiple DApps and multiple blockchains. This then further allows them to interact with DApps and sign transactions without showing their private keys to DApps or other private servers.
Further, the protocol increases interoperability between different blockchains and different DApps at a multichain level.
A user can sign in to all the DApps with just one click! How?
The Working of Wallet Connect
While the protocol uses a QR code to scan and sign in, it protects the integrity of the code through the presence of cryptographic key pairs. The cryptographic key pairs establish a secure connection between the user’s wallet and the Wallet Connect platform.
Features of Wallet Connect
Web3Modal: With Wallet Connect’s library, Web3Modal, one can easily operate with the multichain interface and manage all the wallet connections from a single view.
Sign: You can sign in once to all your wallets and ensure that all the transactions facilitated by the Wallet Connect platform are secure. Moreover, you need not face the risk of losing your private key to a third party.
Auth: All you need to do is sign in once, and you can access any part of Web3 because of interoperability between chains and networks. Your sign-in is safe. Also, you only need to either click or scan a QR code.
Push: Experience real-time Web3 with Push Notifications and don’t miss a thing. All blockchain activity, news, and updates come straight to your wallet. You can enable notifications and be constantly updated about the Web3 world.
Chat: Talk to your friends on the decentralized web with a private, Web3 wallet address-based chatroom. You can send texts, gifs, stickers, and crypto! Moreover, the ChatAPI works across platforms and chains, i.e., it can facilitate messages between any two WalletConnect users despite the current chain they are present in.
Advantages of Wallet Connect
Seamlessly login to Web3: Experience a one-click login to all of Web3 with Wallet Connect. Alternatively, scan your QR code and log in to all the DApps, DEXes, NFT Marketplaces, and any application on Web3.
Verification and Security: Wallet Connect does not store your private keys. But it also does not share your private information and private keys with other blockchains or organizations. While taking such steps towards security, the transactions are verified many times to maintain integrity within the blockchain.
Multichain functionality: Want to use an ETH-specific DApp? Go ahead, feel free to change your DEX from Uniswap to BSC, or come over to Polygon’s testnet and test a few transactions.
because multichain operations just became hassle-free.
Web3 Interoperability: Apart from multichain operations, DApps and wallets across Web3 can interact together and provide the user with an amazing and seamless Web3 experience.
Wallet Connect and the Safe Wallet
Wallet Connect works with more than 50 wallets across Web3. These wallets are custodial, non-custodial, hybrid, smart contract, and NFT wallets.
Amongst the lot, one of them is the Safe Wallet from the Gnosis Chain. So, not only does WalletConnect support major networks like Ethereum, which holds many wallet projects, but it also supports good projects on a single chain.
So, apart from all the benefits, Safe offers us while using Wallet Connect, it also helps with increased security for passcodes, private keys, sign-ins, and transactions.
Moreover, the gas fee or transaction fee becomes less while interoperability increases.
Account Abstraction is when a smart contract enables a Web3 wallet to behave like an EOA and perform multiple functions. Although many smart contract wallets are available, the ERC 4337 provides more than just account abstraction to the network.
Further, the Safe Protocol by the Gnosis Chain has protocols, APIs, and SDKs that aid in account abstraction of the Safe Wallet.
To top that off, WalletConnect provides a secure and easy way of connecting to multiple DApps with one common sign-in feature for all wallet accounts.