July 08, 2023
Image by unsplash.com
I want to start this article by asking you a few questions:
We could use Instagram or Twitter without knowing how it works. We need not learn about their underlying technologies to get started with it. But when it comes to the blockchain, one should be cautious of the networks they are, the token they are sending, and the address to which they are sending.
EIP-4337 aims to abstract out all the intricate details we currently raise related to accounts or wallets.
To understand the concept, we need to know about the background.
In the Ethereum network, there are two types of accounts:
EOAs are associated with a private key, which means control over access to funds or contracts. The other type of account is a contract account. A contract account has a smart contract code, which a simple EOA can't have. Furthermore, a contract account does not have a private key. Instead, it is owned (and controlled) by the logic of its smart contract code.
Because a contract account doesn't have a private key, it cannot initiate a transaction, but it can react to transactions by calling other contracts and building complex execution paths.
Think of Ethereum as a vast, decentralized state machine. Whenever someone needs to interact with the blockchain, they do it via Transactions, such as transfer tokens, stake tokens, or minting an NFT. Consensus rules govern the state changes, and the state is distributed globally so that every participant has the same state.
The network needs to know who issued the transaction; thus, every transaction must be signed. Though in some minority cases, this might not be the case.
A transaction changes the state of the network; it may include changing the balances because one has transferred the balance from one account to another. These state changes require fees; thus, a fee is associated with almost every transaction.
For those who have been interacting with the Dapps, the whole experience has become standard, but think from a perspective of a beginner who just wants to get started with it. There is a steep learning curve that might resist them to even get on board with Dapp and thus slowing down the whole adaption of web3.
Think of bridging tokens, wrapping tokens, different networks, storing private keys, remembering mnemonics, etc. That's not at all; what if you forgot your mnemonics? We have no such thing as Forgot Password button in our web 3.0.
If you forget, then you lose all the funds associated with it. There is no such thing as a nominee to help your dependents once you pass away. All these things make you wonder why have such a hassle. Why not stick with our centralized world where one can email customer care and ask them to help recover their account?
It's like giving a newbie such a huge responsibility that they often shrug it off and move on to something else.
The account abstraction proposal is the answer. You see, there is a lot of risk involved around the EOAs. If not EOAs then what? Smart account is the answer.
Account abstraction allows you to use smart contract wallets instead of EOAs. Let me put more effort into the statement: Account abstraction is a concept in Ethereum that will enable users to interact with the blockchain using a smart contract wallet (smart account) instead of a traditional externally owned account (EOA)
As discussed, smart contract wallets don't depend on public/private cryptography but on code. This means the logic for verifying transactions can be customized and is not tightly coupled with the public/private keys. Code can be flexible; you could have your logic to spend your eth, recover your account, or even add a nominee.
EIP-4337 is a proposal that aims to implement account abstraction without changing the Ethereum protocol. What does it mean? This proposal won't require hard forking, as it is implemented as an additional layer on top of Ethereum.
This feature will make Ethereum's account way more flexible and powerful.
Let's discuss a few use cases in detail:
The thing that haunts everyone in Web3 is, what if we lose our private keys? You'll lose all your funds unless a powerful quantum computer is built to recover your private keys, but that is also a long shot.
Realistically, all your assets will be lost forever or locked forever.
But one can use Account abstraction to customize the logic of your wallet so that you can regain your account through your friends or families whom you trust (Guardians).
Think of Guardians as any account, such as cold storage, a family member, or a third-party service. The user can specify whom they want to trust and what conditions they must meet to perform the recovery process.Let's say your private keys get exposed; what will you do now? Can you change it?
If you are using an EOA such as Metamask, you can only do a little other than move all your funds from your compromised account to a different account. Because it is the private key that signs the transaction, anyone can transfer your funds if it is exposed.
Let's say we have a smart contract wallet that uses account abstraction. We can change our signing key without creating a new account, just like we change our passwords once it gets compromised.
You will have to request recovery from your guardians and provide them with a new signing key that you want to use. The guardian doesn't get the signing key but the hash of it. If enough guardians approve your request, you can replace your old signing key with the new one and keep using the same account.
God forbids it, but what if you met with a fatal accident? How will your family get access to your funds? Will you want that fund to be locked forever? No right? You would want them to have it.
For now, the way you can do is by sharing the private keys with them, using which they can access your funds. But sharing it is not always the best way. Sharing the private key is like giving the entire responsibility associated with it.Is there some other way other than sharing the key itself?
Fortunately, there is, Dead Man’s Switch can help here. Think of it as a mechanism that triggers an action or event if the account holder is no longer in this world. One can set up a logic to transfer funds or data to another account in account abstraction. But how can one know if the account holder is no more?
Again, it all depends on how you want it. One can check if the user is alive by requiring them to send a signal or a heartbeat periodically (the way we do in distributed systems to know if a node is active or killed). If the user fails to send the signal within a specified time, the dead man's switch will trigger and execute the logic defined by the owner.
It usually requires multiple approvals if you go on a new Dapp and want to swap your coins. A user could set up a smart contract to perform various transactions simultaneously, saving on transaction fees and making the process more efficient.
If you want to do any sort of transaction on Ethereum network, you are required to pay gas fees and that fees is usually paid in their native token which is ETH. But what if you only had USDT in your wallet?
Unfortunately, you need to convert some of your USDT to ETH, requiring swapping fees, putting us back at square one. But with account abstraction, a smart contract could be set up to pay the transaction fees in a different token. This will significantly improve the user experience.
Subscribe to the newsletter to learn more about the decentralized web, AI and technology.