Move is a programming language designed for blockchain and smart contracts that is committed to providing greater security, verifiability, and flexibility. With the Move programming language, developers can build adaptable programs that easily manage and transfer digital assets. Although Move has other application scenarios, its main role is as a development tool to ensure the unique ownership and single use of digital assets. The Move language has now become one of the core technologies of emerging blockchain platforms such as Aptos, Sui, and Starcoin.
Origin of Move
Move was originally developed by Facebook (now Meta) for its blockchain project Diem (formerly known as Libra). Diem’s goal is to create a simple, low-cost, and widely used blockchain network around the world. To this end, Move is designed as a language for executing blockchain transactions and provides developers with a means to build applications compatible with Libra. At the end of 2020, Libra changed its name to Diem due to international criticism of its logo and name. In January 2022, Libra ultimately failed to launch successfully due to concerns about security and money laundering issues raised by major countries around the world.
The Move language is written in Rust, a highly regarded multi-paradigm programming language known for its memory safety and avoidance of concurrency issues (data contention). Rust has gradually gained popularity among developers around the world in 2018 and was developed by Graydon Hoare for Mozilla Research in 2006.
Design goals of Move
Move was originally designed to provide a safe and easy-to-write language. To achieve this goal, Move needs to present the rules of the Diem blockchain and its issued tokens in a concise, precise and verifiable way.
1. Resource model
Move allows users to declare custom assets as resource types, which are called first-level resources and have special permissions and higher security. First-level resources automatically include access control, and only users with correct bytecode verification can perform extension operations. Move also has a modular design similar to Ethereum smart contracts (Solidity), which contain resources and code blocks of various types and functions.
Move is designed to make resources extremely transparent in modules, while external calls to modules are completely opaque. Another key feature is that Move allows for custom semantic definitions of resource types. Resources can never be copied or completely deleted. They can only be moved from one storage location to another.
2. Flexibility
Each Diem transaction contains transaction scripts, which are used to call and execute operations in modules. A single main program can be composed of customizable arbitrary code, and a single transaction script can call a variety of different programs.
The Move module provides great flexibility, allowing programmers to build more secure and scalable code. Move is similar to an object-oriented programming language, and the relationship between its modules, procedures, and resources is similar to the relationship between classes, methods, and objects.
3. Verifiability
While Move supports on-chain verification, it also allows off-chain verification tools to reduce the complexity of on-chain verification. This is critical for high-performance blockchain systems, and off-chain verification reduces the burden of on-chain verification.
4. Security
The Move language is extremely rigorous in terms of resource, type, and memory safety, ensuring that programs that do not meet these security properties will not be accepted. Move uses an advanced typed bytecode execution model that combines the features of high-level programming languages with the flexibility of low-level programming languages.
Mainstream blockchain development languages
Currently, the mainstream smart contract programming languages in the blockchain industry include: Solidity, Rust, Move, Vyper, and Cairo. The characteristics of each language are as follows:
1. Solidity: The most widely used smart contract language for Ethereum, with syntax similar to JavaScript, is currently the first choice for developing Ethereum smart contracts.
2. Rust: Mainly used for Solana smart contract development, known for its high performance and memory safety. Solana’s contracts are written in Rust and compiled into WebAssembly (Wasm).
3. Move: Originally developed for the Diem project, it emphasizes security and verifiability to prevent common smart contract vulnerabilities.
4. Vyper: A concise and safer smart contract language designed for Ethereum. Compared with Solidity, it avoids certain complex functions, thereby reducing security vulnerabilities.
5. Cairo: used for StarkNet smart contract development, focusing on scalability and privacy protection, and supporting zero-knowledge proof.
Advantages of Move
Compared with other blockchain languages, Move has unique advantages in many aspects:
1. High security: Move emphasizes resource security management, which can effectively prevent replay attacks and double-spending attacks. Through the type system and resource model, it ensures that assets can only be created, destroyed or transferred in a predefined way, avoiding unsafe operations.
2. Resource model: Move regards assets (such as tokens) as non-replicable and non-losable resources, which ensures that assets can only be safely transferred between owners, eliminating the risk of repeated creation or accidental loss.
3. Flexibility and modularity: Move supports modular design, developers can reuse code and build complex and scalable smart contracts. At the same time, Move’s type system allows the definition of custom resource types, which can meet complex financial and business logic requirements.
4. Formal verification: Move supports formal verification, allowing developers to verify the correctness of the code before deployment, thereby reducing vulnerabilities and errors. Verifying smart contract behavior through mathematical proofs helps to further improve security.
5. Concurrent processing: Move is designed with concurrent execution in mind, supports parallel processing of multiple transactions, and can significantly improve the throughput and performance of the blockchain.
6. Strong adaptability: Although Move was originally designed for the Diem project, its versatility enables it to adapt to different blockchain platforms. Currently, several blockchain projects (such as Aptos and Sui) have adopted or explored the use of the Move language.
Summary
As a new generation of programming language, Move has become the core technology of blockchain platforms such as Aptos, Sui and Starcoin with its unique resource management model, high security and flexibility. With the continuous development of these platforms, the application prospects of the Move language in decentralized finance (DeFi), NFT and other blockchain applications are very broad. In the future, Move will play an important role in promoting blockchain innovation and development.
About Starcoin
Starcoin provides the utmost security from the origin via its enhanced PoW consensus and Secure smart contract, using the language of Move. Through layered and flexible interoperability, it optimizes the building of ecosystems such as DeFi, NFTs, Gaming, etc., with higher efficiency and convenience. This process redefines value by empowering every participant in the ecosystem to enjoy the multiplication of values.
Follow Starcoin on social media to stay up to date with all the latest developments.