Design and implementation of conclusion procedure in smart legal contracts based on negotiation and acceptance
-
摘要: 从合同订立的相关法律规定入手,通过引入合约范本化思想,提出了一种包含智能合约建立、部署、订立和存证四个阶段的规范化合约订立流程,使之满足书面合同成立要件的法律规定;同时,在合约范本中提出了书面化交互接口,使之满足合约“订”和“立”两个阶段的交互;此外,在智能法律合约语言SPESC中引入了合约订立相关语法,使之满足合约订立过程中的“要约–承诺”制度,并设计了三种区块链交易结构支持当事人注册、签名、条款执行中交互数据的存证;最后,以销售合约为实例,从订立过程的要约认定、承诺认定、存证合法性三方面辨析了所提智能法律合约订立方案的合规性。所做工作将有助于为智能法律合约的订立过程提供法律依据,促进我国智能合约的法律化建设。Abstract: Smart legal contract (SLC), as a form of smart contract in accordance with the law, has attracted extensive attention in recent years. However, the conclusion procedure of an SLC still lacks effective technical methods to make it conform to the current legal regulations, which directly affects the legitimacy of the SLC contract. Therefore, this paper starts with the relevant legal regulations of contract conclusion and introduces the idea of contract normative pattern (CNP), which is a reusable form, model, or template for contract conclusion. Based on these regulations, we propose a standardized conclusion procedure of smart legal contracts. This procedure includes four stages: establishment, deployment, conclusion, and deposit to meet the current legal regulations for the conditions of establishment in the written contracts. Meanwhile, a written form of interactive interface is proposed to satisfy the two stages of “negotiation” and “acceptance” in the CNP. The negotiation stage supports the parties to repeatedly negotiate and determine the pending contents in the CNP, and the acceptance stage is to activate the behavioral attribute by actively triggering predefined algorithms, such as registration and signature. In addition, the syntax of contract conclusion, including parties’ negotiation and acceptance, is introduced in the SLC language, SPESC, to adhere to the “negotiation-acceptance” mechanism in the conclusion procedure. In this paper, we design three blockchain’s transaction structures to store interactive data during party registration, signature, and clause execution. Finally, considering the sales contract as an example, we analyze the legitimacy of the proposed conclusion scheme based on three aspects: negotiation confirmation, acceptance confirmation, and deposit legitimacy. This paper will provide a legal basis for the conclusion procedure of an SLC and promote better achievement of legalization of a smart contract.
-
表 1 伴随交易的交易结构
Table 1. Structure of accompanying transaction
Notation Description vin[] ContractInput contractAddress Deployment address of contract latestCodeID Transaction ID of latest contract code latestExecuteID Transaction ID of latest contract status address Contract address method Contract interface vout[] ContractOutout contractData Contract status listSign Signature list signature Signature of current executor signdate Signature date of the current signer 表 2 以SPESC为例的智能法律合约语法模型
Table 2. Grammar model of smart legal contract based on SPESC
Contract module name Module description Grammar definition Contract framework Contract ::= Title{ Parties+ Assets+ Terms+ Additions+ Signs+} Contract title The contract title may consist of the of the contract name and the contract number. Title ::= contract Cname
(:serial number Chash)?Contract party The description of contract party can include the party’s name, address, account number, and other attributes and values owned by this party, and technical measures such as the party’s identity authentication can be adopted to ensure the uniqueness of its identity. Parties ::= party group?
Pname {field+ }Contract subject The contract subject refers to the object that the rights and obligations of the parties point to together, which is generally divided into things, behaviors, intellectual achievements, etc. Contract subject is represented by asset in the smart legal contract, and the description of such assets should exist in the blockchain. Assets ::= asset Aname{ info{ field+ } right{ field+ }} Asset expression The asset expression used for the reference of a certain asset
in contracting terms.AssetExpressions ::= $ (amount)? (right of)? Aname Asset operations Deposit The party can deposit assets voluntarily from his party account to contract account. The deposit operation is applied into the transaction of action execution in the term, in which the party can designate the deposited assets directly by asset expression, and restrict the assets through comparing two values by relational operation to determine their relationship. The latter is used to grant the permission for transferring the designated assets only if the relationship is satisfied. Deposits ::= deposit (value RelationOperator)? AssetExpression Withdraw The party can withdraw assets from contract account in the execution of terms, where the assets are designated by the asset expression. Withdraws ::= withdraw AssetExpression Transfer The party can transfer assets from contract account to other party account
in the execution of terms.Transfers ::= transfer AssetExpression to target Contract terms General terms General terms include the term’s name, the term’s parties, the rights and obligations of the parties (actions that must, can or are prohibited), the execution conditions of the term, the asset transactions, and the post-conditions to be satisfied after the execution of the term. GeneralTerms ::= term Tname: Pname (must|can|cannot) action(field+)
(when preCondition)?
(while transactions+)?
(where postCondition)?.Breach terms Breach terms refer to the legal liability to be assumed when the parties agreed by both parties do not perform the obligations stipulated in the smart legal contract or perform the obligations that do not conform to the contract. When the post-condition of the designated terms is not satisfied and the pre-condition of the breach term is satisfied, the related party must or can take action for setting the defaults, which may require to enforce asset operations and satisfy the post-condition of the breach term for the result of enforcement. BreachTerms ::= breach term Bname (against Tname+)? : Pname (must|can) action(field+)
(when preCondition)?
(while transactions+)?
(where postCondition)?.Arbitration terms Arbitration terms stipulates the method to solve controversy in smart legal contracts.
The specific controversy can be stated by nature language and an arbitration institution may be designated.ArbitrationTerms ::= arbitration term : (The statement of any controversy)?
administered by institution : instName.Additional information Additional information can define necessary supplementary information in smart legal contract, including entity’s attribute, contract object, the property and signature of guarantor, additional term, program variable, and the declaration of data structure. Additions ::= field + | (addition
Dname {field+}) -
参考文献
[1] Szabo N. The Idea of Smart Contracts (1994) [J/OL]. Public Networks. http://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart.contracts.html [2] Szabo N. Smart contracts: building blocks for digital markets [J/OL]. Public Networks.https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart_contracts_2.html [3] Nakamoto S. Bitcoin: a peer-to-peer electronic cash system [J/OL]. Bitcoin Online.https://bitcoin.org/bitcoin.pdf [4] Fan J L, Li X H, Nie T Z, et al. Survey on smart contract based on blockchain system. Comput Sci, 2019, 46(11): 1 doi: 10.11896/jsjkx.190300013范吉立, 李晓华, 聂铁铮, 等. 区块链系统中智能合约技术综述. 计算机科学, 2019, 46(11):1 doi: 10.11896/jsjkx.190300013 [5] Buterin V. A next-generation smart contract and decentralized application platform [J/OL]. Ethereum White Paper.https://translatewhitepaper.com/wp-content/uploads/2021/04/EthereumOrijinal-ETH-English.pdf [6] Bertoli P. Blockchain, Law and Governance. Berlin: Springer International Publishing, 2020 [7] Governatori G, Idelberger F, Milosevic Z, et al. On legal contracts, imperative and declarative smart contracts, and blockchain systems. Artif Intell Law, 2018, 26(4): 377 doi: 10.1007/s10506-018-9223-3 [8] Kasprzyk K. The concept of smart contracts from the legal perspective. Rev Eur Comp Law, 2019, 34(3): 101 [9] Guo S F. Blockchain smart contracts in contract law. Orient Law, 2019(3): 4 doi: 10.3969/j.issn.1007-1466.2019.03.001郭少飞. 区块链智能合约的合同法分析. 东方法学, 2019(3):4 doi: 10.3969/j.issn.1007-1466.2019.03.001 [10] Chen J D. The legal structure of smart contract. Orient Law, 2019(3): 18 doi: 10.3969/j.issn.1007-1466.2019.03.002陈吉栋. 智能合约的法律构造. 东方法学, 2019(3):18 doi: 10.3969/j.issn.1007-1466.2019.03.002 [11] Farmer W M, Hu Q. A formal language for writing contracts // 2016 IEEE 17th International Conference on Information Reuse and Integration (IRI). Pittsburgh, 2016: 134 [12] He X, Qin B H, Zhu Y, et al. SPESC: A specification language for smart contracts // 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC). Tokyo, 2018: 132 [13] Regnath E, Steinhorst S. SmaCoNat: smart contracts in natural language // 2018 Forum on Specification & Design Languages (FDL). Garching, 2018: 5 [14] Mavridou A, Laszka A. Designing secure ethereum smart contracts: A finite state machine-based approach // Financial Cryptography and Data Security. Berlin, 2018: 523 [15] Choudhury O, Rudolph N, Sylla I, et al. Auto-generation of smart contracts from domain-specific ontologies and semantic rules // 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData). Halifax, 2018: 963 [16] Zupan N, Kasinathan P, Cuellar J, et al. Blockchain Technology Industry 4.0. Berlin: Springer International Publishing, 2020 [17] Zhu Y, Qin B, Chen E, et al. An advanced smart contract conversion and its design and implementation for auction contract. Chin J Com, 2021, 44(3): 1 [18] Clack C D, Bakshi V A, Braine L. Smart contract templates: foundations, design landscape and research directions [J/OL]. arXiv. https://arxiv.org/abs/1608.00771 [19] Clack C D, Bakshi V A, Braine L. Smart contract templates: essential requirements and design options[J/OL]. arXiv. https://arxiv.org/abs/1612.04496 [20] Clack C D. Smart contract templates: legal semantics and code validation. J Digit Banking, 2018, 2(4): 338 [21] Openlaw. OpenLaw's documentation [EB/OL].https://docs.openlaw.io/ [22] Zhou X Z, Li Y. An analysis of legal issues in the formation of electronic contracts. Forum Jiang Su Commer, 2003(8): 120 doi: 10.3969/j.issn.1009-0061.2003.08.061周显志, 李莹. 电子合同订立中的法律问题探析. 江苏商论, 2003(8):120 doi: 10.3969/j.issn.1009-0061.2003.08.061 [23] Wang S, Yuan Y, Wang X, et al. An overview of smart contract: Architecture, applications, and future trends // 2018 IEEE Intelligent Vehicles Symposium (IV). Changshu, 2018: 108 [24] Bartoletti M, Pompianu L. An empirical analysis of smart contracts: Platforms, applications, and design patterns. Financial Cryptogr Data Secur, 2017: 494 [25] Wohrer M, Zdun U. From domain-specific language to code: Smart contracts and the application of design patterns. IEEE Softw, 2020, 37(5): 37 doi: 10.1109/MS.2020.2993470 [26] Xu S. The contract attributes of smart contracts and their legal regulations. J Heilongjiang Adm Cadre Coll Politics Law, 2021(1): 74 doi: 10.3969/j.issn.1008-7966.2021.01.015徐颂. 智能合约的合同属性及其法律规制. 黑龙江省政法管理干部学院学报, 2021(1):74 doi: 10.3969/j.issn.1008-7966.2021.01.015 [27] Zhu Y, Wang Q S, Qin B H, et al. Survey of blockchain technology and its advances. Chin J Eng, 2019, 41(11): 1361朱岩, 王巧石, 秦博涵, 等. 区块链技术及其研究进展. 工程科学学报, 2019, 41(11):1361 [28] Watanabe H, Fujimura S, Nakadaira A, et al. Blockchain contract: Securing a blockchain applied to smart contracts // 2016 IEEE International Conference on Consumer Electronics (ICCE). Las Vegas, 2016: 467 [29] Zheng Z B, Xie S A, Dai H N, et al. An overview of blockchain technology: Architecture, consensus, and future trends // 2017 IEEE International Congress on Big Data (BigData Congress). Honolulu, 2017: 557 [30] Chinese Institute of Electronics. T/CIE 159-2020 Formal Expression of Blockchain Smart Contract. Beijing: China Standard Press, 2020中国电子学会. T/CIE 095-2020区块链智能合约形式化表达. 北京: 中国标准出版社, 2020 [31] Liu Q, Wang D J, Wang X X, et al. Review on conformance between legal contract and smart contract. Appl Res Comput, 2021, 38(1): 1刘琴, 王德军, 王潇潇, 等. 法律合约与智能合约一致性综述. 计算机应用研究, 2021, 38(1):1 [32] Savelyev A. Contract law 2.0: Smart contracts as the beginning of the end of classic contract law. Inf Commun Technol L, 2017, 26(2): 116 [33] Haapio H, Hagan M. Design patterns for contracts // Networks. Proceedings of the 19th International Legal Informatics Symposium IRIS. Wien, 2016: 381 [34] Zhu Y, Song W J, Wang D, et al. TA-SPESC: Toward asset-driven smart contract language supporting ownership transaction and rule-based generation on blockchain. IEEE Trans Reliab, 2021, 70(3): 1255 doi: 10.1109/TR.2021.3054617 [35] Li J, Chen Y S, Song H T. Research on digital currency supervision model based on blockchain technology. J Phys Conf Ser, 2021, 1744(3): 032112 doi: 10.1088/1742-6596/1744/3/032112 [36] Wang Y D, Li L, Hu D. A literature review of block chain. J China Univ Min Technol (Soc Sci) , 2018, 20(3): 74王元地, 李粒, 胡谍. 区块链研究综述. 中国矿业大学学报(社会科学版), 2018, 20(3):74 -