Why Move is the future of secure smart contract development

Zokyo
Zokyo_io
Published in
5 min readOct 17, 2022

Move is a new and advanced smart contract programming language developed by the people at Meta (or Facebook). Meta’s Diem blockchain IP, which includes Move, was purchased by Silvergate Bank in January 2022.

Although Move is essentially brand new, several projects like Aptos and Sui blockchains are already using it. As it attracts more developers daily, it is safe to say that Move will surpass the Solidity ecosystem one day.

What is Move?

At present, Move is a stack-based, advanced smart contract programming language. Move was designed to be a safe, secure programming language for smart contract development. It emphasizes scarcity and access control, and an asset can be represented by or stored within the resource.

Move enforces scarcity by default, and structs can’t be duplicated. Only structs that have been explicitly defined at the bytecode layer as a copy can be duplicated.

Move is suitable for coding asset-oriented scenarios leveraging features like static typing, generics, resource definition and control authority separation, formal verification, and a module system that helps ensure the security of crypto assets at a smart contract level.

Access control comes from module access privileges and the notion of accounts. In Move, a module can be a library or a program that can create, store, or transfer assets. Other modules can access only public module functions.

Move offers referential transparency for immutable references and prevents dangling references and memory leaks (like Rust). This approach helps minimize the attack surface.

However, Move lacks blockchain-specific concepts like accounts, cryptography, time, and transactions. These are provided by the blockchain platforms with which it integrates.

Key benefits of Move are as follows:

  • Allows for parallel execution
  • Provides automatic verifiability checks
  • Avoids JIT native compilation
  • Improves developer experience
  • Promotes composability

The drawbacks are as follows:

  • Compared to Solidity, there are only a few resources and code libraries (but this will change over time).
  • Move code cannot be easily ported to other blockchains (but third-party tools can be built to do this).

Separating permission control and resource definition helps clarify resource attributes and enables users to flexibly manage and transfer assets. Move does all this while implementing preventative measures to protect these assets from attacks. This makes Move far superior to Solidity.

Move Prover for asset security

If the above wasn’t enough to cement Move as a leading security-focused smart contract programming language, it also comes equipped with Move Prover. Move Prover is a formal verifier for smart contracts coded in Move.

It is fast and can run tests within minutes and provide developers with feedback within seconds. This means that development teams can quickly iterate on their code while eliminating potential errors and accelerating time to market.

Compared to Solidity, Move (like Rust) is also more expressive and has Rust’s superior object ownership system that detects many issues before you actually compile the code.

Move developers can define their own types for custom-built digital objects instead of storing assets in permanently locked hashmaps (like in Solidity). These digital objects can be passed in as arguments, flow through smart contracts, and returned by functions. Move’s intuitive design makes programming around digital objects easy.

How does it work?

When developers run computations, Move works by creating push-and-pop stack operations. Move’s execution model demands one or more resource types and accounts to have zero or more modules. However, you can only have a single resource within a specific resource type.

Move developers can also create custom resource types comprising multiple resource instances of the same type. In fact, resource-type customization is one of the main reasons why developers are quickly adopting Move.

Move’s executable format bytecode is at a lower level than that of a source language but at a higher level than that of an assembly. A bytecode verifier will check each bytecode on-chain for resource and memory safety. Then, a bytecode interpreter will execute it, maximizing safety without the additional cost of compilation to transactions. This approach goes a long way to reduce transaction fees (especially compared to those of existing networks like Ethereum).

The programming language also boasts a whole host of built-in functions. In this scenario, developers can reference resource values declared in a current module or even destroy them. For example, if the developer forgets to declare procedures to reference resource values leveraging built-in functions, then they can either view or alter that resource.

Robust asset security

Asset security is critical to crypto as web3 projects will have many assets that can continuously appreciate and drive project development. As such, project appreciation and development are at the heart of asset security. All platforms must provide a fundamental guarantee of asset security, but unfortunately, this is not the case, and crypto crime has become the norm.

As Move is highly suited to asset-oriented scenarios through features, it is already far superior to the competition. This is because features like generics, formal verification, module system, resource definition and control authority separation, and static typing ensure asset security at the smart contract level.

For transactions, the sender is represented by a signer or a verified owner of a particular account. In this scenario, the signer will have the highest permission level and is the only one capable of adding resources to that account. However, the module developer can demand the signer’s presence to modify assets or access resources stored within an account.

The key here is the separation of resource definition and permission control. This approach clarifies resource attributes and enables the flexible and secure management and transfer of assets. The fact that assets will be safe makes Move far superior to Solidity.

Define custom resource types

Compared to other smart contract programming languages, Move sets itself apart with the use of resources. Move is different from other smart contract programming languages because it uses resources derived from linear logic. In this case, the use of linear logic formulas will be treated as fundamental resources. However, they can only be used once, and resources are never discarded or copied. They can, however, move between program storage locations.

In a way, we can say that the code is bulletproof and more secure through “first class” resource types. This is further enabled through Move’s static typing system, meaning that created variables should be defined as specific types, thus protecting the first-class nature of resources because the code is compiled before execution. This approach prevents the delivery of failed programs.

--

--

Zokyo
Zokyo_io

Zokyo is a venture studio that incubates, secures, and funds legendary cryptoasset businesses.