【翻译|Ian】为什么要最大化李嘉图合约范围?

in #ian6 years ago

版权声明:

以下内容来自微信公共帐号“EOS技术爱好者”,搜索“EOSTechLover”即可订阅,翻译Gavin,校对Lochaiching。转载必须保留以上声明。仅授权原文转载。

本文原文链接 https://busy.org/@iang/why-go-full-ricardian-the-digital-contract ,由本号“EOS技术爱好者”翻译。

"EOS技术爱好者"全程由EOShenzhen运营,喜欢我们请为我们投票(EOShenzhen的投票账号:eoshenzhenio)!


Why Go Full Ricardian - the digital contract

作者:Ian Grigg

翻译:Gavin

校对:Lochaiching

In the last post I outlined what it took to create a document that was both human readable and machine readable, good enough for a legal contract, and also good enough to support an accounting model like cryptocurrency. Now that we have that contract that both the computer and the human can read, and agree upon, it remains to communicate it.

在上一篇文章中,我概述了创建一个人类可读和机器可读的文档,对于法律合约来说已经是足够好的存在了,而且还足以支持加密货币这样的会计模型。 既然我们已经拥有计算机和人类都可读,并能达成一致意见的合约,那么接下来要做的就是将它传达出去。

Most prose contracts are written, emailed, argued about & redlined & mangled, eventually to be signed and then confined to the bottom of a drawer. To be forgotten, which is perhaps an odd way to treat something so central to the nature of business and agreement.
WechatIMG264.png
大多数散文合约都是书面形式,通过电子邮件发送、争论和修改,最终签署,然后定稿放在抽屉的底部。真可能被遗忘,这也许是一种不恰当的方式来处理商业业务和协议的核心。

Not so a digital contract! As we have injected into the contract the key parameters that make this contract special, we can now actually use the contract in a transactional way: to communicate what a payment, trade or other transaction is.

这不是一个数字合同!由于我们已经在合约中注入了使这个合约变得特别的关键参数,那么我们现在就可以以交易的方式实际使用合约:来传达支付、交易或其他交易的信息。

To do this we have to use a hashing trick from cryptography. We take the hash (“cryptographic message digest”) of the above document and embed it in all the transactions that refer to that contract. This means that the transactions ‘know’ about the contract in some sense.

要做到这一点,我们必须使用密码学的hashing trick。我们使用上述文档的哈希码(“加密消息摘要”),并将其嵌入到所有涉及该合同的事务中。这意味着交易在某种意义上是“透明”的。
ian最大化2.png
Hashing trick注释(校对者注), 来源http://sofasofa.io/

For example, if the transaction were a payment from Alice to Bob of say dollars, then the contract would describe the dollars. To see how this works, consider this payment where Alice pays Bob:

{Alice, Bob, 100, dollars}

例如,如果交易是从Alice到Bob的使用美元来付款,那么合约将描述美元。要了解其工作原理,请考虑Alice向Bob支付的款项:

{Alice, Bob, 100, dollars}

This record might maybe describe a transaction in some contexts, but it isn’t really good enough in a complicated, global world - I might send you Hong Kong dollars, and you might be expecting Singapore dollars. Oops! Also, that number that’s in the record - is that 100 referring to 100 dollars or 1.00 dollars being 100 cents or a 100 satoshi-dollars which might be about 0.000001 dollars each?

这条记录可能会在某些情况下描述一个交易,但在一个复杂的全球化世界中它并不够好——我可能会寄给你港元,而你可能会期待我会给你寄新加坡币。对了! 此外,记录中的那个数字 - 100指的是100美元,或者等值于1美元的100美分,或者100聪美元,每聪美元可能只等价于0.000001美元?

The computer can’t really tell, and if the computer, as your digital angel, can’t know then you can’t know. Oh, yes, databases and all that but they are just honeytraps for insider frauds and viruses and other horrors. If databases could do payments for everyone, blockchain wouldn’t have been invented.

计算机无法分辨出来,如果计算机,作为你的数字天使,它无法知道那么你就无法知道。哦,是的,数据库和所有这些,但它们只是对于内部诈骗、病毒和其他恐怖的蜜罐。如果数据库能够为每个人完成支付操作,那么区块链就不会被发明出来了。

Let’s now see how we do this in a Ricardian fashion. I pay you:

{Alice, Bob, 10000, ABC1234IANG66DOLLAR911911HASH}

is actually less intelligible than the above. Which is an advantage because now your client software has to fix its and your information misery.

现在让我们看看我们如何以李嘉图的方式做到这一点。 我付钱给你:

{Alice, Bob, 10000, ABC1234IANG66DOLLAR911911HASH} 

实际上比上面的要更加不容易理解。这是一个优势,因为现在你的客户端软件必须处理它和你的信息问题。

What happens is this. Your client software, your digital angel, has to take that horrible hash thing ABC1234IANG66DOLLAR911911HASH and go look up a document that matches the hash.

事情是这样的。你的客户端软件,你的数字天使,必须读取那个的哈希值ABC1234IANG66DOLLAR911911HASH, 并去查找一个匹配哈希值的文档。

Because it’s a hash, there is only one document, and that document self-proves itself as being the document of the hash - take that, you insider scummers! And, assuming that the document is a contract as described in the last post, then we have some simple parameters that can be extracted out of it. With these parameters being easily recoverable using our above markup and parameter techniques, your digital angel can now tell you:

Bob, you’ve been paid $100.00 in IangBux by Alice. We know this currency and we liked it before. This takes your balance to $120.00 and your savings plan is on track!

因为它是一个哈希值,所以只有一个文档与其对应,并且该文档可以自我证明它是哈希值所匹配的文档——有了这个,你就是知道这个内幕的人! 并且,假设文档是上一篇文章中描述的合约,那么我们可以从中提取一些简单的参数。 使用我们上述的标记和参数技术可以轻松恢复这些参数,你的数字天使现在可以告诉你:

Bob,你已经在IangBux收到Alice支付的100美元了。 我们知道这种货币,我们之前喜欢它。 你的余额将提高到120.00美元,你的储蓄计划正在按计划进行!

All the context of the contract is now at the hands of the client software, instantly and without confusion.

合同的所有上下文现在都在客户端软件的手中,具有即时性并且有序。

Why the contract needs to be digitised

为什么合约需要数字化

This becomes much clearer in any large scale world. An ISDA Swaps contract can run to 300 pages long, and can fill drawers and consume hours of time - digitisation allows those drawers to be emptied, but also gives us instant and permanent access to everything in the contract of repetitive value! Permanency is a big win too - if you know anyone who is older than 70, ask them what the contract of their favourite currency was - chances are they will talk wistfully about the gold window and how the bank promised to pay the bearer 1 pound of sterling silver and other such other stories. Unfortunately for the Bank of England and the Federal Reserve, they didn’t have cryptography available to them in those days, and couldn’t lock their contracts down with hashes. Inevitably, without such discipline, the contract slipped away, and we’re left with legend.

在任何大规模的世界中,这都变得更加清晰。 ISDA Swaps合约可以长达300页,可以填充抽屉并消耗数小时的时间——数字化可以清空这些抽屉的存在,同时也让我们能够在重复价值的合约中获取即时和永久的使用权! 永久性也是一个巨大的胜利——如果你认识一个年龄超过70岁的人,问问他们最喜欢的货币合约是什么,他们有可能会对以前美元兑换金子的窗口充满渴望之情,以及银行承诺向持票人支付1英镑标准的纯银和其他此类故事。不幸的是,对于英格兰银行和美联储来说,他们当时没有可用的密码学技术,也无法用哈希相关技术来锁定他们的合约。不可避免地,如果没有这样的学科,合约就会慢慢失效消失掉,只给我们会留下一段传奇。

What is the contract today for the US dollar? If it was in Ricardian form, you would know, precisely. As it is not, the “contract” is little more than a marketing slogan that is changed as and when the Federal Reserve needs another brand makeover.

今天的美元合同是什么?如果按照李嘉图形式,你就会准确地知道。事实并非如此,“合约”不过是一个营销口号,当美联储需要另一个品牌改造时,它就会改变。

Brands are useful, and the state can get away with just the one brand. But in the open contractual space of blockchain, we need contractual certainty for digital issuances, not least because there are so many issuances - ERC-20s! ICOs! and those are the polite terms - that these days it is hard to tell what any of them mean. And by using the approach mentioned earlier we gain some much-appreciated precision: prose for legals, parameters for variability, and hashes to lock the precision into an accounting system.

品牌是有用的,国家可以只使用一个品牌。但在区块链的开放合同空间中,我们需要追求数字发行的合约的确定性,因为有太多的发行-ERC-20和ICO了!这些都是礼貌用语——这么短时间很难说清楚它们的含义。通过使用前面提到的方法,我们获得了一些非常容易接受的精度值:法律的散文,可变的参数,以及将精度锁定到会计系统中的哈希值。

ian最大化3.png
(Soft note - this concept of {prose, params and code} is further explored in Sum of all Chains but it's too much for one post.)

稍微注意——{散文、参数和代码}的概念进一步探讨[所有链] (http://financialcryptography.com/mt/archives/001556.html),但是它对于一个帖子的内容来说实在是太多了。

The Ricardian Constitution

李嘉图合约

If the contract were a constitution for a chain, this would bring the benefit that the blockchain’s code could extract the parameters directly. A chain could follow its inflation rate, simply by reading what the users had agreed in the constitution. Then the code would follow suit by looking up the constitution and extracting out the number directly - no more hard coding, no more duplication, no more cumbersome alignment of code with prose.

如果合约是一种链的结构,那么区块链的代码就可以直接提取出这些参数。只需阅读用户在合约中达成的协议,这个链就可以跟随其增发率发生变化。 然后代码将通过查阅合约并直接提取数字来跟进——不再需要硬编码,不再需要重复,不再需要根据散文进行繁琐的代码调整。

The hash of the Constitution could also appear in key instructions and would therefore signify - by custom - that the initiator of that transactio**** **** ****greeing to the constitution. For example, if the CREATE-NEW-ACCOUNT instruction included the hash, this enters that account to the Constitution, which in turn defines the Community: all who have accounts are all under the same Constitution and are all in the Community.

合约的哈希值也可能出现在关键指令中,因此,根据惯例,该交易的发起者默认为已经同意合约内容。例如,如果CREATE-NEW-ACCOUNT指令包含了哈希值,那么该账户被添加到合约中中,而合约又定义了社区:所有拥有账户的人都在同一个合约下,并且都在社区中。

In sum, using the Ricardian form brings specific advantages to a community blockchain:

总而言之,使用李嘉图形式为社区区块链带来了特定的优势:

1.The hash mechanism means it is impossible to be uncertain about which document we are talking about, which removes large areas of confusion:

  • In selecting its constitution, the community votes over a hash of that constitution, which points to the precise document
  • The transactions on the blockchain lock into a hash, so they are bound to the correct and useful document.

1、哈希机制意味着我们不可能不确定我们正在讨论哪个文档,从而消除了大量的混淆:

  • 在选择合约时,社区对该合约的主题进行投票,该合约指向精确的文件
  • 区块链上的事务锁定为一个哈希码,因此它们被绑定到正确且有用的文档

2.The prose of the contract means that we can use all the fine tradition of law to express our desired agreement, and to explain and interpret it when needed - which removes a lot of uncertainties and makes our business that much clearer.

  • Note that this doesn’t change the way the document is created - you can use lawyers to draft your contract, or you can write it yourself.
  • Plain writing is preferred however it is done!
  1. 合约的散文意味着我们可以利用所有优良的法律传统来表达我们期望的协议,并在需要的时候解读和诠释它——这消除了许多不确定性,使我们的业务更加清晰:
  • 请注意,这并没有改变文档原来的创建方式——你可以找律师来起草合约,或者你也可以自己编写
  • 简单朴素的写作是首选,一定要这么做

3.The parameters mean we can not only demarcate key points for the reader, we can communicate them to the computer too.

  • The name, initial quantity & inflation are now parameters within our contract, which makes it easy to colour them for effect for the human reader, and feed them into the program for the computer ‘reader’.
  • The display parameters allow the program to handle symbols and decimals of all forms.

3、参数意味着我们不仅可以为读者划分关键点,我们还可以将它们传达给计算机。

  • 名称,初始量和增发率是在我们当前合约中的参数,这使得它们很方便为读者设置颜色,并将他们输入到计算机“读者”的程序中。

  • 显示允许程序处理所有表格的符号和小数的参数。

4.It is now relatively easy for alternative chains to build a different business proposition. The parameters signpost what they have to change when starting up their chain.

4、通过替代链来构建不同的业务主张变得相对简单。这些参数在启动它们的链时,会标记出它们必须需要改变的东西。

5.There’s only one document which is the source of truth

  • No more separate parameter files, no more discoordination
  • No more hard coding!

5、只有一份文档是真正的源文件

  • 没有更多单独的参数文件,不会再有不协调的情况
  • 没有更多的硬编码!

本文图片来源于英文原文


了解更多关于EOShenzhen:

We are EOShenzhen

不同入口如何投票:
imToken
火币
portal

关于我们更多联系:
Website:https://eoshenzhen.io

Steem:https://steemit.com/@eoshenzhen

Busy:https://busy.org/@eoshenzhen

Telegram:https://t.me/eoshenzhen

Twitter:https://twitter.com/eostechlover

简书:EOS技术爱好者

新浪微博:EOSTechLover


EOShenzhen的投票账号:eoshenzhenio
100x100-IMG_7963_small.png