All posts
cover image
Standardizing the MUD world interfaces
last week By
Lattice

When we first started working on MUD, we knew clearly that these tools for open and composable worlds must themselves be open and composable to foster a healthy ecosystem of users, developers, and contributors.

We laid the groundwork for this when we released MUD under the MIT license. All MUD code that has ever been released—from onchain Solidity code like Store and World, to client-side TypeScript libraries—will forever be open and free to use for any usage. This means that a world built on MUD is built on safe and transparent foundations.

But when it comes to how MUD talks to its peripheral services and execution environment—indexing events, low latency sequencer pre-confirmations, ERC-4337 user operations—the waters have been murkier than with the core MUD code. There has been no clear, standardized APIs or sufficient documentation for these interfaces.

To continue in the direction of openness and clarity, we are working towards a standard and open interface for how MUD Worlds talk to their peripheral services and execution environments. We are also standardizing the events and semantics of MUD Worlds, such as Store events and World interface calls.

A first step: MUD Store ERC

The MUD Store ERC on the Ethereum Magicians Forum

As a first step in this direction, we have submitted a draft Ethereum Request for Comment (ERC) for MUD Store, which underpins how MUD handles onchain data storage and retrieval. The ERC covers everything from how Store’s onchain schema, data encoding, interfaces, operations, and events should be implemented.

Standardizing MUD Store opens up the possibility for a whole host of benefits to the community: alternative indexer implementations, simpler and more extensive integrations with Store-enabled contracts (e.g. block explorers and libraries that read from Store), and even further optimization efforts in the core contracts and alternative (e.g. non-Solidity) implementations of Store that nonetheless maintain compatibility with indexers and other peripheral services and environments.

The first draft of the ERC is available on the Ethereum Magicians forum and we invite the MUD and wider Ethereum community for further comments, reviews, and discussions.

Toward a Standard World Interface (SWI)

SWI turns disparate interfaces into a unified set of interfaces under the mud_* namespace

Beyond an ERC for the MUD Store, and a subsequent ERC for the MUD World’s pattern of access control and world extendability, we also aim to begin establishing and standardizing the interface between a MUD world and its indexer (for automatic indexing, state querying, and state streaming), its block builder (to enable low latency pre-confirmations), its ERC-4337 bundler (to enable low-latency account-abstraction transactions and paymaster), and any future peripheral services and execution environments needed by a MUD world, as Ethereum and MUD continue to evolve.

This standardization effort won’t happen overnight. For each of these interfaces, we will go through a careful process of documentation, sharing it with the community, and inviting comments and discussions from MUD users, developers, and contributors.

In the past year, we've already seen promising signs of community MUD extensions such as block explorer extensions for MUD worlds, analytics and automation platforms, and augmentations to the MUD indexer. Over time, as the MUD World interfaces become better documented and standardized, we hope to enable a future where there are diverse implementations for peripheral services and environments, from indexers to low-latency block builders, analytics tools to account abstraction. Ultimately, we hope this standardization effort will benefit MUD worlds, developers, and users, giving them more choices and removing reliance on any single implementation.

What's Next

The Store ERC is in its draft and comments stage. Please visit the Ethereum Magicians forum to engage in the discussion and provide any feedback or review. Alternatively, you can also join the conversation in the mud-discussion section of our Discord server.

We will release early documentation and specs for the Standard World Interface over the following months. You can subscribe to our MUD newsletter to receive the latest updates.

MUD: MUD Website | Newsletter | Twitter | YouTube | Discord