Skip to main content

Account Abstraction on the Flow Blockchain - A Comprehensive Overview

Updated on
Dec 11, 2023
Flow
Account Abstraction

7 min read

Overview

As crypto continues to evolve and grow, developers look for ways to continue to onboard masses onto Web3. One of the solutions that aims to solve many of the current UX and wallet limitations is Account Abstraction. Account Abstraction seeks to lessen the friction between users interacting with Web3. In this guide, you will learn more about Account Abstraction, what it aims to solve, how it works on Flow, covering concepts like the Flow Account Model, account linking, and then comparing it to how it works on Ethereum.

Let's get started!

What You Will Need


What You Will Learn


  • Learn about Account Abstraction
  • How Account Abstraction works on Flow
    • Flow Account Model
    • Account linking & AuthAccount
  • How Account Abstraction works on Ethereum (ERC-4337)

What is Account Abstraction?

As the name states itself, Account Abstraction looks to "abstract" away many of the complexities and management of Wallets (aka Accounts) to make the UX simpler for the user. Typically, users who want self-custody in Web3 today must memorize and secure their private keys. This can be dangerous in the event you lose access to your private key or seed phrase. Additionally, with self-custody wallets today, many of the processes can still be improved, such as batching transactions and paying transaction fees on behalf of others. Account Abstraction aims to improve this UX for users, making it more likely to onboard the next wave of masses onto Web3.

Account Abstraction on Flow

Flow Account Model

Flow's Account Model is designed to prioritize user ownership and access to assets while ensuring strong security. Unlike other blockchain systems, Flow has revamped the traditional way of account management by pulling valuable insights from different architectures (e.g., Ethereum accounts and smart contracts). This model is still anchored around smart contracts but with significant improvements. For example, Flow stands out with its access management feature. Instead of limiting users to a single key per account, as is the case with Ethereum and other EVM-based platforms, Flow permits multiple keys for every account. This multi-key feature not only allows for better security by enabling key rotation in case of risks but also makes it feasible for users to manage their accounts from multiple devices without risking key exposure.

Accounts Flow

Image Source: Flow Account Abstraction

The diagram above showcases Flow's Account Model and how you can access your account on any device, each device containing its own unique key.

Furthermore, Flow integrates the concept of key weights. This means that different keys can have varying levels of influence or authority over the account, enabling scenarios where multiple signatures might be required before executing certain operations. This feature is absent in EVM-based platforms, causing users to resort to potentially expensive and risky smart contract wallets. Flow also stands out in its compatibility with a variety of cryptographic signature algorithms, allowing users to choose between widely used setups or crypto-specific ones, ensuring more flexibility in terms of hardware and security.

Account Weights

Image Source: Flow Account Weights

The diagram above showcases key weights and how it can be designed to require N weights in order for a transaction to be sent. To dive more into Accounts on Flow, check out this documentation.

Social Recovery

Losing access to a digital wallet can be stressful, but with Flow, you don't have to compromise on security or ownership. Flow supports Social Recovery, which allows you to leverage your friends or services to recover your Flow account.

New or current users don't have to worry about paying gas fees if someone else is sponsoring them. With the Payer Role in a transaction, either an Application, Wallet, or User could pay the transaction cost. In the Flow ecosystem today, most applications sponsor transaction fees on behalf of their users.

Multi-Signature Transactions

Whether you are controlling a wallet with others and want some security before a transaction can be sent or executing a governance proposal on behalf of a protocol, the Authorizer Role allows for transactions to be co-signed by multiple keys, either from the same account or different accounts.

Parallel Transactions

You no longer have to wait for a transaction to be confirmed before sending the other. With the Proposer role on a transaction, an application or user can execute transactions in parallel or control the order in which the transactions are executed. This concept is also useful if you want to submit multiple purchases on an application at the same time or if you are interacting with another application and want to interact with another protocol simultaneously.

Walletless Onboarding

In order to solve many of the pain points we interact with in Web3 today, such as saving your seed phrases, managing wallet connections, and approving on-chain transactions frequently. Flow provides a solution called Walletless Onboarding.

Walletless Onboarding enables developers to create an in-app Flow account on behalf of a user using Email or social login. Walletless Onboarding also allows users to pay with traditional payment methods (e.g., debit, credit) and have a more seamless app experience by signing transactions on behalf of users.

Some projects that have already implemented this type of onboarding include Blocto, where you can easily create an account by using an email. However, some drawbacks of this process include losing composability, which takes away many of the benefits Web3 enables users. Additionally, Walletless Onboarding makes it harder for users to transfer digital items out of the app, and items can be lost if the app experiences issues.

Account Linking

At its core, the concept of account linking in Flow is all about sharing control over accounts. Picture it as a way for two accounts to have a special connection, where one can have specific permissions over the other. This sharing mechanism revolves around two main types of account access within the Flow framework. The first type is the PublicAccount. Think of it as a display window - it lets you see key details like an account's address or balance, but you can't make any changes to what's inside.

On the other hand, the AuthAccount has full access. Not only can you view all the details similiar to PublicAccount, but you can also make changes, sort of like having a special key to a room and the authority to rearrange it.

Now, the power of the AuthAccount doesn't just stop at viewing and editing. This type of account can create and use Capabilities. Imagine capabilities as special passes that let an account delegate certain actions or accesses to another account. So, when we talk about account linking, it's this capability feature at play. One account (the parent) can create this special pass and give it to another account (the child). This bond between the two accounts is formed in two main steps: first, the child account creates this pass and offers it to the parent. Then, the parent accepts and claims this pass, essentially linking the two accounts.

Linking Account

Image Source: Flow Account Linking

But why go through all this trouble of linking accounts? Consider a new user wanting to join an app on Flow. Normally, they'd need to go through the hassle of setting up a wallet, which might turn them off. With account linking, they can dive straight into the experience with no wallet setup required. This linking doesn't just stop at one app; users can link multiple app accounts under one main account, simplifying their overall experience. And the cherry on top? They get to truly own and control their digital assets across different apps, all while keeping everything secure and seamless. However, like any powerful tool, account linking must be used wisely to ensure security and trust.

Account Abstraction on Ethereum vs. Flow

Account Abstraction, in the context of Ethereum's blockchain ecosystem, aims to eliminate the distinction between Externally Owned Accounts (EOAs) and Smart Contract Accounts. Typically, Ethereum blockchain users must manage private and public keys to access and control their accounts. With Account Abstraction, this reliance on private and public keys is reduced by using smart contracts to verify the account's identity and functionalities.

Externally-owned accounts (EOAs) can initiate transactions but cannot contain code, while smart contract accounts contain code but cannot initiate transactions on their own. Compared to Flow, every account can contain multiple smart contracts and each account has its storage, which can be directly read and written by transactions and scripts. Flow uses "resources" which guarantee ownership and which can be stored in the storage of an account or sent between accounts. This makes the abstraction more user-centric, focusing on the user's ability to interact with various dapps. Flow's account model abstracts away much of the complexity of managing separate contract and user accounts, making it easier for developers to build and for users to interact.

For a deeper dive into Ethereum's Account Abstraction design, check out these guides:


Building on Flow with QuickNode

QuickNode proudly supports the Flow blockchain and allows you to create a Flow endpoint and begin building quickly. Create a free account here and check out our docs for step-by-step guidance on how to interact with your endpoint.

Once you have created a Flow endpoint, all you need to do is copy your HTTP Provider URL and plug it into your dApp or script.

Flow Endpoint on QuickNode

Additional Resources

To learn more, check out the following list of resources:


Wrap Up

As you've learned, Account Abstraction aims to bridge the gap between the traditional internet user experience (Web2) and the decentralized internet (Web3), making it more user-friendly and approachable for a broader audience.

There you have it! You've now gained a deeper understanding of Account Abstraction on Flow and how it aims to solve many challenges we face with user wallets today.

If you have any questions, check out the QuickNode Forum for help. Stay up to date with the latest by following us on Twitter (@QuickNode) or Discord.

We ❤️ Feedback!

Let us know if you have any feedback or requests for new topics. We'd love to hear from you.

Share this guide