MeerEVM丨MeerDAG The next generation smart contract execution engine under consensus
Introduction
Since the birth of Bitcoin, blockchain has evolved for thirteen years and has had a profound impact on politics, economy and culture. The development of blockchain technology has gone through Layer1’s exploration of the underlying ledger and Layer2’s expansion of applications. Blockchain has also moved from the 1.0 era of decentralized currency and payments to the 2.0 era of decentralized markets. By now, blockchain has achieved: a decentralized public transaction ledger, end-to-end direct value transfer system, and powerful scripting system to run any protocol or currency. Bitcoin itself has achieved the first two points, and the advent of Ethereum smart contracts has made the third point a reality. However, although smart contracts are currently used in DEX, NFT, GameFi, lending, liquidity mining and many other DeFi fields, showing a prosperous scene, their application is still only in the early stage, and their potential in asset digitization and social services has not yet been fully explored, and Blockchain 2.0 is only in the early stage.
Driven by smart contracts, blockchain technology is penetrating step by step into finance, the Internet of Things, supply chain, cloud computing, public welfare and charity, public services and other fields. Not only that, the application prospect of blockchain in social life is even wider, especially in the fields of government, health, science, culture and art. Not only will there be decentralized applications (DAPP), decentralized autonomous organizations (DAO) will emerge, and decentralized autonomous companies (DAC) will also appear, and eventually move towards a decentralized autonomous society (DAS). When blockchain technology is gradually applied to social governance, we will usher in the era of blockchain 3.0. The era of full-scale application of blockchain will eventually come, and a large-scale collaborative society will be built.
Qitmeer was born at the beginning of the Blockchain 2.0 era to build an underlying public blockchain which combines the mature and secure UTXO model and BlockDAG consensus, resulting in faster consensus efficiency, higher throughput and higher scalability. To make itself more scalable and build ecological applications in DeFi, GameFi, NFT, meta-universe, etc. the next generation Qitmeer network is designed with the key components the MeerDAG and MeerEVM, where MeerDAG consensus enables the compatibility of UTXO model and account model; MeerEVM is a pluggable smart contract execution engine under the MeerDAG consensus, which is integrated into the Qitmeer network as a container. This implementation guarantees an independent operating environment for smart contracts and provides a basis for expanding to build other containers.
I. What is MeerEVM
A Virtual Machine is a software simulation of a complete computer system that runs in a completely isolated environment with full hardware system functionality.
EVM (Ethereum Virtual Machine) is a lightweight virtual machine. It is the environment in which smart contracts run in Ether. Compared to Bitcoin, which is seen as a distributed ledger, Ether strives to be a distributed computing platform, which Vitalik envisions as a decentralized “world computer”. The EVM is the operating system, the computational engine of this “computer”, taking on the functions of computation, storage and execution.
The smart contracts created on Ethernet require EVM to be compiled and interpreted for execution. There are more than 140 fixed machine instructions in the EVM to execute different processes, making the EVM Turing-complete and able to perform any computation given enough resources.
The deployment of a smart contract is equivalent to the creation of a regular transaction. When a transfer transaction occurs on the Ethernet chain, the Ethereum Virtual Machine (EVM) performs a series of tasks as follows.
• Call the value of the transfer and analyze the instructions of the contract.
• Calculate the Gas consumption (fee), and make sure that the address sending the transfer has enough Gas fees.
• Execute the contract and implement the transfer to the corresponding address.
EVM exists as a separate sandbox, providing a secure environment for code to run and ensuring the smooth execution of smart contracts on Ether.
Qitmeer’s MeerDAG is a hybrid BlockDAG protocol that not only can quickly confirm transactions, but also supports linear ordering of transactions, and inherently can implement state-based smart contracts. On the next-generation Qitmeer network, we designed a unique container system to build the running environment of smart contracts on Qitmeer. We implement the integration of EVM through the container system and let it run as a container on the Qitmeer network which not only provides an independent running environment for smart contracts and keeps them completely isolated from the outside world to ensure the security of the main chain, but also facilitates developers to conduct independent testing without taking resources from the main chain or being affected by other chains.
Qitmeer is a UTXO ledger model under the hybrid BlockDAG consensus, which is not compatible with the account model of Ethernet. To achieve compatibility with EVM, in the design of the next generation Qitmeer (QNG) network, we improved the native EVM with our network features to make the UTXO model compatible with EVM, and implemented MeerEVM, an EVM-compatible smart contract execution engine on Qitmeer Network. It can support Ethernet smart contracts and most Ethernet client functions.
In the Qitmeer network, MeerEVM will be deployed on each node to ensure mutual verification of data, and MeerEVM will also serve as the runtime environment for smart contracts in Qitmeer, where various smart contract applications (DAPPs) on Qitmeer are compiled and executed independently.
II. Core features of MeerEVM
The Next Generation Qitmeer (QNG) network itself has a container system that allows MeerEVM virtual machines to run as containers on the QNG network. In this way, Qitmeer’s local coin, Meer Coin, can exist in two different forms, one is UTXO on the main chain, and the other is Account Balance in MeerEVM, which maintains an equal status and can be exchanged 1:1 between them at any time, we call the channel between them MUB Channel. It is like a glass of water poured into two containers with different temperature environments, one is water in a liquid state and the other is ice in a solid state, but essentially it is still the same glass of water, exchanging the storage containers, but with two states due to different criteria. This design greatly improves the compatibility and extensibility of the Qitmeer network, allowing us to run not only EVM-compatible virtual machines on the network but also to support more other containers.
In the underlying technical implementation of the QNG network, by redefining the data structure of UTXO, using the signature script in the transaction structure, the signature script in the input, and the sequence field Sequence, different transaction types are distinguished, and then matching different transaction data rules through the field SignScript making MeerDAG completely preserve the UTXO data structure. It can be compatible with both classic UTXO transactions and account model transactions.
At the same time, we open the mapping relationship between UTXO and ETH Balance, so that the UTXO model and the Balance system can interconnect well. Instead of using a cross-chain approach, we achieved the first combination of the UTXO model and EVM in our unique way and built the first EVM-compatible smart contract execution engine under the MeerDAG consensus, which allows the QNG network to support both DAPP development under smart contracts and strong EVM ecological compatibility. Developers can easily migrate smart contracts to the Qitmeer network and enjoy lower usage fees, faster validation, and a smoother network environment.
Of course, we can implement not only EVM-compatible containers but also can implement other containers in the future.
Currently, MeerEVM running on the QNG network has the following features.
III. The strategic role of MeerEVM (EVM compatible)
1. Unlock smart contracts, realize chain interconnection and accelerate ecosystem expansion
1.1 Unlock smart contracts
In the context of blockchain and cryptocurrencies, the characteristics of smart contracts are
• No accessibility is required: anyone can write a smart contract and deploy it to the Ethernet network.
• Solidity programming language is developer friendly
• -Composability: Smart contracts are public on Ethernet and can be considered as open APIs, and smart contracts can call each other.
• Pre-written logic (computer code) that cannot be tampered with.
Based on the characteristics of smart contracts, the Etherchain has incubated a new decentralized financial DeFi ecosystem: transparent, permissionless and trustworthy transactions. Currently, the number of Ethereum ecosystem applications included by mainstream Dapp statistics platforms alone is as high as 3,325. Ethereum ecosystem can have such a prosperous scene without smart contracts. The smart contract completely implements the spirit of decentralization of blockchain, allowing all Dapp developers to deploy smart contracts in EVM, enabling a variety of decentralized applications to build Web3.0. Ether is currently the smart contract platform with the most applications and the largest amount of funds. According to glass node, the number of daily active addresses on the Ethereum chain since 2022 is about 200,000, and this figure continues to grow. At the peak of DeFi Summer in 2020, the number of daily contract calls peaked at around 750,000.
Qitmeer Network is a globally scaled public blockchain that has been improving its infrastructure as an underlying public chain to enable a range of decentralized financial (DEFI) applications including DEX, NFT, liquidity mining, GameFi, etc. with better performance and lower costs, and to build an incentive-compatible open environment — Decentralized Autonomous Organizations (DAO) while providing infrastructure for Web 3.0, all with the support of smart contracts.
Smart contracts cannot be deployed and executed without virtual machines, and DAPP applications based on smart contracts cannot be supported by virtual machines. Therefore, in the next generation of Qitmeer, we have incorporated pluggable virtual machines in the MeerEVM implementation, which provides the foundation and runtime environment for smart contract implementation.
1.2 Realize chain interconnection and accelerate ecosystem expansion
The EVM ecosystem, such as Truffle and Hardhat for smart contract writing and testing, the API library that enables external wallets to connect to the EVM, and the MetaMask wallet that broadcasts user commands over the network and connects users to the EVM is the result of hundreds of highly qualified developers who have spent The development tools and infrastructure were built by hundreds of highly qualified developers over thousands of hours. The difference in time required to create a DAPP using mature and unrefined tools can be 100:1, which is why tools and infrastructure for building proprietary stack blockchains have been sluggish in growth according to industry standards. The EVM ecosystem has a large market of blockchain developers and open source projects, and a widely accepted standard is likely to lead to more composability, which will enhance the network effect.
Qitmeer, as a public blockchain is bound to interconnect with other blockchain systems in its future developments. Qitmeer implements EVM-compatible machines, introducing a widely accepted standard that facilitates interconnection between chains. At the same time, supporting a common EVM standard that facilitates the establishment of a bridge between the Qitmeer Network and the EVM ecosystem, reducing the development cost of DAPPs between different chains, making it easier for EVM ecosystem projects to be implemented on Qitmeer, and allowing users to use the same preferred Dapp in different networks. Qitmeer will also gradually build a more valuable ecosystem.
2. “Crossing the Chasm”, improving network effects and building value networks
In the Internet era, Metcalfe’s law, an important theory for network valuation and technology development states that the value of a network is proportional to the square of the number of connected users. The more connected nodes there are, the stronger the network consensus, and the greater the value of the network. Although Metcalfe’s Law still exists today in the discussion of network effects, it ignores the important stages of network construction for network products that are built from scratch and does not take into account the quality of user participation, and the multilateral nature of the network. Real life goes far beyond the simple model of “the more nodes the better”. The logistic Stiff growth model and the animal population growth model (Allee curve) studied by ecology pioneer Warder Clyde Allee, both show that the growth of network effects tends to have an S-shaped curve. For a new technology to survive, the network size must break through the early development threshold to activate the market potential and contribute to the rapid growth of network effects. The growth of the network scale will be slowed down or even inhibited by the current carrying capacity limitation, and only continuous expansion to improve the carrying capacity can open the next S-shaped growth and further increase the value of the network.
Everett M. Rogers, a master of innovation diffusion, observed the emergence of many innovations, including agricultural improvements in the United States. Everett M. Rogers, who observed the emergence of many innovations, including agricultural improvements in the United States, proposed the theory of diffusion of innovation, which suggests that the diffusion of innovations in a social system will go through five stages to face different types of people, namely, innovators, early adopters, early majority, late majority, and laggards.
Later, Geoffrey B. Moore (1928–1989), a former member of the American Academy of Sciences, was a member of the American Academy of Sciences. Geoffrey A. Moore further proposed a life cycle theory of technology adoption based on Rogers’ diffusion of innovation theory. In his book “Crossing the Chasm”, he proposed that the diffusion of new technologies would face a chasm between early adopters and early masses, and as long as the diffusion rate could cross the chasm, the market would naturally advance to late masses and even laggards to reach full diffusion.
As a start-up public blockchain, Qitmeer, in order to be more widely and comprehensively adopted, the only way to enhance its scalability and application implementation base and improve the ecological carrying capacity of the network is to attract more high-quality user adoption, build high-quality ecosystem applications in the early stage of development, and show the value potential of the network. In this way, we can drive the network “across the divide”, break through the critical growth point of the network effect, gain public recognition, and achieve exponential growth of the network scale.
The implementation of EVM-compatible MeerEVM on the Next Generation Qitmeer Network (QNG) unlocks the ability to implement smart contracts, which is not only the foundation for various DeFi applications but also a bridge for Qitmeer to achieve multi-chain interconnection. With smart contracts, Qitmeer can establish its own DAPP ecosystem and interact with other networks thus enriching the multilateral nature of the network, greatly increasing the ecological carrying capacity of the Qitmeer network, gaining wider user adoption, enhancing the value of the Qitmeer network, and laying the foundation for entering the metaverse and moving towards Web 3.0.
It seems to be possible to have a balance between deeper differentiation or compatibility with mainstream industry standards, but in fact, it is a difficult problem in the development of public blockchain. The Qitmeer network is no exception, and there is a constant need to balance these two points in the development process.