一句话:提出端到端系统 iSyn,用 SmartIR 中间表示和 NLP 流水线,从金融法律协议半自动合成并验证智能合约。
针对现有工作仅将智能合约视为法律协议的简单附加组件、难以实现复杂法律语义的问题,本文提出首个端到端系统 iSyn,目标是以最少人工干预从金融法律协议合成智能合约。其核心是中间表示 SmartIR,弥合自然语言句子与合约语句之间的差距;系统协同多种 NLP 技术从协议构建 SmartIR 实例,再基于模板合成智能合约,并设计验证框架检查正确性与已知漏洞。作者用金融交易相关法律协议评估,结果显示 iSyn 合成的合约与人工开发的 ground truth 在语法上相似、语义正确或仅需少量编辑。
Embracing software-driven smart contracts to fulfill legal agreements is a promising direction for digital transformation in the legal sector. Existing solutions mostly consider smart contracts as simple add-ons, without leveraging the programmability of smart contracts to realize complex semantics of legal agreements. In this paper, we propose iSyn, the first end-to-end system that synthesizes smart contracts to fulfill the semantics of financial legal agreements, with minimal human interventions. The design of iSyn centers around a novel intermediate representation (SmartIR) that closes the gap between the natural language sentences and smart contract statements. Specifically, iSyn includes a synergistic pipeline that unifies multiple NLP-techniques to accurately construct SmartIR instances given legal agreements, and performs template-based synthesis based on the SmartIR instances to synthesize smart contracts. We also design a validation framework to verify the correctness and detect known vulnerabilities of the synthesized smart contracts.We evaluate iSyn using legal agreements centering around financial transactions. The results show that iSyn-synthesized smart contracts are syntactically similar and semantically correct (or within a few edits), compared with the “ground truth” smart contracts manually developed by inspecting the legal agreements.