MEM — a web3 serverless functions protocol — is now an L2 on top of WeaveVM thanks to the MEM Lambda ExEx. This brings EVM-grade data availability and censorship resistance to MEM while exposing MEM functions to EVM globals like msg.sender
and transaction ID.
Since MEM functions can be written in languages that compile to WASM like JavaScript, TypeScript and Rust, this gives WeaveVM a second standard for flexible computation that goes beyond the limits of solidity. It also enables parallel execution on WeaveVM because MEM functions are computed separately to the main EVM thread.
In this article, we’ll explain how it works and dive deeper into each component.
What is MEM?
The Molecular Execution Machine (MEM) is a Web3 serverless functions protocol developed on top of Arweave’s SmartWeave lazy evaluation standards, utilizing 3EM for execution. Currently, MEM is vulnerable to transaction censorship on its sequencer and lacks strong data availability guarantees.
What are Reth ExExes?
Reth Execution Extensions (ExEx) is a framework for building performant and complex off-chain infrastructure as post-execution hooks. Reth ExExes can be used to implement rollups, indexers, MEV bots and more with >10x less code than existing methods.
What is MEM Lambda (λ)?
Lambda (λ) is a SmartWeave execution layer as rollup on top of WeaveVM testnet. More precisely, a MEM implementation that makes use of WeaveVM’s DA and Arweave permanent storage (via WeaveVM as proxy) to facilitate highly complex smart contracts beyond EVM and solidity (bytecode machine) limitations.
Introducing MEM-Lambda ExEx (MLExEx)
MLExEx is an Reth execution extension that automatically retrieves MEM-Lambda transactions from the WeaveVM network and forwards them to the Lambda sequencer. Therefore, with MEM-Lambda, any user can initiate transactions in MEM-Lambda simply by posting the transaction data on the DA layer (WeaveVM).
One of the key advantages of MLExEx is being a template, which allows MEM to be deployed as a rollup on any EVM network that supports Reth clients. This maximizes the benefits of executing complex and resource-intensive smart contracts written in JavaScript, Rust, and other languages on top of EVMs.
Another key advantage of MEM being “Lambda” is the introduction of gas fees to the protocol, which helps protect the sequencer from DDoS attacks and resource abuse. These gas fees cover the cost of posting calldata on the DA layer (WeaveVM) and any optional fees charged by the sequencer. During the testnet phase, the MEM-Lambda sequencer will not charge any additional fees.
Check out MLExEx source code here.
MEM-Lambda & ERC-7689
Lambda follows the data protocol outlined in ERC-7689 (smart blobs) with slight modifications. Most importantly, it shares the same data structure for ERC-7689 transactions (type 1 and 2).
Lambda is Parallel Execution on top of WeaveVM
Lambda introduces the concept of parallel execution to WeaveVM. Since each Lambda smart contract maintains an independent state, and sequencers can be customized to manage only a single contract, Lambda can be deployed across multiple instances on WeaveVM to scale in parallel. Moreover, this parallel execution design is not limited to WeaveVM, Lambda can also be deployed on any EVM network.
MEM-Lambda Data Processing Pipeline
MEM-Lambda Contract Example
Contract Source Code
Contract initial state
Get started
Check out MLExEx source code here — it is compatible with any Reth client. If you want to try this out on the private WeaveVM testnet because it fits an application you’re building, ping us in the Discord with your MLExEx use case.