[ - by DigitalSoulx]
While the original vision of IOTA was to build a DLT to enable the Internet of Things, the development of the protocol has expanded well beyond that today. The Smart Contract infrastructure that will soon be rolled out on Shimmer will broadly expand the capabilities of the ledgers by enabling a host of new distributed applications (dApps). However, it is clear that the original “no machine left behind” motivation has not been abandoned; it has been expanded to include even the virtual machines of today.
How can a machine be virtual?
We are all patiently awaiting the release of the ShimmerEVM: the Shimmer-customized Ethereum Virtual Machine. In simple terms, a Virtual Machine (VM) is a software package that emulates a different Operating System (OS) that is to be run alongside your primary OS. A VM has its own memory, storage space, etc. and can be used to perform standard computer functions like running a program or creating files. However, the ‘machine’ is just a virtual construct. It allows software to be run on a machine that would otherwise not support it. It provides separation between dApp and node, so if there is an attack on the VM nothing else is affected. The rest of this article will introduce several different VMs that may soon be supported on Shimmer (and later IOTA) with their corresponding strengths and weaknesses.
Introduction to the Shimmer Ethereum Virtual Machine or ShimmerEVM
Let’s start with the VM that is currently the most popular and will be integrated into Shimmer and IOTA first: the ShimmerEVM. The EVM is a stack-based, Turing-complete VM that is responsible for executing Smart Contracts on the Ethereum network. Since it’s Turing complete, it can execute any computationally-viable program, making it highly flexible. Also, Ethereum has a wide and long-established community. So, there is a wide base of users and resources available to developers writing code in Solidity, the popular yet still somewhat complicated programming language designed for the Ethereum blockchain.
Despite the advantages, on the Ethereum network the EVM currently faces scalability challenges since all state transitions must be processed one after the other (serially). This can cause delays in processing and higher transaction fees as the network gets congested. Also, gas fees can be unpredictable and quite high at times of peak usage, making it difficult for developers to predict the costs of running their dApps. However, the ShimmerEVM may alleviate some of these drawbacks due to the inherent benefits of the DAG structure of the network.
The MoveVM: More Flexible and Highly Secure
Next, let’s take a look at the MoveVM, developed through the Diem project and supported by Meta. The initial plan was develop the Diem blockchain and the Libra stablecoin for integration with the Meta web2 platforms like Facebook and Instagram. When the regulatory environment presented too many challenges to accomplish this, the tech was sold to the Silvergate blockchain bank.
The MoveVM utilizes a relatively new programming language called Move, which is more flexible, more secure and easier to use than traditional smart Contract languages like Solidity. The Move language itself is a resource-oriented language developed specifically for the MoveVM, so it is extremely efficient and performant. Move itself includes support for managing the scarce storage and computation resources available on a blockchain.
The MoveVM has several key security features worth noting: 1) Code must be verified before it can be executed, and this improves the integrity of the dApps that are developed for the VM. 2) Each token can be coded with specific rights and privileges for owners. So, hackers without the proper credentials won’t be able to pull tokens from a smart contract even if they gain access. 3) Due to the design of the VM, smart contract exploits like double spend attacks and reentrancy are very unlikely. Also, MoveVM includes support for transaction-as-script. This provides great flexibility to users of the Move language, since they can execute multiple operations through a single transaction that could simply be a user script. It is a powerful smart contract framework and even the IOTA Foundation sees the potential:
The FuelVM: A Highly Scalable and UTXO-Based VM
The FuelVM developed by Fuel Labs is also being considered for use on Shimmer and IOTA. The whole idea behind the FuelVM was to make Ethereum more scalable by deploying a Layer 2 rollup that would make better use of existing hardware rather than forcing nodes to upgrade. This is important, because if the resource requirements are too high, less nodes can join the network, making it more centralized. However, the FuelVM should not be viewed only as a rollup since it can also be configured as its own Layer 1 to achieve consensus in a network. Lastly, it’s worth noting that smart contracts in the FuelVM are written in Sway, a language that takes cues from Rust and Solidity while utilizing the best of both languages.
FuelVM is notable because it can be utilized on just about any blockchain. It was designed to enable fraud proofs so it’s perfect for optimistic rollups, greatly improving the scalability of Ethereum. It matches well with Shimmer and IOTA because it’s UTXO-based, and every transaction must have well-defined rules for any UTXOs it handles. As we are aware with the new output types in Shimmer, transactions can be set to execute only when certain conditions are met (like our time-lock feature), offering novel use-cases. The UTXO model is also cleaner and leads to fewer conflicts while limiting state bloat.
The FuelVM also allows for native handling of assets which is a stark contrast to EVM. The EVM only natively supports ETH, and other assets can only be handled via smart contracts. Native handling of assets has clear advantages: 1) Gas is cheaper for native transfers when compared to smart contracts. 2) Native assets allow for a much better user experience since there is less complexity involved with configuring the smart contracts.
Novel Virtual Machines Still Have Weaknesses
However, the MoveVM and FuelVMs are not without drawbacks. They are still relatively new technologies, so they don’t have the same adoption and support (libraries, tools, etc) of more accepted VMs, like the EVM. Even though the Move language was tailored for the MoveVM, its formal semantics and resource management features make for a steep learning curve for developers. Similarly, the FuelVM has a unique architecture that may make it more difficult for developers to learn. Lastly, the scalability of the VMs has not been fully tested in high-usage environments even though they are expected to be better than EVM.
Although the EVM has a first-mover advantage and is widely used for smart contracts today, there are number of new virtual machines preparing to challenge EVM’s dominance. These novel environments can build on the features that make EVM so popular while resolving its limitations. And even though the MoveVM and FuelVM show much promise, they are not the only players trying to entice the next generation of smart contract developers. Many blockchains already use their own network-specific VMs. Even Ethereum has a new VM to address the limitations of EVM while utilizing the capabilities of the new Proof of Stake consensus in Eth 2.0: eWASM or Ethereum WebAssembly. In the end however, it seems clear that the future for Shimmer and IOTA will include support for many VMs, allowing developers from many backgrounds and experience levels to feel at home with us, just like the machines.