Native Account Abstraction in ZKSync: Transforming the Blockchain Experience for Users
By Anju B Nair, Sr. Technical Content Writer, Kerala Blockchain Academy
Blockchain technology, especially crypto, has made significant strides since its inception. However, despite the significant growth and development, the user experience remains challenging for its mainstream adoption. Users often grapple with the complexity and inherent risks associated with crypto accounts. The perplexity in managing the wallet keys and the irreversible nature of crypto transactions hinder the entry of new users. Therefore, to achieve the mainstream adoption of crypto accounts, a few significant issues need to be addressed such as recovery wallets, multi-operational transactions, and pay fees in multiple cryptos.
In this article, we will discuss an initiative on Layer 2 that aims to resolve the above-mentioned challenges, thereby improving the user experience with crypto accounts by establishing a degree of security. We’ll see how users can design their own security systems to secure their wallet accounts. Assume that even if someone gets hold of your private keys, they need to meet other validation rules you set up to access your crypto account. Also, the added advantage of setting up a recovery method so that you won’t lose your account or the funds inside.
One of the most critical aspects of enhancing this experience is through Account Abstraction (AA). ZKsync, the Layer 2 scaling solution for the Ethereum blockchain, has integrated a “native account abstraction” feature which promises to revolutionise how users interact with the blockchain.
So before we move to the Native Account Abstraction, let’s understand what Account Abstraction constitutes.
Understanding Account Abstraction
Account Abstraction (AA) is an upgrade in the current account system that simply allows its users to establish their own transaction validation rules for their crypto wallets. In other words, Account Abstraction decouples the user accounts from the underlying blockchain protocol, allowing for more flexible and user-friendly account management. We know the traditional Ethereum accounts are of two types:
- Externally Owned Accounts (EOAs): Controlled by private keys, typically used by individual users.
- Contract Accounts: Controlled by smart contract code.
Account Abstraction unifies these account types, enabling any account to execute arbitrary code and facilitate features like multi-signature wallets, social recovery, and custom authentication mechanisms improving the account’s security.
We know in an EOA, if you lose your private keys, you end up losing all your crypto funds. Now, with the account abstraction feature, you can write arbitrary logic rules that make it harder for unauthorised people to access your account and initiate any transactions. Simply put, you get to customise your account to your choice. For instance, you can define your own rules, such that the unauthorised users should meet other validation rules you set up to access your account and thereby initiate a transaction. Likewise, you can define rules of how a transaction should be processed say implementing a multi-signature or allowing a transaction to happen at a certain time.
Early Moves Towards Account Abstraction
Do you know that less than a year after Ethereum’s initial release, the protocol EIP-86 tried to introduce smart contract wallets that could be thought of as “forwarding contracts”? This initiative aimed at accepting the transactions coming from an “entry point” address, an address from which anyone could send transactions given that they followed a specific format. However, EIP-86 demanded significant changes to the protocol, ending up not being merged. Then came the EIP 2938. This proposal, in 2020 introduced a new type of Ethereum transaction, which could be called an Account Abstraction Transaction. Although it was developed for some time, the account abstraction model posed several challenges at the protocol level as it demanded the addition of two new opcodes in the EVM to make the transaction viable.
EIP-4337 — A giant leap in the making.
The EIP-4337 came with an account abstraction in Ethereum with no consensus-layer protocol changes. EIP-4337 introduced account abstraction without any modifications to the core protocol. EIP-4337 achieved the goal of account abstraction allowing users to use smart contract wallets containing arbitrary verification logic instead of EOAs as their primary account. The proposal completely ruled out the need at all for users to also have EOAs (as status quo SC wallets and EIP-3074 both.)
ZKsync’s Approach to Account Abstraction
ZKsync, is an Ethereum Layer 2 scaling solution using zk-rollups developed by Matter Labs. It inherits Ethereum’s security while significantly reducing transaction costs and increasing throughput. The Native Account Abstraction in ZKsync is built into its protocol, providing a seamless and efficient implementation. Just like an EOA, the accounts in ZKsync can initiate transactions, and also have an arbitrary logic implemented in them, like a smart contract. The unified feature thus aims to deliver a newer experience when interacting with the blockchain.
Wondering how??? Let’s see.
The Native Account Abstraction will streamline the onboarding process for new users by enabling them to interact with the blockchain using familiar Web2-style authentication methods. It simply avoids dealing with the complexities of private key management and gas fees. ZKsync allows developers to implement custom authentication logic within smart contract wallets. This includes multi-signature schemes, social recovery mechanisms, and biometric authentication, enhancing security and usability. Also, ZKsync’s account abstraction enables users to pay transaction fees using various tokens, not just ETH. This flexibility simplifies the user experience by removing the necessity to maintain a balance of a specific token for gas fees.
Advanced Steps: Smart Contracts and Paymasters
Native Account Abstraction on ZKsync Era (the next generation of ZKsync, which focuses on providing a more scalable and user-friendly experience for Ethereum users and developers) is expecting to bring changes in how user accounts operate by introducing the concept of Smart Accounts and Paymasters.
Smart Accounts are fully programmable, allowing users the possibility for various customisations such as signature schemes, native multi-sig capabilities, spending limits, and application-specific restrictions. Simply saying users can determine how transactions should be processed in the future.
Paymasters, conversely, can sponsor transactions for users, enabling users to pay transaction fees in ERC20 tokens. This innovative approach to account management significantly enhances user experience, security, and flexibility, paving the way for broader adoption of blockchain technology. (In ZKSync, smart contract wallets are treated as first-class citizens, allowing them to pay transaction fees and initiate transactions directly. This contrasts with Ethereum Layer 1, where EOAs must sponsor transactions).
ZKSync: Transforming the Blockchain Experience
User Benefits
- Users can define custom logic for their transactions, allowing for more flexible and user-friendly interactions with smart contracts.
- Users can leverage advanced security features like multi-signature authentication to reduce the risk of losing funds on compromised private keys.
- Users can establish recovery options for accounts so that a comprised user account doesn’t mean to losing user funds.
- Users can pay gas fees on any token, not just ETH making it easier for users to interact with DApps without needing to manage multiple assets.
Other Benefits
- zkSync can support various types of accounts, including contract accounts and externally owned accounts (EOAs), providing flexibility for different use cases.
- zkSync can lower the entry barrier for new users, promoting broader adoption by supporting Web2-style authentication.
- ZKsync can include built-in security features such as account freezing and spending limits, which help protect user funds.
- ZKSync’s roll-up technology can handle a large volume of transactions efficiently, making it a scalable and affordable solution for decentralised applications.
- ZkSync’s native account abstraction is compatible with existing Ethereum smart contracts, facilitating a smooth transition for developers and users.
Conclusion
Native account abstraction in ZKsync represents a significant leap forward in the blockchain user experience. By integrating features like flexible account management, custom authentication, and streamlined fee payments, ZKsync paves the way for a more secure, user-friendly, and cost-effective blockchain ecosystem. We can anticipate that ZKsync’s approach to account abstraction may set new standards for the industry, driving the next wave of blockchain innovation and adoption.
References