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%对比16.8%,p=0.002,Cohen's d=-1.75),代价是代码体积增大47%(p=0.002,d=1.90),同时保持相同的圈复杂度。开发者调查显示,Move的学习难度适中,但安全性信心更高(中位数=6/7,11人中有10人高于中性水平),尽管生态系统成熟度存在差距,仍有55%的开发者倾向于在安全关键型应用中使用Move。这些初步发现表明,面向资源的范式将安全性从运行时验证转向编译时保障,但采用该范式需要投入学习和工具建设成本。本受控比较为范式对智能合约开发的影响提供了初步证据,可用于指导语言选择决策,并识别改进开发者资源的机会。