Technical architecture
Exploring how MEM is built
Tech stack
MEM incorporates a range of cutting-edge technologies to create a powerful and innovative development platform. Here are some of the core platforms and protocols that form the foundation of MEM, for building decentralized applications that are highly scalable, efficient, and user-friendly:
3EM: The core execution machine of MEM provides a robust runtime environment for serverless functions.
everPay: As a gasless L2 financial protocol, everPay operates at the protocol level within MEM, enabling the creation of financial dApps with seamless and efficient payment capabilities.
molecule.sh: Acting as the "global oracle" for MEM functions, molecule.sh library empowers various functionalities, including the multi-authentication feature, enhancing the scalability and flexibility of MEM applications.
Supabase, Vercel Serverless Functions, and PlanetScale: These platforms and services contribute to making MEM highly scalable, ensuring near-instant finality, and providing a superior user experience for MEM-based applications.
Lazy evaluation
The SmartWeave protocol and the MEM execution layer employ a concept known as lazy evaluation.
Traditional blockchain systems typically rely on blockchain nodes to handle computation and maintain the current state. In contrast, lazy evaluation distributes the execution responsibility to either the client or an intermediate layer, such as MEM. This layer incorporates a processor and conveyor mechanism, which re-evaluates and caches the most recent state of the function. Consequently, the client is relieved of the need to process all preceding transactions in order to determine the current state.
Initially, smart contracts were envisioned as decentralized programs that underwent a consensus phase within a blockchain, requiring all nodes to reach an agreement on the final execution outcome. However, with lazy evaluated functions, decentralization, and trust are maintained, but the execution no longer necessitates node-based processing. Instead, the end user can execute the function on demand.
The concept behind lazy evaluated functions is straightforward. By storing both the source code and transactions of the function in the same data-based blockchain, in MEM's case it's Arweave, an executor software that can interpret the code and transactions. Similar to a code-to-machine code converter, this executor takes permanent information and transforms it into software.
Verifiable computing
Verifiable computing refers to a novel approach in computing that combines the benefits of both decentralization and centralization through the use of serverless functions. It establishes a centralized pipeline that generates a final decentralized output, allowing for verification by end users at any point in time. This unique paradigm enables dApps to achieve scalability, avoid network halts or malicious actors, and reduce costs associated with interactions and maintenance.
In verifiable computing, the state of a function can be stored in a centralized server, providing enhanced performance by eliminating the need for consensus during processing. However, the function should always retain the ability to be lazily evaluated by any user, ensuring transparency and audit-ability of its execution. By blending centralization and decentralization, verifiable computing presents an innovative approach to harnessing the advantages of both paradigms in a seamless manner.
Verifiable Atomic Computing Paradigm (VACP)
The Verifiable Atomic Computing Paradigm (VACP) is a new scalability solution introduced by the Decent Land Labs team. In simple terms, VACP separates the tasks of computation and storage in blockchain applications. In this paradigm, the blockchain-primarily serves as a data storage system, while the actual computation and state storage occur off-chain, handled by clients or servers.
With VACP, off-chain functions are utilized, allowing them to be written in any programming language. These functions receive inputs from the storage-based blockchain. In this way, the blockchain acts like a hard drive, while the off-chain functions can run on any device. VACP offers flexibility and efficiency by distributing computation off-chain while leveraging the blockchain for secure and reliable data storage.
How does MEM work?
To enable MEM's verifiable computing capabilities, several key components are involved:
mem-core
: The processor in MEM, is responsible for executing the latest transactions and lazily evaluating them in response.The Orchestrator: The conveyor system in MEM, serves as a centralized bridge between the data-based blockchain.
Eventual Consistency: MEM operates under eventual consistency, ensuring that function states may undergo temporary discrepancies before reaching a consensus.
In the MEM protocol, the mem-core
acts as the executor, handling the execution of incoming transactions and responding to them through lazy evaluation. It receives transaction bulks from single or multiple users and re-evaluates the function with the updated data. The latest state of the function is then upgraded and saved, accessible to users.
The Orchestrator, serving as the conveyor system, plays a crucial role in connecting the processor with the data-based blockchain. It ensures the successful storage of transactions received by the processor in MEM's storage layer, Arweave network.
To enable verifiable computing in MEM, certain rules must be followed. The function source code must be compatible with the mem-core
one and stored in the same data storage layer. Additionally, the function must be fully deterministic over time.
By storing the function source code and its associated transactions on Arweave, users gain the ability to lazily evaluate this processed data originally handled by the centralized system (MEM pipeline). This way, the centralized core of MEM no longer holds the sole source of truth, as the state of the function can always be verified and disproven by the end-users.
Last updated