首页 > 波场(TRON) > 正文


EOS技术爱好者 2018-08-21 18:13






  Why Go Full Ricardian - the digital contract

  作者:Ian Grigg



  In thelast post(https://steemit.com/eos/@iang/towards-a-ricardian-constitution)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.


  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。我们使用上述文档的哈希码(“加密消息摘要”),并将其嵌入到所有涉及该合同的事务中。这意味着交易在某种意义上是“透明”的。

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, 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, ABC****4IANG66DOLLAR911911HASH}

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

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

  {Alice, Bob, 10000, ABC****4IANG66DOLLAR911911HASH}


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

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

  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 thelast post(https://steemit.com/eos/@iang/towards-a-ricardian-constitution), 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 bankpromised to pay the bearer 1 pound of sterling silverand 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 mentionedearlier(https://steemit.com/eos/@iang/towards-a-ricardian-constitution)we gain some much-appreciated precision: prose for legals, parameters for variability, and hashes to lock the precision into an accounting system.


  (Soft note - this concept of {prose, params and code} is further explored inSum of all Chains(http://financialcryptography.com/mt/archives/001556.html)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.


  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.


  - 在选择合约时,社区对该合约的主题进行投票,该合约指向精确的文件

  - 区块链上的事务锁定为一个哈希码,因此它们被绑定到正确且有用的文档

  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!

  2. 合约的散文意味着我们可以利用所有优良的法律传统来表达我们期望的协议,并在需要的时候解读和诠释它——这消除了许多不确定性,使我们的业务更加清晰:

  - 请注意,这并没有改变文档原来的创建方式——你可以找律师来起草合约,或者你也可以自己编写

  - 简单朴素的写作是首选,一定要这么做

  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.


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

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

  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.


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

  - No more separate parameter files, no more discoordination

  - No more hard coding!


  - 没有更多单独的参数文件,不会再有不协调的情况

  - 没有更多的硬编码!



  We are EOShenzhen







上一篇:波场一号 行业周报(8.13-8.19)



Copyright © 2013 比特巴手机版