ERC-4337

Background

Most wallets on Ethereum are Externally Owned Accounts (EOAs), which are entirely dependent on their private key – a secret phrase given by the ECDSA encryption algorithm that is used to sign (validate) transactions. This approach places full authority over the assets in the account in the hands of the private key holder. Heuristically, one can think of themselves as the signer, their bank account as the account, and their PIN as the private key.

Prior to ERC-4337, ECDSA was the only encryption algorithm able to sign transactions. As a result, the signer and account were linked so strongly that they could be considered two sides of the same coin. Consequently, a user that got hold of someone else’s private key controlled all their assets, and a user that lost their private key lost their assets. This raised key issues, namely in the lack of social recovery support available to those who lost their private key. Furthermore, the centralised dependence on ECDSA formed a single point of failure. Anticipating proliferation of quantum computing, the encryption scheme’s vulnerability to quantum algorithms became a focus.

ERC-4337 aimed to weaken the relationship between the signer and the account by giving users greater flexibility over the logic used to validate and execute transactions. In doing so, it built off previous Ethereum Improvement Proposals (EIPs) aiming to usher in account abstraction.

Account Abstraction

Account abstraction (AA) is the goal of generalising accounts on the blockchain so that users can decide how their assets are managed and operated with the network able to accommodate everyone’s specifications. This is achieved through making all accounts smart contracts (which can run code to determine what transactions get executed) and phasing out EOAs altogether. For example, a developer could decide to use FaceID to validate transactions or require multiple wallets to agree on a transaction before it can be validated. By allowing code to control accounts, AA aims to bring a more seamless user experience and hide more technical aspects of the blockchain from users entirely.

What is ERC-4337?

ERC-4337 (previously EIP-4337) is an update to the Ethereum Virtual Machine that defines a new pseudo-transaction object called a UserOperation, allowing users to specify the validation logic that they want to use. Consequently, the signer can specify alternative encryption algorithms and thus break the inherent link between the private key and the account. This solves the quantum problem mentioned earlier by enabling quantum computing resistant encryption schemes to be specified.

The update also improves user experience through the introduction of Paymasters: smart contracts that can have gas payments delegated to them. By enabling protocols to sponsor gas fees for their users, ERC-4337 reduces barriers to blockchain usage by not mandating that wallets hold ETH. This also allows users to pay gas fees in other tokens by sending them to the Paymaster and then having it pay for gas in ETH. Notably, Visa has begun developing a Paymaster contract for just this purpose with the first version aimed at enabling stablecoin gas payments. Although this is a promising endorsement from a major Web2 company, it is important to recognise that institutional support has been extremely fickle in the past, vanishing in times of market turmoil.

By allowing code to influence validation, ERC-4337 caters to different security requirements for different signers. For instance, a corporate wallet could require multi-signature authentication before transactions can be submitted. This also enables automated transactions, expanding the scope of blockchain-based businesses to new paradigms such as subscription models.

ERC-4337’s UserOperation model 

1.     The user creates a UserOperation representing the desired operation

2.     The UserOperation is sent to a mempool (separate to the mempool for transactions)

3.     Bundlers search the mempool for valid UserOperations that can be executed

4.     The bundler collects a group of UserOperations into a bundle

5.     The bundle is sent to the EntryPoint smart contract

6.     The EntryPoint contract verifies that the Paymaster is able and willing to pay gas fees

7.     The bundle is sent to the next block to be committed to the blockchain

Figure 1

An overview of the UserOperation flow from creation to commitment

Source: Vitalik Buterin for Infinitism Medium 

By strategically bundling UserOperations, the new architecture enables atomic batched transactions, allowing complex operations to be validated with a single signature, and simplifying the UX. This is particularly useful in Web3 gaming where frequent transactions negatively impact the gameplay experience.

Where is ERC-4337 useful?

As mentioned above, Web3 gaming is a sector that greatly stands to gain from ERC-4337. More generally, batch transactions decrease transaction fees, resulting in better scalability for businesses that have frequent transactions or regular pay-outs to multiple wallets. Notably, yield farming protocols and marketplaces could batch trades together to reduce the cost of complex operations, particularly in times of high gas fees.

The provision of automated transactions is of particular interest to Web3 start-ups because it brings subscription business models to decentralised payment infrastructure. This could be useful for online communities with paid membership or monthly billed services such as media streaming platforms. In the context of Web3 gaming, this opens the door for subscription plans such as Xbox Live Gold.

The capacity for multi-signature payment authorisation is of key importance to the security of individual and corporate finances. Key uses include preventing DAO treasuries getting controlled by a bad actor or even larger scale exploits of a compromised private key. With the current prevalence of such hacks, this use case is extremely important. Further, this facilitates trustless investment syndicates and joint investment accounts, as seen below in Forum.

Start-ups using ERC-4337

Forum is a protocol that allows groups of investors to come together to make joint investments in a decentralised and permissionless manner. Although still in early stages, their usage of ERC-4337 aims to abstract as much of the blockchain interaction as possible for users and enable message signing through FaceID, a familiar interface. Investment syndicates have risen in popularity over the lifetime of cryptocurrency, with a leading platform Syndicate having raised 28M USD as of May 2022. Backers included industry leaders such as Andreessen Horowitz, UniSwap Labs, and OpenSea, highlighting their belief in this sector. Forum is primed to capitalise on this interest, offering an easier on-boarding process, more decentralisation, greater security for users, and potentially lower fees. Additionally, the chat function creates a social dynamic that serves communities very well. Given how early it is in development, it is difficult to fully evaluate but nonetheless Forum is worth watching.

Biconomy is a toolkit helping developers build projects that utilise the new technology offered by ERC-4337. Beyond having a stellar cap table including Binance, Coinbase Ventures, and Outlier Ventures, Biconomy’s advisors are blockchain experts Sandeep Nailwal, the COO of Polygon, and Yoav Weiss, one of the developers behind ERC-4337. Biconomy boasts institutional usage from over 200 brands including Decentraland, dYdX, and The Sandbox, as well as having processed over 28M transactions that amount to over 2B USD total volume, thus proving its viability as a solution. One clear limitation is the 3000 request per minute constraint which, although currently fast enough for most applications, is unlikely to be sufficient in the future as blockchain usage scales. It is of key importance that this is improved.

The Biconomy token model currently involves staking $BICO for rewards proportional to the deposit. This model is generally quite weak due to the risk of impermanent loss, however since Biconomy implements single-asset staking, this is mitigated. In the future, staking $BICO will enable users to participate in processing transactions for the Biconomy Relay Protocol, earning rewards on all transactions that they manage. This utility should give $BICO intrinsic value, especially as adoption of ERC-4337 increases over time. Considering the token economics of $BICO (Figure 2), we see that <25% of the total supply goes to the Pre-Seed, Seed, and Private rounds. In combination with a lengthy vesting schedule, this scheme should prevent large institutional dumps that negatively impact the token price. Considering the Pearson Correlation Coefficient between $BTC and $BICO of 0.59 (Figure 3), we can see a moderate positive correlation between their prices. Bitcoin recently achieved a yearly high price of over 30k USD. Market expectation for $BICO to follow suit should counteract any sell pressure. Biconomy’s infrastructural position poises it to benefit from interest in Ethereum as a whole. As such, recent bullish news including HSBC Hong Kong’s support for Ethereum ETFs should positively impact $BICO’s price.

Figure 2

Chart showing the release schedule of $BICO to different stakeholders

Source: Aditya Khanduri for Biconomy Medium

Figure 3

1 year correlation matrix of Bitcoin, Ethereum, USDT, and Biconomy

Source: Cryptowatch

Considerations

Note that ERC-4337 is not intended to bring full AA but rather is a lightweight way to test some of the principles that may bring about AA in the future before committing to a larger scale network overhaul. For this reason, it is implemented at the application layer instead of the protocol layer. The benefit of being easier to implement incurs a few trade-offs, namely in performance and gas efficiency. Specifically, the best-case gas overhead per UserOperation is around 39.8k gwei compared to 21k gwei for normal EOA transactions. Although this 90% increase seems steep, this equates to a gas overhead increase of about 0.08 USD at current $ETH prices, a small price to pay for the increased functionality that ERC-4337 brings. Furthermore, implementation at the application layer means that there are significant data overheads that are carried in UserOperations than there would be if ERC-4337 were implemented at the protocol layer, negatively impacting transaction times and requiring more gas to submit to the blockchain. Nonetheless, the changes brought in ERC-4337 are planned to be committed to the protocol layer which should alleviate these concerns.

Prior to ERC-4337, there were projects aiming to implement account abstraction through Layer 2 solutions: most notably, StarkNet and zkSync. These solutions use ZK-rollups to offer lower transaction fees than Layer 1 solutions, however this comes at the cost of decentralisation as ZK-rollups use validity proofs which require special hardware to compute, creating barriers to participation. Furthermore, they use sequencers to determine the order in which transactions are executed, adding another layer of centralisation. 

Conclusion

ERC-4337 has introduced significant improvements to the Ethereum ecosystem by addressing key issues in user experience and wallet functionality. The decoupling of the signer and account roles provides flexibility in transaction validation methods, not only enhancing security but also protecting Ethereum against the threat of quantum computing. The new ability to batch transactions and enable automated transactions greatly streamlines user experiences, particularly in Web3 gaming and subscription-based models while multi-signature payment authorization enhances wallet security.

Glossary

Account: the on-chain entity that holds a user’s assets

Application Layer: the highest level of the Ethereum stack, where dApps reside

Bundler: a computer on the network that searches the mempool for UserOperations, collects them into bundles, and submits them to the EntryPoint

EntryPoint: a smart contract that verifies and executes the bundles it receives on the blockchain

Gwei: the unit of measurement for gas fees, 1 gwei = 10-9 ETH

Impermanent Loss: loss in the value of staked crypto resulting from a change in relative price

Mempool: an off-chain waiting room where UserOperations stay until a bundler packages them for delivery to the blockchain

Paymaster: a smart contract that can pay gas fees for UserOperations on behalf of the signer

Protocol Layer: the foundational layer of Ethereum

ZK-Rollup: a scaling solution that increases throughput by moving computation off-chain

Signer: the authority that validates transactions to be committed to the blockchain

UserOperation: a generalisation of the standard Ethereum transaction that allows the specification of arbitrary code that decides whether a transaction is validated

Validity Proof: a cryptographic proof used by ZK-rollups to verify state-transitions

 

Next
Next

Reflecting on Radom