[论文解读] Uma Prova de Conceito para a Verificação Formal de Contratos Inteligentes
该论文演示了使用 Relativized Contract Language (RCL) 和 RECALL 工具来指定和验证多边采购合同的概念验证,然后翻译并测试 Remix 中经过更正的 Solidity 版本。
Smart contracts are tools with self-execution capabilities that provide enhanced security compared to traditional contracts; however, their immutability makes post-deployment fault correction extremely complex, highlighting the need for a verification layer prior to this stage. Although formalisms such as Contract Language (CL) enable logical analyses, they prove limited in attributing responsibilities within complex multilateral scenarios. This work presents a proof of concept using the Relativized Contract Language (RCL) and the RECALL tool for the specification and verification of a purchase and sale contract involving multiple agents. The study demonstrates the tool's capability to detect normative conflicts during the modeling phase. After correcting logical inconsistencies, the contract was translated into Solidity and functionally validated within the Remix IDE environment, confirming that prior formal verification is fundamental to ensuring the reliability and security of the final code.
研究动机与目标
- 激励对智能合约的形式化验证,以应对部署后不可变性带来的风险。
- 展示如何使用 RCL 对多边责任进行建模,避免合同中的歧义。
- 演示通过 RECALL 进行冲突检测并在实现前解决问题。
提出的方法
- 在 RCL 中描述一个涉及多个参与方(买方、卖方、银行、承运人)的采购合同。
- 使用 RECALL 检测 RCL 规范中的规范性冲突。
- 在修正冲突后将合同从 RCL 转译为 Solidity 以便实现。
- 将 RCL 描述转译为带有状态化控制流和参与者特定修饰符的 Solidity。
- 在 Remix IDE 中对 Solidity 版本进行测试,以验证与 RCL 模型的一致性。
实验结果
研究问题
- RQ1RCL 规范和 RECALL 验证是否能在多边智能合约中发现规范性冲突?
- RQ2纠正 RCL 冲突是否能得到一个一致且可实现的 Solidity 合同,并保持预期行为?
- RQ3在 Ethereum 上部署智能合约之前,是否需要一个正式验证层来确保可靠性和安全性?
主要发现
- RECALL 发现初始 RCL 合同中承运人交付规则与运费支付流程之间存在冲突。
- 在修改 RCL(通知承运人运费支付并调整内部承运人规则)后,RECALL 报告无冲突的合同。
- 作者将修订后的基于 RCL 的合同转译为 Solidity,并在 Remix 中验证其行为,展示了上线前正式验证的价值。
- 研究讨论了从 RCL 到 Solidity 的多步转换以保留语义,并认为正式验证提升了合同的可靠性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。