Decentralized Future: ERC-4337 Shared Mempool Launches on Ethereum
Tags: blockchain, web3, development, opensource
Published: 2024-03-21 08:36:39

In the realm of Web3, where decentralized applications (dApps) are the core of innovation, the concept of account abstraction has emerged as a key technology. It promises to revolutionize the user experience, making interactions with dApps smoother and more accessible to the masses. However, the existing implementation proposals of account abstraction often rely on centralized infrastructure, presenting a set of challenges that need to be overcome.

Centralized infrastructure introduces vulnerabilities such as system bugs and faulty relayers, which can lead to failed user operations (UserOps). Moreover, centralization may also result in censorship, compromising the open and decentralized nature of blockchain technology.

ERC-4337 introduced a separate mempool for operations done by account abstraction wallets as well as a new entity called a bundler that works seamlessly across various EVM networks. To make the user operation process more decentralized, the shared mempool was developed collaboratively by [Etherspot](https://etherspot.io/), [ERC-4337](https://www.erc4337.io/), [Alchemy](https://www.alchemy.com/), [Candide](https://candide.dev/), and [Silius](https://silius.gitbook.io/silius) teams. The main function of a shared mempool is to allow userops received by one bundler to be distributed to all its connected peers.

##How exactly do shared mempools work?##

Imagine a scenario where a user initiates a user operation through a smart account. This user operation is validated by a bundler and then propagated to all peer bundlers via a peer-to-peer network. Even if one bundler encounters issues, other bundlers in the network step in to process the operation, thereby ensuring its completion.

The beauty of shared mempools lies in their flexibility and resilience. While there is no limit to the number of shared mempools on an EVM network, each network maintains a canonical mempool adhering strictly to the rules defined in [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337#simulation). However, bundlers have the option to create separate mempools if they wish to bypass certain checks of ERC or accommodate specific requirements, such as granting special allowance to an entity like a paymaster.

##How to connect an ERC-4337 bundler to a shared mempool##

Each mempool is assigned a unique ID, serving as a reference to the corresponding file stored on IPFS containing the mempool’s description. To establish a connection to a shared mempool, bundlers must specify the ID of the desired mempool within their bundler’s metadata. Subsequently, other bundlers will review this metadata to determine whether they can share any of their UserOps with it. For information on the canonical shared mempool ID available on supported networks, please refer to the [following link](https://github.com/etherspot/skandha?tab=readme-ov-file#-shared-mempool-p2p) (currently available on Ethereum, Sepolia, and Goerli). Several bundlers are already connected to the shared mempool: [Skandha](https://github.com/etherspot/skandha), [Voltaire](https://github.com/candidelabs/voltaire), and [Silius](https://github.com/silius-rs/silius).

In conclusion, account abstraction and shared mempools represent a significant leap forward in the evolution of Web3 technologies. By addressing the challenges posed by centralized infrastructure and enhancing user experience, these innovations play a crucial role in driving the mass adoption of blockchain technology.

Follow us
[Website](https://etherspot.io/?utm_source=devto&utm_medium=article&utm_campaign=followus) | [Twitter](https://twitter.com/etherspot) | [Discord](http://discord.etherspot.io/) | [Telegram](https://t.me/etherspot) | [Github](https://github.com/etherspot/etherspot-prime-sdk)