Smart contract vulnerabilities have caused billions in financial losses, raising questions about whether programming language paradigms can reduce security overhead. While imperative languages like Solidity require developers to manually implement security checks, resource-oriented languages like Move encode safety guarantees in type systems. We present a preliminary mixed-methods study analyzing 12 functionally-equivalent contract pairs implemented in both Solidity and Move by the same development team, complemented by a survey of 11 developers experienced in both languages. Quantitative analysis reveals that Move reduces explicit security overhead by 60\% (security check density: 6.7% vs. 16.8%, p=0.002, Cohen's d=-1.75) at the cost of 47% larger code size (p=0.002, d=1.90), while maintaining identical cyclomatic complexity. Developer surveys show moderate learning difficulty but higher safety confidence in Move (Median=6/7, 10 of 11 above neutral), with 55% preferring Move for security-critical applications despite ecosystem maturity gaps. These preliminary findings suggest resource-oriented paradigms shift security from runtime validation to compile-time guarantees, though adoption requires investment in learning and tooling. The controlled comparison provides initial evidence for paradigm effects on smart contract development, informing language selection decisions and identifying opportunities for improved developer resources.
翻译:智能合约漏洞已造成数十亿美元的经济损失,引发了对编程语言范式能否降低安全负担的探讨。虽然Solidity等命令式语言要求开发者手动实现安全检查,但Move等资源导向型语言将安全保证编码在类型系统中。我们开展了一项初步的混合方法研究,对同一开发团队使用Solidity和Move编写的12个功能等效合约对进行分析,并对11名精通两种语言的开发者进行补充调研。定量分析显示,Move可将显式安全负担降低60%(安全检查密度:6.7% vs. 16.8%,p=0.002,Cohen's d=-1.75),但代码规模相应增加47%(p=0.002,d=1.90),同时保持相同的圈复杂度。开发者调查显示学习难度中等,但Move的安全信心更高(中位数6/7,11人中有10人超过中性值),55%的受访者在安全关键型应用中更倾向使用Move,尽管其生态系统成熟度存在差距。这些初步发现表明,资源导向型范式将安全性从运行时验证转向编译时保证,但采用该范式需要投入学习与工具开发成本。通过受控对比实验,本研究为范式对智能合约开发的影响提供了初步证据,可为语言选型决策提供参考,并为改进开发者资源建设指明方向。