Discover more from Web3 Bits and Bytes
From Transactions ▶️ Interactions: How is Account Abstraction taking web3 to the next level👀?
Simplify your web3 experience with account abstraction. The complete guide to understanding AA in 2023
to Gm gm folks🤟,
It's been a wild few weeks since our last edition of Bits n Bytes, and we've got plenty to catch up on. From the Startbucks NFT prices shooting up to the rise of decentralized finance, the world of web3 has been buzzing with excitement and innovation😳
Thanks for reading Web3 Bits and Bytes! Subscribe for free to receive new posts and support my work.
But first things first, we want to say a big thank you to ya’ll for patiently waiting for this edition after our little break. 🥰
We know you've been eagerly waiting for your weekly crypto snacks and munchies, and we promise to deliver
So grab your favorite beverage, put on your thinking caps, and get ready to dive into the fascinating world of Web3. Whether you're a seasoned builder or a curious newcomer, there's something for everyone in this edition of Bits n Bytes. Let's get started🌟
P.S.: we took Baburao quite too seriously 😛
While the markets are down and the bear market winter is still there, a bear Market is the best thing to happen to Web3 and cryptocurrency 😲
Why? You ask?🤓
Right now, there are many reasons to be optimistic that the growing pains we are experiencing, will be worth it in the long run. It’s the time to build and leverage new and existing tech to build the new version of the web that we keep seeing in those futuristic videos 🤩
It’s the time to maximize users' value and transform how companies do business. In the long run, it will be healthier for Web3 to have value as an underpinning instead of valuation bubbles. (ahem I know the names coming to your mind😝)
👉And when we talk about innovation, how can we miss account abstraction? That’s special on this week’s crypto menu with a side of EIP - 4337 explanation🤗
👉Don’t miss the desserts sections to know all the details on what new types of applications can be unlocked with Account Abstraction.
Coming to the real deal,
What in the world is Account Abstraction and why is it doing the rounds all over the Internet?
Well, it’s not a new term. The concept has been here for a while
If you’re reading this, chances are you’ve read a couple of resources for understanding account abstraction. You probably agree that 99% of posts start by describing the difference between EOAs and smart contracts and revolve around UX improvements.
Some even describe it as Web3's Secret Weapon !!!
They fail to explain what account abstraction actually is and instead focus on the byproducts of account abstraction. 🙄
Today’s edition covers everything from what account abstraction is to why it’s a game changer for blockchain’s adoption and much more👀
What is account abstraction (AA)?
Let’s first understand what it’s not
Sponsoring user’s gas fees🤑
A new kinda social login 🖥️
A native multi-sig ⛓️
Well, all of these are enabled by account abstraction but don’t truly define what it is❌❌
📌Account abstraction is a fancy term for a simple concept – making your life easier when using decentralized applications (dApps) in the world of Web3. A lot of you would’ve heard that with AA crypto will go from geek love to mass use.
📌 In order to find out if that’s really the case, we need to understand the nitty-gritty of account abstraction and understand the line of thinking behind this concept
EIP-4337, which we cover more in-depth later, written by Vitalik et al., says,
Achieve the key goal of account abstraction: allow users to use smart contract wallets containing arbitrary verification logic instead of EOAs as their primary account
EOAs Will Never Enable Mainstream Adoption😒
In the real world, losing your credit card doesn't mean you are completely doomed.
There are rules in place that allow you to do things like set payment limits, stop transactions, detect fraud, change funds to a new account, only allow funds to be transferred under certain conditions, etc.
In web3, if you make one mistake, your entire account is compromised and unrecoverable🤕
EOAs even compared to centralized stores of currency is 💩.
Well, we've dunked on EOAs enough, let's finally discuss the solution.
Some examples of use cases can be seen below👇
These are just a few of the capabilities that Smart contract accounts offer over traditional EOAs. The key thing here is: contract accounts are code🤓
This means anything you can write in code is therefore possible in a contract account🤯
But before we start ordering desserts (EIP-4337) we gotta finish the main course 🍱
History of Account Abstraction Proposals 📜
Let's quickly take a brief overview of the history of account abstraction proposals dating back to 2016, and explore why EIP-4337 is different😮💨
⌛ 2016: EIP-86 - Instead of using the mechanism that is currently hard-coded into transaction processing, the proposal allows users to create account contracts that carry out any desired signature/nonce checks.
⌛ 2020: EIP-2938 - Proposal to create a new transaction with type
AA_TX_TYPE. Transactions of this type are referred to as AA transactions
⌛ 2020: EIP-3074 - Proposal allowing users to delegate control of their EOA to a smart contract. Would allow any EOA to act like a smart contract wallet without deploying a contract.
None of these proposals have been merged into Ethereum❌
They are all currently in the stagnant category; implying they’ve been inactive for a period of 6 months or greater.
👉 These proposals' failure to be merged is partially attributable to the fact that they call for modifications to the Ethereum network's consensus-layer protocol.
👉 Until EIP-4337 was put forth in 2021; account abstraction on Ethereum wasn’t possible without changing the consensus layer!
🥁EIP-4337: Account Abstraction Using Alt Mempool
EIP-4337 introduces a pseudo-transaction object called a
UserOperation - a structure that describes a transaction to be sent on behalf of a user.
User Operations enter a alt mempool, which is a holding area for data on pending transactions.
On the Ethereum network, nodes have the option of acting as bundlers. User operations are collected by bundlers from the mempool and combined into a single transaction known as a bundle transaction.🤠
Once they have created a bundle transaction, they send it to the EntryPoint, a global singleton smart contract. On the entire blockchain, there is only one EntryPoint smart contract. The EntryPoint smart contract's handleOps function is called by the bundler🧐
When this function receives a transaction bundle, it calls the unique validateUserOp function on each account. Each wallet for a smart contract must include this feature.
Before continuing to execute the operation, validateUserOp should check the operation's signature and pay the fee if the account deems the operation valid.
In order to carry out the operation that the EntryPoint contract sends in, each smart contract wallet is also required to implement a second function, which is anticipated to be called execute.
Here’s a simplified view for all those who skipped reading the above 😜
Bruh, Is it secure to use Account Abstraction though?
Account abstraction is a secure method for developing decentralised applications, but like any technology, the success of account abstraction depends on how it is used😧
📌 One possible security risk related to account abstraction is the possibility of bugs or vulnerabilities in the abstraction layer's implementation.
📌An attacker might be able to take advantage of the situation to steal money or carry out malicious actions on the blockchain if the abstraction layer's management code has bugs. As a result, it's imperative to confirm that the code for the abstraction layer has been thoroughly tested and reviewed by security experts. It must be carried out without disclosing private keys or other private information about the account. This can lessen the chance of key theft or other attacks relying on stolen login information.
📌 The possibility of contract interactions with malicious or flawed smart contracts is another potential risk of account abstraction. The abstraction layer could be used by smart contracts with security flaws or malicious intent to launch attacks against other contracts or syphon money from user accounts. Before interacting with smart contracts through the abstraction layer, it is crucial to carefully review and audit them🙆♀️.
📌 The implementation of the abstraction layer, the security of the smart contracts that interact with it, and the security habits of users and developers are just a few of the variables that affect how secure account abstraction is overall. When using account abstraction, it's crucial to adopt secure development practises, routine code audits, and a comprehensive approach to security.
However, by enabling smart contracts, account abstraction can also offer security advantages🤩🤩
All that’s okay, But why Does This Matter🧐?
Contract accounts are the next evolution of wallets required to provide a much-needed improvement to the UX of web3.
The possibilities are really endless for what this change enables😲:
Creating wallets for your users under the hood when they sign up for your app
Session keys for web3 games (allow any X transaction for Y amount of time without the need for signatures on each transaction)
Team wallets to use decentralized applications with tiered permissions
A grandma could be collecting NFTs and not even know what the blockchain is👵. Account abstraction enables everybody to use web3; not just tech enthusiasts.
Ending a wholesome crypto lunch with some amazing desserts🍩🧁:
Time to look at the practical applications of account abstraction 👇👇
A cryptocurrency smart-contract wallet that allows users to securely store, manage, and interact with their digital assets. It is designed to be user-friendly and it is one of the first wallets which has native support for Account Abstraction
Multi-factor authentication & enhanced security 🔐
In modern banking, two-factor authentication is increasingly the standard for sizable transfers to new addresses. What if you desired a similar or even smarter level of cryptographic protection? You can now.
👉 Account Abstraction allows you to create accounts that need signatures from various keys, with a transaction only proceeding if specific requirements are satisfied.
How does using a multi-signature wallet like Gnosis Safe differ from this?
The distinction is that wallets utilising AA can provide greater customization, security, and usability.
With AA, you can modify the security settings on your account to suit your needs and approve transactions using a variety of different devices.
Pay fees in any token 🤩
The status quo in Ethereum is that you need to have a certain token to pay a gas fee. This can be a burden for users as you need to make a transfer or trade to get the right one. With Account Abstraction though, you can pay gas fees in any token.
Projects can pay fees on behalf of people🤑
Projects can act as ‘paymasters’ paying the gas fees on behalf of users. This significantly reduces the friction for users.
Accounts can use the well-known proxy pattern and assign the execution to an implementation because they are contracts and can use it. Users can upgrade the code of their account as new features become available if the proxy is designed to be upgradeable.
Account Abstraction, in our opinion, represents a real advance for cryptocurrency. Additionally, scaling both transactions and the self-custody user experience is finally possible when Layer 2 technologies like zkSync and StarkNet are added to AA.
In conclusion, Account Abstraction in webs is like giving your Ethereum account a superpower. 🪄
📌 With Account Abstraction, you can send and receive transactions using any type of asset, not just Ether.
📌 You can also perform complex smart contract interactions without needing to worry about whether you have enough Ether to cover the transaction fees.
📌It’s like having a superhero sidekick that takes care of all the mundane stuff so you can focus on the big picture.
📌 So go forth, web3 developers, and harness the power of Account Abstraction to create amazing decentralized applications that will change the world!
Web3 magic combined with web2 simplicity.
Well that’s a wrap for today! 😌
If you want more web3 gyan, then, be sure to follow us on Twitter (@Web3_BNB)
How'd you like today's web3 Bytes?
Let me know in the comments 👇
Thanks for reading Web3 Bits and Bytes! Subscribe for free to receive new posts and support my work.