在上一篇文章里(读上篇),我们讲到比特币其实是一个所有人共同保存并记账的大账本,里面记录了A给B多少钱,B给C多少钱,什么时间给的,同时通过竞争记账权利的过程制造发行新币,这一体系帮助比特币成为全球共识最广的电子现金。然而,现实生活中一次金钱的转账交易往往比上述情况要复杂的多,仅仅记录这些就足够了吗?当然是不够的,现在,让我们来看看都少了点什么。
缺少了什么信息?
当一笔交易发生的时候,实际上产生了两组信息。
When a transaction took place, two sets of information were actually generated.
1.给钱的人是谁,收钱的人是谁,多少钱,什么时间给的
Who's the payer, who's the payer, how much, what time?
2.钱为什么要给,怎么给,在什么情况下给,什么情况下不给
Why did you give the money? How? Under what circumstances? Under what circumstances?
序号1中的内容,是一笔交易中最基本的信息,也正是比特币写在每个区块当中的账目,有些人觉得这样就足够了对吗?仔细想一想,序号1当中的内容确实十分直观明了,序号2里的内容似乎可有可无。
The content of serial number 1 is the most basic information in a transaction, and it is the account of Bitcoin in each block, which some think is enough. Think about it carefully, the content of serial number 1 is truly straightforward, and the content of serial number 2 seems to be exhaustive.
不然,序号2当中的这些信息,更多的其实是隐藏在交易转账背后的逻辑信息,结合我们的生活来看,即便是最简单的买菜购物,也包含着序号2中的东西,因为我拿到了水果,所以我要给你钱,现金支付,老板说水果不甜不要钱,那回家吃过后如果不好吃,还要去找老板退,即便是这个最简单的交易流程也包含了上述逻辑,只是平时我们不会直观的看到而已。
Otherwise, more of this information in serial number 2, which is hidden behind the transaction transfers, and in our lives, even the simplest shopping, contains what is in serial number 2, because I have the fruit, so I pay you in cash, and the boss says that the fruit is not sweet and the fruit is not for money, and if it is not good, then go back to the boss, even if the simplest course of the transaction contains the same logic, which we do not normally see.
比特币的记账体系中,缺少的正是序号2 中的内容,而我们今天要讲的以太坊,第一次使用智能合约的形式,完善了序号2中的信息。
What is missing from the billing system in Bitcoin is exactly what is in serial number 2, and what we are talking about today is that, for the first time, the information in serial number 2 was refined in the form of a smart contract.
智能合约是什么?
这个概念其实早在94年就被提出了,而始于2014年的以太坊则第一次运用区块链技术,将智能合约变为了现实。而这,也让以太坊一跃成为市值仅次于比特币的第二大数字加密货币。
The idea was put forward as early as 94, and the Etherkom, which started in 2014, used block chain technology for the first time to turn smart contracts into reality. This, in turn, allows Etherpan to leapfrog into the second largest digital encryption currency after Bitcoin.
简单来说,智能合约其实是每笔交易当中附带的相关限制条件,比如钱用来做什么,立刻支付还是在某些情况下才支付,要不要还,有没有抵押等信息。我们在记录一笔转账的时候,会同时附带上这些信息或者触发的条件,一旦条件满足,就会自动执行。
Simply put, a smart contract is a condition attached to each transaction, such as what money is to do, whether it is to be paid immediately or in certain circumstances, whether it is to be paid, whether there is a mortgage or not. When we record a transfer, we attach this information or trigger a condition, which is automatically enforced when the conditions are met.
同时,和普通合约一样,这些智能合约也应该有一个期限,我们使用一种被称之为燃料(Gas)的东西给智能合约供能,在合约执行过预定的次数之后,燃料会耗尽,用这种方式规定合约的有效期同时,也防止了合约因无限次自动执行引起的系统错误。
At the same time, as in the case of ordinary contracts, these smart contracts should have a duration, and we use what is known as fuel (Gas) for intelligent contracts, which run out of fuel after the number of times the contracts have been executed, in such a way as to specify the duration of the contracts and at the same time prevent systemic errors arising from the unlimited automatic implementation of the contracts.
我们能用智能合约干什么?
一般来说,除了涉及极为主观的仲裁环节,现存的各种你能想象到的合约都可以通过智能合约来完成。工资的支付,按照智能合约的有效期定期支付,公司用来发工资的钱有多少,什么时候发,全部都一目了然。借贷的抵押妥善的保存于链上,任何形式的违约都将触发抵押物的偿还,担保人的担保也不再停留在口头承诺上。
In general, with the exception of highly subjective arbitrations, all the contracts that you can imagine can be concluded through smart contracts. Payment of wages, according to the validity of smart contracts, is paid periodically, and the amount of money that the company spends on paying the wages becomes apparent at all times.
通过严谨的代码编写出的智能合约不涉及任何主观情感,一旦条件触发自动完成支付,同时,区块链技术又保证了智能合约的防篡改和去中心化特性,这将会有效的防止毁约,欺诈,隐瞒,赖账,同时极大的提升我们的生活效率。
Smart contracts developed through rigorous codes do not involve any subjective emotion and, once conditions trigger automatic payment, block chain technology guarantees the anti-fouling and decentralizing character of smart contracts, which will effectively prevent the destruction of contracts, fraud, concealment, debt-dealing and, at the same time, greatly improve the efficiency of our lives.
以太坊的新世界愿景
“Code is Law.”这是一句在以太坊合及智能合约信仰者群体中广泛流传的一句话,而现在来看,这话越来越不像是一句空话了。这也是为什么以太坊会提出打造一个透明、公平、效率的新世界愿景,试想一下,与智能合约相比,现行的合约体系是多么原始和可笑的产物。没有数学计算支撑的文字合约当中,包含了多少歧义,诈骗和毁约,执行也是如此无力,简直像是原始人刀耕火种的产物。
“Code is Law.” is a widely circulated phrase in the community of people who believe in etherms and smart contracts, which is now becoming less and less empty. This is why the etherms propose a new vision of a world that is transparent, fair, and efficient, and imagine how primitive and ridiculous the existing contractual system is compared to smart contracts.
可同样不能否认的是,目前的智能合约仍有很多不足,固有的有效边界还会存在很长一段时间,除非这个共识足够大,也许需要大到普及至全世界的每个角落,这个边界才可能被打破,那么透明、公平、效率的新世界大概就从愿景变成现实了吧。
Nor can it be denied that there are many shortcomings in the current intellectual contract and that an inherent effective border will remain for a long time unless the consensus is large enough and may need to reach every corner of the world before it can be broken. A new world of transparency, fairness and efficiency would probably move from a vision to a reality.
但如果真有那么一天,以太坊数量众多的竞争者们也一定不会坐以待毙的吧,NEO,ADA和其他一些加密货币也同样有着其不能忽视的天才之处,以太坊的创新也不能用智能合约一言蔽之,这些我们改日再讲。
But if there is one day when a large number of competitions in Ethio will not wait to die, NEO, ADA and some other encrypted currencies have the same genius that they can't ignore, and the innovation in Ether will not be covered by smart contracts, and we will talk about it another day.
今天先到这里,谢谢大家。
Thank you for coming here today.
如果你也有好的想法,欢迎留言或加群跟币圈小伙伴们深入交流。
If you have a good idea, you're welcome to leave a message or to get in touch with the little guys in the currency.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论