Move 語言

Move 語言是一款以資源導向為核心的區塊鏈程式語言,最初由 Meta 為 Diem 專案所開發,目前主要應用於 Aptos 與 Sui 公鏈。此語言透過獨特的資源型別系統,將數位資產定義為不可複製、不可隱性丟棄的第一級公民,從語言層面有效防範雙重支付攻擊及重入漏洞。Move 語言結合靜態型別檢查、形式化驗證與模組化架構,為開發者提供一套兼具安全性與效能的智能合約開發解決方案。
Move 語言

Move 語言是一款專為區塊鏈設計的程式語言,最初由 Meta(前稱 Facebook)團隊為 Diem 專案打造。其核心設計理念在於透過資源導向的程式設計模式與強型別系統,從底層徹底保障數位資產的安全性與可驗證性。Move 引入了獨特的「Resource」資源概念,將數位資產視為不可複製、不可隱性丟棄的一級公民,根本上防止雙重支付攻擊、重入漏洞等智能合約常見安全問題。Diem 專案終止後,Move 被 Aptos、Sui 等新興公鏈採納並持續發展,成為新世代區塊鏈基礎建設的重要技術選擇。其靜態型別檢查、形式化驗證能力與模組化架構,讓開發者能打造更安全、可稽核的去中心化應用,為區塊鏈產業提供兼顧效能與安全的程式設計解決方案。

Move language is a programming language specifically designed for blockchain, originally developed by Meta's (formerly Facebook) team for the Diem project. The core design philosophy of this language is to ensure the security and verifiability of digital assets from the ground up through a resource-oriented programming paradigm and a strong type system. Move introduces a unique concept of "Resources," treating digital assets as first-class citizens that cannot be copied or implicitly discarded, fundamentally preventing common smart contract security issues such as double-spending attacks and reentrancy vulnerabilities. After the termination of the Diem project, Move was adopted and further developed by emerging public chains such as Aptos and Sui, becoming an important technological choice for next-generation blockchain infrastructure. Its static type checking, formal verification capabilities, and modular architecture enable developers to build safer and more auditable decentralized applications, providing the blockchain industry with a programming solution that balances performance and security.

背景:Move 語言的起源是什麼?

Move 語言誕生於 2018 年,由 Meta(當時稱為 Facebook)區塊鏈研究團隊主導開發,最初用於其全球數位貨幣專案 Diem(前身 Libra)。專案發起人認為,既有區塊鏈程式語言如 Solidity 存在資源管理缺陷與安全漏洞頻發,難以滿足金融級應用對安全性及可靠性的嚴格要求。因此,團隊決定從零開始設計新語言,將數位資產的安全屬性直接嵌入語言層級。

Move 的設計融合了線性型別理論(Linear Type Theory)與 Rust 的所有權模型,創新地將資源定義為具「移動語意」而非「複製語意」的型別。這代表資源變數在程式碼中只能被移動或銷毀,無法複製或意外遺失,從語言層面杜絕資產憑空產生或消失。2020 年,Diem 專案受監管壓力與策略調整縮減,但 Move 技術價值獲得業界肯定。2021 年後,原 Diem 團隊成員分別創立 Aptos 與 Sui 兩大公鏈,均以 Move 為核心開發語言,並依各自架構需求進行客製化優化。

Move language originated in 2018, led by Meta's (then Facebook) blockchain research team, initially serving its ambitious global digital currency project Diem (formerly Libra). The project initiators believed that existing blockchain programming languages like Solidity had resource management flaws and frequent security vulnerabilities, failing to meet the stringent security and reliability requirements of financial-grade applications. Therefore, the team decided to design a new language from scratch, embedding the security properties of digital assets directly into the language layer.

Move's design absorbed linear type theory and Rust's ownership model, creatively defining resources as types with "move semantics" rather than "copy semantics." This means resource variables can only be moved or destroyed in code, not copied or accidentally lost, eliminating the possibility of assets appearing or disappearing out of nowhere at the language level. In 2020, the Diem project gradually contracted due to regulatory pressure and strategic adjustments, but Move's technical value gained industry recognition. After 2021, original Diem team members separately founded two major public chain projects, Aptos and Sui, both adopting Move as the core development language and making customized improvements based on their respective architectural needs.

工作機制:Move 語言如何運作?

  1. 資源型別系統:Move 的核心機制是資源型別(Resource Type),透過編譯器嚴格執行所有權規則。資源型別變數必須明確移動(move)或銷毀(destroy),禁止複製或丟棄操作。此機制確保代幣、NFT 等數位資產在智能合約執行過程中的唯一性與可追溯性,根本上防止雙重支付及資產外洩。

  2. 模組化與泛型系統:Move 以模組(Module)作為程式碼組織單位,每個模組可定義結構體、資源及公開函式。泛型系統讓開發者能撰寫可重複利用的抽象程式碼,並維持型別安全。例如,開發者可建立泛型代幣模組,適配不同資產型別而無須重複撰寫邏輯。

  3. 位元組碼驗證與形式化驗證:Move 程式碼編譯為位元組碼後,虛擬機在執行前會進行嚴格的靜態驗證,包括型別檢查、資源流分析及引用安全驗證。此外,Move 支援整合形式化驗證工具(如 Move Prover),開發者可透過數學證明確保合約邏輯正確性,這對金融應用尤為關鍵。

  4. 帳戶模型與全域儲存:Move 採用帳戶式儲存模型,每個帳戶地址對應一儲存空間,資源資料存放於帳戶而非合約地址。此設計讓資產所有權更明確,使用者可直接掌控帳戶內資源,無需仰賴外部合約狀態。

  5. 執行環境:Move 程式碼運行於專屬虛擬機(Move VM),針對區塊鏈環境最佳化,支援確定性執行及 Gas 計量。不同公鏈 Move 實現略有差異:Aptos 的 Move VM 強化平行執行效能,Sui 的 Move 變體則引入物件模型以支援更複雜的狀態管理。

  6. Resource Type System: The core mechanism of Move is the Resource Type, which enforces ownership rules through compiler constraints. Resource type variables must be explicitly moved or destroyed, prohibiting copy or discard operations. This ensures the uniqueness and traceability of digital assets such as tokens and NFTs during smart contract execution, fundamentally preventing double-spending and asset leakage issues.

  7. Modularity and Generic System: Move adopts modules as code organization units, with each module defining structs, resources, and public functions. The generic system allows developers to write reusable abstract code while maintaining type safety. For example, developers can create a generic token module that adapts to different asset types without rewriting logic.

  8. Bytecode Verification and Formal Verification: After Move code is compiled into bytecode, the virtual machine performs strict static verification before execution, including type checking, resource flow analysis, and reference safety verification. Additionally, Move supports integration with formal verification tools (such as Move Prover), allowing developers to mathematically prove the correctness of contract logic, which is particularly critical in financial applications.

  9. Account Model and Global Storage: Move adopts an account-based storage model, where each account address corresponds to a storage space, and resource data is stored within accounts rather than contract addresses. This design makes asset ownership clearer, allowing users to directly control resources in their accounts without relying on external contract states.

  10. Execution Environment: Move code runs in a dedicated virtual machine (Move VM), optimized for blockchain environments, supporting deterministic execution and Gas metering. Different public chains have slightly different Move implementations: Aptos' Move VM optimizes parallel execution capabilities, while Sui's Move variant introduces an object model to support more complex state management.

風險與挑戰:Move 語言面臨哪些問題?

  1. 生態系成熟度不足:相較以太坊的 Solidity 生態,Move 語言的開發工具、函式庫與社群資源仍處於起步階段。開發者需學習全新程式設計模式,遷移成本高,且缺乏成熟的第三方稽核服務及安全工具鏈,增加專案上線前的風險評估難度。

  2. 學習曲線陡峭:Move 的資源導向程式設計與所有權模型對傳統智能合約開發者造成認知挑戰。開發者需重新理解資產管理邏輯,掌握線性型別約束及形式化驗證方法,這將延長團隊技術適應週期,可能影響專案開發效率。

  3. 跨鏈相容性受限:Move 目前主要應用於 Aptos、Sui 等特定公鏈,與以太坊、Solana 等主流生態缺乏原生互操作性。雖理論上可透過跨鏈橋實現資產轉移,但不同虛擬機架構與資源模型差異,導致跨鏈合約呼叫複雜度大幅提升,限制多鏈應用開發彈性。

  4. 效能最佳化與權衡:雖然 Move 強調安全性,但其嚴格型別檢查與驗證機制可能影響執行效能。在高併發場景下,形式化驗證的計算負擔可能成為效能瓶頸。此外,各公鏈對 Move 的客製化調整(如 Sui 的物件模型)可能導致語言碎片化,增加開發者維護多版本程式碼負擔。

  5. 監管與合規不確定性:Move 語言源自 Diem 專案,該專案因監管阻力而終止,這一歷史背景可能使採用 Move 的新專案面臨額外合規審查壓力。特別是在涉及金融服務的應用中,監管機構可能對其起源與技術特性保持謹慎態度,要求更嚴格的安全稽核與資訊揭露。

  6. Insufficient Ecosystem Maturity: Compared to Ethereum's Solidity ecosystem, Move language's development tools, libraries, and community resources are still in early stages. Developers need to learn an entirely new programming paradigm with high migration costs, and lack mature third-party audit services and security toolchains, increasing the difficulty of risk assessment before project launch.

  7. Steep Learning Curve: Move's resource-oriented programming and ownership model pose cognitive challenges for traditional smart contract developers. Developers need to rethink asset management logic, master linear type constraints and formal verification methods, which extends the team's technical adaptation cycle and may impact project development efficiency.

  8. Limited Cross-Chain Compatibility: Move language is currently mainly applied to specific public chains such as Aptos and Sui, lacking native interoperability with mainstream ecosystems like Ethereum and Solana. Although theoretically asset transfer can be achieved through cross-chain bridges, differences in virtual machine architectures and resource models significantly increase the complexity of cross-chain contract calls, limiting the development flexibility of multi-chain applications.

  9. Performance Optimization Trade-offs: Although Move emphasizes security, its strict type checking and verification mechanisms may affect execution efficiency. In high-concurrency scenarios, the computational overhead of formal verification may become a performance bottleneck. Additionally, different public chains' customized modifications to Move (such as Sui's object model) may lead to language fragmentation, increasing the burden on developers to maintain multiple code versions.

  10. Regulatory and Compliance Uncertainty: Move language originated from the Diem project, which was terminated due to regulatory resistance. This historical background may subject new projects adopting Move to additional compliance review pressure. Especially in applications involving financial services, regulatory agencies may remain cautious about the language's origins and technical characteristics, requiring stricter security audits and transparency disclosures.

Move 語言代表區塊鏈程式語言設計的重要創新趨勢,透過資源型別系統與形式化驗證能力,從語言層級為數位資產安全提供根本保障。其在 Aptos、Sui 等新興公鏈的應用,驗證了此語言在高效能、高安全需求場景下的實用價值。然而,生態發展滯後、學習門檻高及跨鏈互操作性不足等問題,仍限制 Move 的大規模普及。對區塊鏈開發者而言,理解 Move 的設計理念與技術特性,有助於於專案選型時權衡安全性與生態成熟度;對產業觀察者來說,Move 的演進路徑反映區塊鏈技術由「快速迭代」轉向「安全優先」的新典範。隨著工具鏈持續完善、開發者社群壯大,Move 有望於金融、遊戲等對資產安全要求極高的領域發揮關鍵作用,推動區塊鏈應用邁向更可靠、可稽核的發展方向。

Move language represents an important innovation direction in blockchain programming language design, providing fundamental language-level guarantees for digital asset security through its resource type system and formal verification capabilities. Its application in emerging public chains such as Aptos and Sui has validated the practical value of this language in high-performance, high-security scenarios. However, issues such as lagging ecosystem development, high learning barriers, and insufficient cross-chain interoperability still constrain Move's large-scale adoption. For blockchain developers, understanding Move's design philosophy and technical characteristics helps weigh security against ecosystem maturity when selecting project technologies; for industry observers, Move language's evolutionary path reflects blockchain technology's paradigm shift from "rapid iteration" to "security-first." As more toolchains are refined and developer communities grow, Move is expected to play a key role in domains with extremely high asset security requirements such as finance and gaming, driving blockchain applications toward more reliable and auditable development.

真誠點讚,手留餘香

分享

推薦術語
時代
在Web3領域,「cycle」指的是區塊鏈協議或應用中,依照固定時間或區塊間隔,定期發生的流程或時段。典型案例包括 Bitcoin 減半、Ethereum 共識輪次、代幣歸屬期規劃、Layer 2 提現挑戰期、資金費率與收益結算、預言機更新,以及治理投票週期。各系統的 cycle 在持續時間、觸發條件與彈性上各有不同。深入掌握這些 cycle,有助於管理流動性、優化操作時機,並明確風險界限。
共識機制
共識機制是在區塊鏈網路中,促使去中心化電腦就交易的有效性與需紀錄的資料達成一致的一套規範與流程。這類機制如同共享帳本的對帳系統,確保所有參與者的資料紀錄一致無誤。主流方式包括依賴算力競爭的 Proof of Work(PoW),以及透過質押與驗證者投票的 Proof of Stake(PoS)。共識機制在防範詐騙、維護系統穩定運作、決定網路速度、交易手續費和安全性等方面扮演關鍵角色。Bitcoin 與 Ethereum 等公有區塊鏈皆採用共識機制,聯盟鏈也常見於企業協作應用場景。不同的共識機制在確認速度、網路吞吐量、能源消耗與去中心化程度之間,存在各自的權衡與取捨。
去中心化
去中心化是一種系統設計理念,將決策與控制權分散至多方參與者,在區塊鏈技術、數位資產及社群治理等領域均有廣泛應用。這項機制仰賴眾多網路節點共同達成共識,使系統無需任何單一權威即可自動運作,進而提升安全性、抗審查性與開放性。在加密產業中,去中心化具體展現在 Bitcoin 和 Ethereum 的全球節點協作、去中心化交易所、非託管錢包,以及社群治理模式中,代幣持有者能透過投票決定協議規則。
有向無環圖
有向無環圖(Directed Acyclic Graph,簡稱 DAG)是一種網路結構,能將對象及其方向關係組織成僅能往前推進、無循環的體系。這類資料結構廣泛應用於表示交易依賴、工作流程及版本歷程。在加密網路領域,DAG 支援平行處理交易與共識資訊共享,有效提升系統吞吐量與確認效率。同時,DAG 能清楚展現事件的順序與因果關係,為區塊鏈運作的透明度及可靠性提供強而有力的保障。
什麼是 Nonce
Nonce 通常是指「僅使用一次的數字」,主要用來確保某項操作只能執行一次或必須依序進行。在區塊鏈及密碼學領域,Nonce 主要有三大應用情境:交易 Nonce 確保帳戶的交易能依序處理且不會重複;挖礦 Nonce 用於尋找符合特定難度條件的雜湊值;而簽章或登入 Nonce 則能防止訊息在重放攻擊時遭到重複利用。無論你是在進行鏈上交易、監控挖礦過程,或是以錢包登入網站,都會接觸到 Nonce 這個重要概念。

相關文章

區塊鏈盈利能力和發行 - 重要嗎?
中級

區塊鏈盈利能力和發行 - 重要嗎?

在區塊鏈投資領域,工作量證明(工作量證明)和權益證明(權益證明)區塊鏈的盈利能力一直是備受關注的話題。加密貨幣網紅Donovan寫了一篇文章,探討了這些區塊鏈的盈利模式,特別關注以太坊和Solana之間的差異,並分析了區塊鏈盈利能力是否應該成為投資者關注的重點。
2024-06-17 15:09:39
深入分析API3:利用 OVM 釋放 Oracle 市場顛覆者
中級

深入分析API3:利用 OVM 釋放 Oracle 市場顛覆者

最近,API3獲得了400萬美元的戰略資金費用,由DWF Labs牽頭,幾家知名風險投資公司參與其中。是什麼讓API3與眾不同?它會成為傳統神諭的破壞者嗎?Shisijun對預言機的工作原理,API3 DAO的代幣經濟學以及開創性的OEV網路進行了深入分析。
2024-06-24 06:52:22
密碼學稱FHE是ZK的下一步
中級

密碼學稱FHE是ZK的下一步

以太坊對規模的需求導致了Layer 2解決方案的發展,ZK/OP rollups成為關鍵參與者,形成了空期OP和多期ZK共識,突出了ARB,OP,zkSync和StarkNet作為主要競爭者。Web3 使用者只有在提供經濟價值時才優先考慮隱私。FHE 的加密成本進一步加重了已經很低的鏈上效率的負擔,只有當顯著的收益證明成本合理時,大規模採用才是可行的。對於需要公共區塊鏈但不願意披露所有資訊的機構客戶,FHE 的顯示和交易密文能力比 ZKP 更合適。
2024-06-19 10:42:38