Web3.0底层语言:Move弥补了Solidity哪些不足?

吉时通信Pubblicato 2022-12-02Pubblicato ultima volta 2022-12-02

Introduzione

为什么基于Solidity语言的以太坊生态如此庞大,市场依然对新公链有着新期待?

摘要

为什么基于Solidity语言的以太坊生态如此庞大,市场依然对新公链有着新期待?Move出自大厂(Meta),被行业普遍看好,前期一些基于Move语言开发的公链得到了市场的青睐和资本的追捧。面向Web3更为丰富的应用,底层语言的进化是基础,Move有哪些优势,弥补了Solidity哪些不足?基于这些特点,Move生态有可能诞生新模式和新应用。

针对已有的编程语言如Solidity,Move语言在很多细节设计考虑的比较周到,如将库与应用逻辑分离开来;但最为突出的特点是资源类型方面,即面向资源的编程。在Dapp应用支持方面,吸收了比特币script和以太坊的smart contract的优点,因此行业普遍对该编程语言比较看好。而针对Solidity被外界诟病的安全问题,move也在尝试解决。

Move是面向资源(resources)的编程语言,资源在Move的世界里是“第一等公民”(first-class resource),其关键特性是自定义资源类型:resources永远不能被复制或隐式丢弃,只能在程序存储位置之间移动。Solidity并不是面向资源的,用户的账户拥有某个Token资产,只是该Token合约分配给用户的一个数值。而Move创建的Token账户资产是独一无二的资源类型,比如账户A中的资产是保存在A账户中的,虽然也是数值,但不能复制、丢弃或重用,可以被安全地存储和转移。同时,账户资产只能由定义该资源的模块进行创建和销毁,这使得同质化的数值类型的资产可能产生的重入、类似双花或者账户余额出现不平衡的状况得以避免。在这一点上,Move账户资产有些类似比特币的UTXO机制,Token不再是简单的同质化数值,而是可区分的。

为了可以实现更灵活的业务,Move另外定义了4种权限属性:可复制(copy)、可丢弃(drop)、可存储(store)、可检索(key)。这4种属性可以任意组合,来定义资源的属性,方便用户灵活操作。如drop+store+key的组合,定义的资源是不可以复制的,可以避免复制引发的代币增发以及双花的问题,这一点类似NFT以及比特币的UTXO机制。

对于模块化和合约组合性方面,Moe使用了模块和脚本设计,通过传递资源实现合约交互。Solidity(如以太坊)上面的Contract合约通过library(相当于静态库)进行消息的传递,从而实现Contract合约之间的调用、交互。而Move语言使用了模块(module)和脚本(script)的设计,前者类似于Contract合约,Move语言的合约组合性则是模块之间的组合,通过传递资源(即前文提到的resources)。关于组合性方面,Solidity和Move的区别非常明显。

在交易执行方面,Move的并行处理相交Solidity带来区块链性能的极大提升。并行执行(PE)通过识别独立交易并同时执行,这极大提升了区块链的扩展性。Solidity并不支持并行处理,如以太坊上的交易按顺序执行,其他交易置于暂停(排序)状态——因此产生了mempool(内存池)和MEV市场。如基于Move的公链Aptos,利用Block-STM(Software Transactional Memory)引擎实现并行处理,带来性能的明显提升。

风险提示:区块链商业模式落地不及预期;监管政策的不确定性。

注:封面图片基于“万兴AI绘画”的AIGC功能生成

1. 核心观点

Move出自大厂(Meta),被行业普遍看好,期间一些基于Move语言开发的公链得到了市场的青睐和资本的追捧。为什么基于Solidity语言的以太坊生态如此庞大,市场依然对新公链有着新期待?Move所拥有的优势,弥补了Solidity哪些不足?基于这些特点,Move生态有可能诞生新模式和新应用。

本文对比Solidity和EVM存在的不足,分析了Move的优势与特点。

2.为什么发明Move:弥补Solidity(以太坊)的哪些问题?

Move是Meta(原Facebook)公司为其Diem项目(最初是全球稳定币项目Libra)开发的一种安全可靠的智能合约语言,Aptos、Sui等新公链使用的正是move编程语言,这些公链正是看中了Move的优势及其并行处理特性,可拓展单片链的局限。Move是基于Rust的编程语言,但是Move专门针对智能合约进行开发优化,主要用于操作资源,因此入门门槛是低于rust的。因为主要针对智能合约,因此砍掉了许多Rust多余的操作,更加简洁。为了弥补Solidity和EVM出现的一些不足,Move做了一些优化,使得基于Move的Dapp应用有着更多灵活玩法。

针对已有的编程语言如Solidity,Move语言在很多细节设计考虑的比较周到,如将库与应用逻辑分离开来;但最为突出的特点是资源类型方面,即面向资源的编程。在Dapp应用支持方面,吸收了比特币script和以太坊的smart contract的优点,因此行业普遍对该编程语言比较看好。而针对Solidity被外界诟病的安全问题,move也在尝试解决。

2.1.一等资源与数字资产(first-class resource)

与其出现的背景相匹配,Move是面向资源(resources)的编程语言,资源在Move的世界里是“第一等公民”(first-class resource),其关键特性是自定义资源类型:resources永远不能被复制或隐式丢弃,只能在程序存储位置之间移动。它可以像传统的类型一样,可以存储在数据结构中,也可以作为参数传递。简单的说,他就是传统编程语言中一个不可随意销毁的新数据类型。对比Solidity定义的资产,如以太坊上的某种Token账户,资产只是一个数值,两个账户之间发生转账后,账户资产数值相应的发生变化,不同账户资产的区别就是数值余额,并无本质区别(也就是说资产是同质的)。同时需要注意,例如以太坊上ERC20代币TokenA,其是一个独立的合约账户,这个合约为用户(账户地址)分配一个数值,代表用户拥有的Token A的数量。从这一点可以看出,Solidity并不是面向资源的,用户的账户拥有某个Token资产,只是该Token合约分配给用户的一个数值。

而Move创建的Token账户资产是独一无二的资源类型,比如账户A中的资产是保存在A账户中的,虽然也是数值,但不能复制、丢弃或重用,可以被安全地存储和转移,用并不完全准确的比喻,可以认为A账户中的资产与其他账户资产在某种意义上是不完全同质的。同时,账户资产只能由定义该资源的模块进行创建和销毁,这使得同质化的数值类型的资产可能产生的重入、类似双花或者账户余额出现不平衡的状况得以避免。在这一点上,Move账户资产有些类似比特币的UTXO机制,Token不再是简单的同质化数值,而是可区分的。为了可以实现更灵活的业务,Move另外定义了4种权限属性:可复制(copy)、可丢弃(drop)、可存储(store)、可检索(key)。这4种属性可以任意组合,来定义资源的属性,方便用户灵活操作。如drop+store+key的组合,定义的资源是不可以复制的,可以避免复制引发的代币增发以及双花的问题,这一点类似NFT以及比特币的UTXO机制。

可以这样理解,以太坊(Solidity)的资产是由相应的合约控制,如果把Token A合约比喻为保险箱,保险箱会给所有用户分配一个数值余额,来表达用户所有拥有的Token A资产数量,但资产本身还是放在Token A合约的保险箱内。而Move用户账户本身就是一个单独的大保险箱,由用户自己控制,所有的Token资产都放在这个保险箱内。且这些Token并不是以数字的形式存在,而是不可复制的、权限受用户控制的资源(类型)。

Move语言中的资源定义与权限是分离的,资源的权限属于用户。Solidity中账户资源权限归属于合约,比如以太坊上某个erc20 Token属于相应的合约,如用户在DEX如Uniswap合约进行Token A(权限属于Token A的合约)兑换为Tokend B(权限属于Token B的合约)交易时,无法在Uniswap合约里直接提取自己的A资产换为B资产——因为Uniswap里资产的权限属于其合约。实际的流程至少三步交易操作:i)首先对Uniswap合约进行授权(approve),授权Uniswap合约代用户提取A合约的资产;ii)进入Uniswap合约进行兑换,提取A后将B存入账户;iii)取消授权(revoke)。但用户一般不会在完成兑换后立刻取消授权(为后续可能还会进行兑换行为节省gas费用),一旦Uniswap合约受到攻击或者出现漏洞,就为用的A Token账户带来风险。需要注意的是,授权/取消授权都需要在以太坊上执行合约操作,从而产生gas费。从这里我们可以清晰看到,Token A、Token B、Uniswap里的LP资产权限分属于各自的合约,用户无法通过一个账户在三个合约之间自由切换。而Move的资产大账户则不需要跨合约授权,权限是属于用户的,用户直接在DEX里提取A、兑换为B存储到账户里,这个过程可以在一个交易操作里完成,无需授权/取消授权操作,一定程度上提高了安全性。

2.2.Move语言的模块化和灵活组合性

此前我们的深度报告《Web3.0时代:开放、隐私、共建》中提出了Web3.0与Web2.0很大的区别在于开放性、可组合性。那么这种开放调用从底层上是如何实现的呢?Move语言又将提供哪些便利?

对于模块化和合约组合性方面,Solidity(如以太坊)上面的Contract合约通过library(相当于静态库)进行消息的传递,从而实现Contract合约之间的调用、交互。而Move语言使用了模块(module)和脚本(script)的设计,前者类似于Contract合约,Move语言的合约组合性则是模块之间的组合,通过传递资源(即前文提到的resources)。关于组合性方面,Solidity和Move的区别非常明显。

以部署Token合约为例,Solidity的Token作为一种服务存在,可以查询余额,而Move的Token则是一种资源,也就是上文提到的“永远不能被复制或隐式丢弃,只能在程序存储位置之间移动”。而这两者之间的区别,可以这样比喻:基于Solidiy的合约之间调用是通过消息服务,如各类接口的调用,Solidity上面的合约交互就好比是两个原始部落之间的贸易交流,为了方便两个部落之间的往来,需要统一生产工具和制作方法等标准信息——即两合约之间的状态同步,实现交互。A部落发明了石斧头,于是将这个石斧头的用材标准、制作方法等信息告知B部落,由B部落自行生产(这就好比Token A和Token B分别由各自的合约控制)。注意这里为了安全,合约要保持隔离状态,只能传递消息服务,但消息服务显然是可以复制或被丢弃(将石刻信息擦除)。如果一个合约出现升级,如以太坊NFT接口标准ERC 721、ERC 721A和ERC4907等系列优化升级,就好比A部落发明了铁器,因此需要通过消息服务告知对方部落更新生产配置。一个合约的升级,需要调用过该合约的其他合约进行状态同步,跟随升级。这个工作流程无疑会增加复杂性,以太坊合约的升级迭代也是同样复杂的,且会带来EVM的字节代码膨胀。

Move的世界,合约交互则更具备灵活组合性。还是上面的喻例,作为Move的模块(module)之间交互(即部落之间的交易)是通过传递资源来实现的,这种优化相当于科技升级,A部落并不是告知B部落生产工具的配置信息,而是根据需求,将生产工具(无论是石斧头还是升级后的铁器工具)封装在一辆型号合适的标准运输车中,对方不必需升级生产配置,而是每次只需要接收车辆开走就行。换句话说,Move的模块之间交互传递的不是消息,而是干脆传递了运输车辆(这是一种资源,永远不能被复制或隐式丢弃,只能在程序存储位置之间移动的资源)。无疑这种模式更具有灵活组合性,接收方收到车辆可以存储,也可以转移给其他方(其他合约),甚至可以将车辆货物卸下来后分装在不同的车辆里。也就是说,一个Move模块的升级,其他使用过该模块的合约自动会升级到最新状态。

2.3.对Web3安全性的改进

Move语言带来的安全改进是多方面的。

Move语言的资源有四个属性:可复制、可索引、可丢弃、可存储,通过这四个属性的不同组合,用户可以方便的定义出任何类型的资源。Solidity的资产是由代币合约赋予用户账户的数值余额,相比较,Move无疑增加了资产的安全性。

Solidity的资产是由相应的Token合约赋予用户的数值。而Move规定资源会存储在由所有者的帐户控制的模块里,资源的所有者具有最高决定权,只有所有者能够决定资源(Resource)的存储和转移。操作权限分离,使得不同场景可以定义不同的权限,这也是安全的一面。

Move资源的设计让数字资产转移不是账户间余额数值的简单加减,而是存储位置间的移动(不可复制、不可丢弃),避免重入和双花攻击。重入指的是黑客抓住代码漏洞,制造恶意合约,在用户转账的同时再次调用转账函数(重入),在不改变账户余额的情况下不断提走资金。对于Solidity语言Token合约的赋值方案,重入攻击和双花的风险都很大。

另外,Move的模块工作模式也大大降低了系统风险——如前文所述,Solidity合约升级需要其他合约作出相应的升级,否则将带来安全隐患,而Move的合约升级非常简单,只需相应合约自身升级,并不需要其他合约作出更新,这在一定程度上规避了合约升级不及时带来的安全风险。

2.4.Move的并行处理带来更高的扩展性

在交易执行方面,Move的并行处理相交Solidity带来区块链扩展性的极大提升。并行执行(PE)通过识别独立交易并同时执行,这极大提升了区块链的扩展性。Solidity并不支持并行处理,如以太坊上的交易按顺序执行,其他交易置于暂停(排序)状态——因此产生了mempool(内存池)和MEV市场。对于两个不关联的交易,如果能够并行处理,则高效且可扩展。

如基于Move的公链Aptos,利用Block-STM(Software Transactional Memory)引擎实现并行处理,带来性能的明显提升。其工作理念类似以太坊二层网络的Optimistic Rollup(乐观汇总),交易在区块内是预先排序的,先假设交易之间是没有依赖关系,乐观底执行并行交易。执行后验证所有交易结果,如果发现一个交易访问了由先前交易修改的内存位置,则该交易无效——因为很明显两个交易是相关的。刷新交易的结果,然后重新执行交易。重复该过程,直到区块中的所有交易都被执行。Block-STM的特点是支持比较复杂的事物,适合多种应用负载工况。

如下图,将Block-STM与区块按交易顺序执行进行了比较。每个区块包含一万笔交易,账户数量决定了区块处理的交易的竞争复杂程度。在低竞争和高竞争情况下,Block-STM比顺序执行的方案实现了8-16倍的加速。当交易任务是顺序的情况下,Block-STM的消耗也更小。由此可见,Move带来的并发性能是非常突出的。

由此可见,在L2(二层网络)之前,主链的并行处理能力亦是公链扩容积极考虑的方案。这为Move生态带来更多的可能性。

Crypto di tendenza

Letture associate

This Investor Day, SanDisk's 'Stunning Numbers' Shook the Market

SanDisk's Investor Day Shocks Market with "Explosive" Long-Term Targets SanDisk stunned the market at its 2026 Investor Day by unveiling an extremely aggressive long-term financial model. The company targets **mid-to-high double-digit revenue growth** for fiscal years 2028-2030. More impressively, it forecasts non-GAAP gross margins of approximately **80%** and operating margins around **75%** during that period, with an adjusted free cash flow margin of about 50%. A key strategic shift is SanDisk's focus on profitability over sheer output volume. The company clarified it will **flexibly adjust salable bit output based on profit optimization needs**, not simply chase bit shipment growth. This approach aims to avoid oversupply, especially during technology node transitions. SanDisk also committed to returning **100% of excess cash to shareholders** after funding business growth. Confidence in these targets is bolstered by new business model (NBM) agreements with eight major clients, covering roughly **50% of FY2027 and two-thirds of FY2028 bit shipments**, aiming to reduce cyclical volatility. The company sees massive tailwinds from AI, particularly the shift from training to inference, which is reshaping data center memory hierarchies. It estimates the enterprise flash TAM could reach **1.2 zettabytes by 2030**. SanDisk is advancing technologies like its CMOS Bonded Array (CBA) strategy and High Bandwidth Flash (HBF) for AI inference workloads. The announcement triggered a sharp rally, with SanDisk's stock soaring nearly 18% intraday and lifting the broader storage sector.

marsbit3 min fa

This Investor Day, SanDisk's 'Stunning Numbers' Shook the Market

marsbit3 min fa

Bitwise Chief Investment Officer: Revenue Reigns Supreme, The Valuation Logic for Crypto is Being Rewritten

The valuation logic of crypto assets is shifting from speculative models to a focus on real revenue and earnings, according to Bitwise CIO Matt Hougan. For years, a key criticism was that crypto tokens lacked fundamental value as they didn't generate cash flows for holders, partly due to a restrictive regulatory environment. This changed following the 2023 Ripple lawsuit and subsequent regulatory shifts, allowing projects to direct protocol revenues to token holders. Hyperliquid pioneered this model, using ~99% of its fee revenue to buy back and burn its HYPE token, creating a direct link between network activity and token value. Its success has inspired widespread adoption. Uniswap now uses all fee revenue to burn UNI, Aave has implemented automated buybacks, and new platforms like shturl.c and Lighter have built revenue-sharing mechanisms from inception. Even layer-1 blockchains like Solana and Aptos are adjusting fee models to benefit token holders. Hougan draws a parallel to early internet companies that eventually monetized their user bases. He argues that top crypto platforms possess significant pricing power and that the market undervalues them because many investors, both inside and outside crypto, have not yet recognized this fundamental shift. While tokens carry different risks than equities (e.g., governance-based revenue rights), the growing alignment of revenue with token value could lead to a significant re-rating of crypto asset valuations in the coming 12-24 months.

marsbit11 min fa

Bitwise Chief Investment Officer: Revenue Reigns Supreme, The Valuation Logic for Crypto is Being Rewritten

marsbit11 min fa

Shanghai Automotive Chip 'Little Giant' to IPO, Aiming to Raise 3.489 Billion Yuan

"Shanghai-based auto chip 'Little Giant' Gatsland Aims for IPO, Seeking to Raise 3.489 Billion CNY" Gatsland Microelectronics, a Shanghai-based automotive-grade millimeter-wave radar and ultra-wideband (UWB) chip company recognized as a national-level "Little Giant" specializing in core technologies, has filed for an IPO on Shanghai's STAR Market. Founded in 2014, the company is a key player in China's automotive semiconductor sector. It achieved a milestone in 2017 by mass-producing the world's first automotive-grade 77GHz mmWave radar RF front-end single-chip using CMOS process technology, breaking the industry's reliance on GaAs and SiGe multi-chip solutions. Gatsland claims to be the fourth-largest global and second-largest domestic supplier of automotive mmWave radar chips, and a leader in CMOS-based solutions. Financially, Gatsland has shown strong revenue growth, with figures rising from 206 million CNY in 2023 to 632 million CNY in 2025. However, the company remains unprofitable, reporting net losses for the reported periods, including a loss of 193 million CNY in 2025. Despite this, it maintains high gross margins, averaging around 47%, which are notably above industry peers. Over 97% of its recent revenue comes from automotive mmWave radar chips. The company's products, including its Alps and Kunlun platform chips, are used in advanced driver assistance systems (ADAS), autonomous driving, and in-cabin sensing. Its chips have been adopted by major Chinese automakers like BYD, Geely, and NIO, and it has begun supplying European Tier 1 suppliers and international OEMs including Volvo and Rivian. Gatsland's customer base is highly concentrated, with its top five direct clients accounting for over 99% of sales in recent periods. Its supply chain also relies significantly on overseas partners for wafer fabrication, packaging, and EDA tools. Notably, the National Integrated Circuit Industry Investment Fund Phase II ("Big Fund II") is among its shareholders. The management team, including founder and CEO Chen Jiashu, holds strong academic and industry backgrounds from institutions like UC Berkeley and companies such as Texas Instruments. For its IPO, Gatsland plans to raise approximately 3.489 billion CNY to fund R&D and production projects for next-generation mmWave radar and high-precision UWB chips, as well as a new innovation center. The company operates in a highly competitive landscape dominated by international giants like Infineon, NXP, and TI. While it has gained significant market share in China, Gatsland acknowledges it still faces gaps in comprehensive R&D strength and global customer reach compared to these established players.

marsbit12 min fa

Shanghai Automotive Chip 'Little Giant' to IPO, Aiming to Raise 3.489 Billion Yuan

marsbit12 min fa

Tether Finally Gets Audited by a Big Four Firm, But USDT's Transparency Issues Are Far From Over

Tether announced that KPMG U.S. has completed its first independent audit of Tether International's financial statements as of December 31, 2025, issuing an unqualified opinion—the highest level of assurance. The audit confirms Tether's assets exceeded liabilities by $6.814 billion at that date, with physical verification of gold bars and examination of underlying records. This represents a significant step beyond the quarterly reserve attestations Tether previously received, moving to a full financial statement audit that examines internal controls, transaction sampling, and accounting policies. However, the article highlights several ongoing transparency questions. The full KPMG audit report has not been publicly released, preventing independent verification of details like asset classification or related-party transactions. The audit covers a specific entity, "Tether International, S.A. de C.V.," leaving the scope concerning Tether's complex corporate structure unclear. Furthermore, the $6.8 billion excess reserves confirmed for end-2025 had shrunk to approximately $4.1 billion by Q2 2026. Risks within the reserve composition, particularly concerning secured loans, persist even with an audit. The audit's data is also already 8 months old, while USDT's circulation has grown rapidly. Strategically, the audit is seen as a move to bolster Tether's position amid U.S. regulatory developments like the GENIUS Act, which mandates audits for stablecoin issuers but leaves a path for foreign entities like Tether. While the KPMG opinion is a strong credibility signal, the article concludes that full transparency and regulatory compliance require further steps, starting with the publication of the complete audit report.

marsbit42 min fa

Tether Finally Gets Audited by a Big Four Firm, But USDT's Transparency Issues Are Far From Over

marsbit42 min fa

Trading

Spot

Articoli Popolari

Come comprare UNI

Benvenuto in HTX.com! Abbiamo reso l'acquisto di Uniswap (UNI) semplice e conveniente. Segui la nostra guida passo passo per intraprendere il tuo viaggio nel mondo delle criptovalute.Step 1: Crea il tuo Account HTXUsa la tua email o numero di telefono per registrarti il tuo account gratuito su HTX. Vivi un'esperienza facile e sblocca tutte le funzionalità,Crea il mio accountStep 2: Vai in Acquista crypto e seleziona il tuo metodo di pagamentoCarta di credito/debito: utilizza la tua Visa o Mastercard per acquistare immediatamente UniswapUNI.Bilancio: Usa i fondi dal bilancio del tuo account HTX per fare trading senza problemi.Terze parti: abbiamo aggiunto metodi di pagamento molto utilizzati come Google Pay e Apple Pay per maggiore comodità.P2P: Fai trading direttamente con altri utenti HTX.Over-the-Counter (OTC): Offriamo servizi su misura e tassi di cambio competitivi per i trader.Step 3: Conserva Uniswap (UNI)Dopo aver acquistato Uniswap (UNI), conserva nel tuo account HTX. In alternativa, puoi inviare tramite trasferimento blockchain o scambiare per altre criptovalute.Step 4: Scambia Uniswap (UNI)Scambia facilmente Uniswap (UNI) nel mercato spot di HTX. Accedi al tuo account, seleziona la tua coppia di trading, esegui le tue operazioni e monitora in tempo reale. Offriamo un'esperienza user-friendly sia per chi ha appena iniziato che per i trader più esperti.

593 Totale visualizzazioniPubblicato il 2024.12.12Aggiornato il 2026.06.02

Come comprare UNI

Discussioni

Benvenuto nella Community HTX. Qui puoi rimanere informato sugli ultimi sviluppi della piattaforma e accedere ad approfondimenti esperti sul mercato. Le opinioni degli utenti sul prezzo di UNI UNI sono presentate come di seguito.

活动图片