Henri Stern
|Aug 17, 2023
The last year has seen the infrastructure to build hybrid (on + off chain) apps finally mature – we are now entering an era in which self-custodial apps can delight even mainstream users. Today, we’re extremely excited to announce our partnership with ZeroDev to power better experiences using smart contract accounts (otherwise known as “account abstraction” or “AA”) and self-custodial embedded wallets. Starting today, you can easily integrate ZeroDev alongside Privy to create smart wallets from your users’ embedded or external wallets, allowing you to enhance your app with gas sponsorship, batched transactions, and more!
Check out our guide here to get started!
ZeroDev is the most widely used toolkit for creating ERC-4337-compatible smart wallets on EVM chains today. . By integrating with ZeroDev, Privy enables you to spin up “smart accounts” for your users, using ZeroDev as the on-chain account system for your user and Privy’s embedded wallets (or your user’s existing wallet) as the underlying signer which owns the smart account.
Concretely, this means your user gets all of the benefits of Privy’s embedded wallets—customizable UX, singing in with familiar systems like email or social log ins, a self-custodial keypair—along all of the benefits of account abstraction—gas sponsorship, transaction batching, session keys, and more!
But let’s take a step back with a primer on account abstraction
We’ve talked at length about AA here at Privy – if you know about AA and signers already, you can skip the next couple of sections.
Traditional Ethereum wallets are known as Externally-Owned-Accounts (or EOAs). This is what your MetaMask, Coinbase Wallet or Phantom accounts are. With these systems, your ethereum account (the on-chain address you get) is uniquely derived from the cryptographic keypair that can sign on its behalf. So one keypair, one address.
Now this tight coupling of the underlying cryptographic keys and the account they control has been described as “Ethereum’s original sin” – an early architectural decision that has impacted usability in the space. And you can see the result of this design choice in everyday crypto UX: from first-order effects like “If you lose your keys, you lose your account” to more complex interactions such as having to fund an account (usually through an arduous fiat-to-crypto on-ramp) in order to take any on-chain action.
For a simple analogy, the current state of wallets has us asking a user who wants to walk a block to get a driver’s license and buy a car. Any on-chain interaction requires downloading a wallet, filling up the tank (to pay for gas) and learning to use it. The complexity shows: web3 has been reserved for the highly technical, motivated user to date.
Separating the signing keys (your cryptographic keypair) from the account for which they sign is often referred to as “account abstraction.” This separation gives developers a lot more freedom on how to shape their UX and run their on-chain account system (to pay for gas on behalf of users on certain interactions for instance). Abstracting accounts away from signing keys lets the developer abstract a lot of the underlying technicals away from their user.
This idea is by no means novel and talented teams have been working on AA systems for a long time. However, recent efforts to standardize a model for creating on-chain accounts with a flexible signing system (known as ERC-4337) have created a surge in interest and development in the AA space and some very exciting solutions have emerged as a result.
In the short term, these smart contract accounts will unlock a few core features for developers in the space, namely:
⛽ Simple gas sponsorship – so developers can pay for gas on behalf of their users, no more having to on-ramp to perform simple on-chain actions.
🧮 Batching transactions – so you can tee up multiple transactions for a single end-user signature enabling, for instance, a user to sell multiple NFTs on a marketplace in one click.
And there’s a lot more coming after that…
We’ve only started exploring what a more flexible account system on-chain will enable but it is clear that it will enable far better UX for users and better interoperability across apps in the short term. No more having to ask a user to buy a car to walk a block, your user can now hail a cab or bike on over – the UX of on-chain interactions can match the dynamics of your app.
Now, it is worth acknowledging two facts:
Account Abstraction is still at the cutting edge and much work remains to be done to standardize smart contract accounts across app ecosystems and chains.
Using Account Abstraction, your user still needs to have cryptographic keys. Account abstraction gives developers and users a lot more flexibility over how to manage accounts but the buck still stops with the party that controls the cryptographic keys.
So how should a developer build with AA today?
This is where Privy + ZeroDev comes in.
Using Privy’s embedded wallets as signers for ZeroDev smart accounts, you are able to seamlessly tap into the powerful features of account abstraction all while keeping your users’ cryptographic keys safe using Privy’s MPC architecture. Together, Privy and ZeroDev enable groundbreaking UX for mainstream users looking to access decentralized systems.
Check out our guide to get started today.
This collaboration is only the beginning. In the months ahead, we will continue to roll out the integration, with custom UIs and integrated triggers to enable automated smart account creation on login.
A new era is coming in which users can be delighted while staying in control of their assets and identity online. Together, we’re excited to help you build for this world.