区块链研习 | 区块链里所说的“智能合约”是什么?

资讯 2024-06-28 阅读:46 评论:0
...

雷锋网AI金融评论按:本文作者为中国信息通信研究院(工信部电信研究院)专家敖萌博士,雷锋网独家特约文章,雷锋网与信通院联合首发。未来,敖萌博士原创的区块链系列文章还将继续刊出,雷锋网(公众号:雷锋网)与信通院相关平台同步更新,敬请关注!

谈到区块链,必然离不开“智能合约”这个词。我们在本系列的第一篇文章中提到“智能合约”(smart contract)是由多产的跨领域法律学者 Nick Szabo 在1995年提出来的,他的定义为:“一个智能合约是一套以数字形式定义的承诺,包括合约参与方可以在上面执行这些承诺的协议。”那么,我们该如何理解这段话呢?

When it comes to block chains, the word “smart contract” is essential. In our first article in this series, we refer to “smart contract” as a multi-productive, cross-cutting legal scholar, Nick Szabo, who proposed in 1995 that “a smart contract is a set of commitments defined in digital form, including agreements where the parties to the contract can implement them”. So how do we understand that?

回顾一下比特币区块链系统中的转账:

reviews transfers in the Bitcoin block chain system:

Alice 转账给 Bob 100比特币,在比特币区块链系统中是这样记录的:

Alice transferred to Bob  100 bitcoin, as recorded in the Bitcoin block chain system:

 区块链研习 | 区块链里所说的“智能合约”是什么?

本质上,这就是一个合同。这个合同里面规定了 Alice 要转给 Bob 100比特币,该合同立即生效。注意,里面有一个“解锁信息”,这个“解锁信息”本质上就是 Alice 证明自己是 Alice 的地址持有者时需要提交的一个信息。 

In essence, this is a contract. The contract states that Alice is to be transferred to Bob 100 bitcoin, and the contract is to take effect immediately. Note that there is a "lock information" in it, and this "lock information" is essentially an information that Alice is required to submit when it proves that she is the holder of Alice's address. & nbsp;

显然,像比特币区块链系统里面,纯UTXO模式的这种合同用处是很有限的。首先,比特币是一个独立运行的封闭系统,它的转账脚本没有提供和外界进行交互的接口。所有信息(这里主要是解锁信息)只能在脚本提交到区块链之前定死,之后就只能按照固定方式运行。这对于“合同”来说是不符合实际应用的。

It is clear that, like the bitcoin block chain system, a pure UTXO model is of limited use. First, Bitcoin is a stand-alone closed system, and its transfer script does not provide interfaces with the outside world. All information (in this case, mainly unlocked information) can only be set to death before the script is submitted to the block chain, and then it can only operate in a fixed manner.

在我们实际生活中,一个完整的合同制定——执行流程是按照如下方式随着时间流逝而进行的:

In our real life, a complete contract-making — implementation process is carried out over time in the following manner:

区块链研习 | 区块链里所说的“智能合约”是什么?

其中,条件的达成通常是一个外部输入的事件,这意味着,我们实际生活中的合同通常是“事件驱动”型的。这个“事件”是否发生通常不是区块链上的数据能够判断出来的,而是依靠事件发生的时间点,通过链外输入数据的方式实现。 

Among them, the fulfilment of the conditions is usually an externally entered event, which means that the contracts in our real life are usually of the event-driven type. , the "event" is usually not a matter of data from the block chain, but depends on the time point of the event and is done by entering data from outside the chain. & nbsp;

以电子商务为例,Alice 在某宝的某个商家购买了一台笔记本电脑,当 Alice下单成功的那一刻,实质上就生成了一个合同。这个合同包含了 Alice 需要在多长时间内付款到第三方平台(事件1)。然后卖家看到 Alice 付款后需要发货,当 Alice 收到货以后需要点击确认收货(事件2),完成整个合同(在不考虑售后的情况下)。

.

在这个合同的执行过程中,事件1由于是一个纯粹的金融活动,已经高度的虚拟化,能够实现自动发现事件自动触发。而事件2则是一个在现实世界中发生的活动,需要我们“点击确认收货”来把这个事件的发生同步到虚拟世界中,这个“点击确认收货”就是虚拟世界中的事件2。所以,对于某宝的购物合同而言,事件1实质上是 Alice 是否转账到平台,事件2是 Alice 是否点击确认收货。因此,在这个合同中,预留了一个和外部交互的接口——确认收货。

In the course of the execution of this contract, event 1 was automatically triggered by an automatic discovery because it was a purely financial activity that was already highly virtualized. Event 2 is an event in the real world that requires us to “click to confirm receipt” to synchronize the occurrence of this event to the virtual world, and this “click to confirm receipt” is event 2 in the virtual world. Thus, for a purchase contract for a treasure, event 1 is essentially whether Alice is transferred to the platform and event 2 whether Alice is to confirm receipt.

除了和外部的交互能力外,比特币转账合同(脚本)的另一个重要缺陷是它不是图灵完备的。这句话对于非计算机专业的人来说可能不太好理解,我们可以简单的理解为它没有循环能力和复杂的条件控制能力。

In addition to interacting with external capabilities, another important flaw of the Bitcoin Transfer Contract (the script) is that it is not a perfect Turing

合同的循环能力在我们现实世界中是很常见的,例如我们和电信运营商签署的移动电话服务合同,通常就是一个循环合同。这种合同以自然月为单位,每个月自动循环执行。还有类似的企业间签订的长期采购合同,都是一种不断循环的合同。合同中规定的事件(或时间点)全部达成以后,自动循环回第一步,重新执行。 

The revolving capacity of the contract is common in our real world, such as our mobile phone service contract with telecommunications operators, which is usually a revolving contract. Such contracts are performed automatically every month in natural months. There is also a long-term contract for procurement between similar enterprises, which is a revolving contract. Once the events specified in the contract (or the point of time) have been fully achieved, the first steps are automatically recycled and re-executed. & nbsp;

复杂的条件控制能力就更常见了——合同中的违约条款就是条件控制能力。事件达成怎样,没有达成如何执行违约条款等,这些都需要合同拥有复杂的条件控制能力。 

And it is more common for to have complex conditions control — default clauses in contracts are conditions control. How the event is reached, how the default terms are not enforced, etc., requires complex conditions control in the contract. & nbsp;

比特币中的交易是使用比特币区块链底层平台定义的一套脚本语言来写的,由于当初比特币区块链系统是按照一个数字货币的模型进行设计的,因此它并不需要这些复杂的能力。但是如果我们需要区块链技术在其他商业场合进行应用,很多时候就需要这些能力。比如我们利用以太坊平台来实现某个业务,那么整个流程是这样子的:

The transactions in Bitcoin are in a script language defined by the bottom platform of the Bitcoin block chain, and since the Bitcoin block chain system was originally designed on the basis of a digital currency model, it does not need these complex capabilities. But if we need block chain technology to be applied in other business settings, they are often needed. For example, we use the Etheraya platform to achieve a business, the whole process is like this:

区块链研习 | 区块链里所说的“智能合约”是什么?

目前,关于智能合约的争议仍然是很多的。主要包含两方面:

There are still a lot of disputes about smart contracts. There are two main aspects:

1、合同本身是否是双方真实意思的表达

1. Whether the contract itself is an expression of the true intentions of the parties

a)在现实世界中,我们撰写的合同除了受合同细节的约束外,还受到了外部法律和行业惯例的约束。而在智能合约中,外部法律和行业惯例如果不能严格的体现在合同中,那么合同就不是双方真实意思的表达了。

(a) In the real world, we write contracts that, in addition to being bound by the details of the contract, are bound by external law and industry practice. In smart contracts, when external law and industry practice are not strictly reflected in the contract, the contract is not an expression of the true intentions of both parties.

b)在现实世界中,我们撰写的合同通常是由律师或者法律专家来帮我们完成的。不同水平的法律专家,其完成的合同严谨程度是不一样的。同样在智能合约中,我们撰写的合同是由程序员帮我们完成的,程序员的水平决定了合同的严谨性。还有一点,程序通常都会有bug,这些bug是否会导致严重的损失,然而在bug没有被发现之前,都不得而知。

(b) In the real world, we usually write contracts that lawyers or legal experts help us to do. Different levels of legal experts do so with different degrees of rigour. In the same way, in smart contracts, we write contracts that programmers help us to do, and the level of programmers determines the rigour of the contracts. Also, procedures usually have bugs, and whether bugs cause serious damage, which is not known until bugs are discovered.

2、合同的仲裁机构是谁

2. Who is the arbitration body for the contract

a)在现实世界中,我们通常都会在合同中约定一旦发生纠纷,请哪个仲裁机构对合同进行仲裁。而在区块链中,尤其是公有链平台上的智能合约,一旦我们认为合同没有表达双方真实的意思,我们无法找到一个仲裁机构对合同进行仲裁。

(a) In the real world, we usually agree in our contracts that, in the event of a dispute, an arbitral institution should be called upon to arbitrate the contract. In the chain of blocks, especially the smart contract on a public-chain platform, once we believe that the contract does not express the true intentions of the parties, we cannot find an arbitration body to arbitrate the contract.

b) 在联盟链中,由于各方各个节点的身份都是已知的,现实世界中的司法机构是可以介入智能合约纠纷的。但是这种介入有时候可能会影响整个联盟链系统的稳定性,这种情况下,怎样介入是一个技术问题,而这个技术问题又可能会带来新的bug。

b) & nbsp; in the chain of alliances, judicial institutions in the real world can intervene in intellectual contract disputes because the identities of the various nodes are known. But such involvement may sometimes affect the stability of the entire chain of alliances, in which case the question of how to intervene is a technical one that may lead to new bugs.

区块链研习 | 区块链里所说的“智能合约”是什么?

雷峰网特约稿件,未经授权禁止转载。详情见转载须知

For further information, please see

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
热门文章
  • 以太坊区块链浏览器的搭建

    以太坊区块链浏览器的搭建
    环境;Ubuntu 首先需要下载git 参考链接:?http://www.360bchain.com/article/156.html??Environment; Ubuntu first needs to download git reference link: ˂a rel="noformlow" href="http://www.360bchai.com/article/156.html"? http://www.360bchai.com/article/156.htm...
  • 百度元宇宙希壤app官方下载

    百度元宇宙希壤app官方下载
    希壤元宇宙是一款非常好玩的休闲手游,这款游戏采用了元宇宙的游戏概念,超级自由的游戏玩法,在这里没有什么标准限定,你可以自由的在这里进行着一切你想做的事情,游戏比较的休闲和放松,没有什么操作难度,感兴趣的小伙伴们可以来007游戏网下载这款非常有趣的希壤元宇宙吧!˂a href=http://m.yx007.com/key/xxsy" target="_blank" , a game that uses the concept of meta-cosm, super-free p...
  • 【CoinCentral 合作內容】加密貨幣 Decred 正式推出 2018 發展路段線圖

    【CoinCentral 合作內容】加密貨幣 Decred 正式推出 2018 發展路段線圖
    早些時候,加密貨幣Decred發表了一篇博客文章,概述了他們2018年的正式發展路線圖。Earlier, encrypt currency Decred published a blog article outlining their official road map for development in 2018.在這個路線圖中,團隊在為他們制定營銷宣傳之前,明確地表明他們於建立和發布可交付物品的成果,同時將他們的營銷集中在項目的核心組成部分。Decred團隊正在研究一些...
  • 跨接在两个网络间的语音记录仪设计

    跨接在两个网络间的语音记录仪设计
      摘  要: 设计了语音记录仪。该语音记录仪桥接在通信设备之间,同时提供3种桥接接口:以太网接口,支持在IP通信方式下的各通话组的直通及录音功能;二线接口,支持模拟二线方式下的直通及录音功能;音频接口,支持模拟音频方式下的直通及录音功能。同时话音记录仪提供FTP服务器,可以通过局域网对语音记录仪保存的语音文件进行下载和管理。此外,该设备支持语音回放功能。 extracts & nbsp; to : The voice record...
  • 元宇宙概念股有哪些 元宇宙概念股一览表

    元宇宙概念股有哪些 元宇宙概念股一览表
    元宇宙概念股排行精选 元宇宙概念股一览表(2022/11/08),下文就随小蔡来简单的了解一下吧。The contours of the meta-cosmology unit are in the list of the meta-cosmological concept units (2022/11/08), so let's get to the bottom of this with Little Choi. 元宇宙概念股龙头有:The contou...
标签列表