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+})www.77susu.com -
參考文獻
[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 -