One of the most recent innovations that have begun to be integrated into Ethereum is the Ethereum Account Abstraction (EAA), better known as the Ethereum Improvement Proposal (Ethereum Improvement Proposal – EIP 4337), a new paradigm that will facilitate the use of Ethereum accounts and interaction with dApps deployed on the network.
Get started on Bit2Me and jump into the world of cryptocurrencies with a head start. Sign up easily and get €5 FREE on your first purchase with this link. Don't wait any longer to join the crypto revolution! Register
Wallets and their usability problem in cryptocurrencies
One of the main usability problems with cryptocurrencies is in the way we manage our accounts. Since the advent of Bitcoin, we have relied on software designed to act as "wallets or purses for our cryptocurrencies." Actually, said software or hardware, as the case may be, is in charge of managing our private and public keys, to access our cryptocurrencies accounted for in the blockchain.
This system is also used on Ethereum today and for a powerful reason: it is extremely safe. If the software and hardware are well built, it is impossible to obtain those keys and thus impossible to access the balances that we have registered.
Hence, one of the main premises in crypto is: keep your keys safe and well protected.
It doesn't matter if these keys are a binary file (like in Bitcoin Core, where everything is in a file called wallet.dat) or a set of words like seed phrases (generally, following the Bitcoin standard, BIP- 39).
Keeping these keys secure is the biggest challenge for some people, a challenge many fail at, losing hundreds and even millions of dollars of value. all because once you lose the keys, it is impossible to recover them again, a usability problem that keeps many people away from the sector and technology.
While In crypto, the premise of decentralizing money is fundamental, fixing this usability issue is necessary for mass adoption. In fact, fixing it means that more people trust the technology and thus decentralized money reaches more people.
One of the first solutions are those offered by centralized exchanges and wallets. But it is not entirely satisfactory for the community, especially that focused on the total decentralization of money.
However, What would happen if we could combine the capabilities of centralization (eg: recovering accounts) with those of the decentralization of the wallets that we are used to seeing (eg: total self-custody)? Well, that is precisely what Ethereum Account Abstraction does, and it does it entirely using smart contracts, to build an entire infrastructure that allows you to configure wallets that are easy to create, secure, and with such interesting options as the ability to recover our balances in in case we lose access to our keys.
Knowing the accounts and transactions in Ethereum
Before going further into how the Ethereum Account Abstraction, we must first understand what an account is in the context of Ethereum and how they are controlled. First of all, you should know that in Ethereum there are two types of accounts:
- Contract accounts: These types of accounts are simply an account that lives on the blockchain and whose behavior is defined by a smart contract that controls it.
- Externally owned accounts (EOAs): in this case, an EOA is an account controlled by a public/private key pair. That is, our lifelong purses.
Now that we understand accounts, let's talk about transactions. What is a transaction? A transaction is a record of an event that occurs on the Ethereum blockchain. Transactions can be used to transfer tokens, mint NFTs, or interact with smart contracts.
Transactions are initiated by Externally Owned Accounts (EOAs). EOAs are like people, and have a public key and a private key.. The public key is used to receive transactions and the private one to sign them. When an EOA wants to carry out a transaction, he signs it with his private key. This signature is used to verify that the transaction has been authorized by the owner of the EOA.
Transactions also have to pay gas fees or commissions. Gas fees are used to pay for the computational resources used to process the transaction. The amount of gas needed for a transaction depends on the complexity of the transaction. With this knowledge we have the basics to understand how these two elements work and how Ethereum Account Abstraction will change the way they work.
Ethereum Account Abstraction, changing the way we manage our Ethereum accounts
Ethereum Account Abstraction is a proposal to allow users to interact with decentralized applications (dApps), using smart contract wallets instead of externally owned accounts (EOAs).
This would completely eliminate the need for users to manage their own private keys. Smart contract wallets could sign transactions on behalf of users, but would be controlled by smart contract logic. This would enable a number of benefits, including:
- Greater security: users would no longer need to manage their own private keys, reducing the risk of losing their funds.
- Seamless user experience: users could interact with dApps without having to worry about managing their own accounts.
- Increased adoption: Account abstraction would make it easier for non-technical users to adopt dApps.
- Flexibility– Smart contract wallets can be programmed to have different rules and settings. This allows users to have greater control over their accounts and their funds.
Account abstraction is a proposal that has already begun to be implemented on Ethereum. In fact, the main smart contract, known as EntryPoint Smart Contract, which will be used to start the deployment of these functions, has already been activated on the Ethereum chain, and has been used to advance the development of this new form of accounts on Ethereum.
History of Ethereum Account Abstraction Proposals
Ethereum Account Abstraction has long had a number of proposals dating back to 2016. Among those proposals we have:
- EIP-86 (2016): This proposal would allow users to create "account contracts" that perform any desired signature/nonce checks instead of using the mechanism that is currently hard-coded into transaction processing.
- EIP-2938 (2020): This proposal would create a new transaction with type AA_TX_TYPE. Transactions of this type are called “AA transactions”.
- EIP-3074 (2020): This proposal would allow users to delegate control of their EOA to a smart contract. It would allow any EOA to act as a smart contract wallet without deploying a contract.
The reason why these proposals have not been implemented yet is that they require changes to the consensus layer protocol of the Ethereum network. These changes are difficult to implement and require a lot of coordination between different stakeholders. However, in 2021, a new proposal for account abstraction was made: EIP-4337. This proposal does not require changes to the consensus layer protocol and can be implemented on top of the existing Ethereum network.
How does Ethereum Account Abstraction work according to EIP-4337?
EIP-4337 introduces a new concept called "User Operations". User operations are a type of transaction that describes an operation to be submitted on behalf of a user. User operations are stored in an "alternative mempool" which is essentially a waiting room to store information about unconfirmed transactions. Nodes on the Ethereum network can choose to act as bundlers.
At this point, the poolers collect user operations from the alt mempool and bundle multiple user operations into a single transaction called "bundled transaction«. Once they create a bundled transaction, they send it to a global “singleton” smart contract known as an “EntryPoint”. There is only one EntryPoint smart contract in the entire blockchain.
The stitcher calls a function of the EntryPoint smart contract called handleOps. This function receives the transaction from the package and calls a special function on each account: validateUserOp. Every smart contract wallet must implement this feature. The validateUserOp function is used to verify the signature of the operation, and pay the fee if the account considers the operation valid, before continuing to execute the operation. Each smart contract wallet must also implement a second function: "execute" is expected to be called to actually perform the operation sent by the EntryPoint contract.
Unique advantages of the model
Thanks to the unique Ethereum Account Abstraction model, a number of new features are introduced, including:
social recovery
Social recovery is a new feature that allows users to add trusted contacts who can help them recover their accounts if they lose their seed phrase. To use social recovery, users create a list of trusted contacts and assign recovery weights to them. If a user loses their seed phrase, their trusted contacts can use their recovery weights to vote on who should be the new account owner.
multisignature accounts
Multi-signature accounts are a new type of account that require multiple signatures for certain transactions. This can be used to increase security by requiring multiple people to approve a transaction before it can be executed. For example, a company can use a multi-signature account to require the approval of two or more administrators before making a payment.
batch transactions
Batch transactions allow users to bundle multiple transactions and sign them with a single signature. This can reduce gas costs by eliminating the need to pay gas for each individual transaction. For example, a user can bundle several small payments together to reduce the total cost of gas.
sponsored transactions
Sponsored transactions allow users to pay for transactions with ETH or ERC-20 tokens, instead of Ether. This can be useful for users who do not have Ether or who want to avoid paying high gas fees. For example, a user could sponsor a transaction to send a message to a friend who does not have Ether.
Thus, the Ethereum Account Abstraction becomes a significant improvement over traditional Ethereum accounts. It makes accounts more secure, easier to use, and more affordable.