{"id":29412,"date":"2017-01-14T00:00:00","date_gmt":"2017-01-13T11:00:00","guid":{"rendered":"https:\/\/bravenewcoin.com\/insights\/upgrading-smart-contracts-to-wise-contracts\/"},"modified":"2023-11-27T19:29:27","modified_gmt":"2023-11-27T06:29:27","slug":"upgrading-smart-contracts-to-wise-contracts","status":"publish","type":"post","link":"https:\/\/bravenewcoin.com\/insights\/upgrading-smart-contracts-to-wise-contracts","title":{"rendered":"Upgrading ‘Smart Contracts’ to ‘Wise Contracts’"},"content":{"rendered":"
\u201cSmart contracts\u201d is a phrase which is often difficult to define<\/a>. Let me help: a \u201csmart contract\u201d is a contract which enforces itself! Nick Szabo gave the example of a vending machine. You insert the money, and the machine lets you take back either [1] your money, or [2] some merchandise.<\/p>\n Szabo\u2019s vending machine is not quite as \u201csmart\u201d as it could be \u2013according to our \u201cself-executing\u201d definition\u2013 because someone can steal the items (by smashing the glass or tipping the machine over), or disable the machine (by unplugging it). Ultimately, there\u2019s \u201cdumbness\u201d to the contract, because it (the machine) doesn\u2019t completely<\/em> execute itself. The machine relies on the building for power, on courts\/police for protection, and on other individuals to maintain it, stock it, and collect money from it, and so forth.<\/p>\n In contrast, cryptography allows one to construct rules which are literally unbreakable<\/em>.<\/p>\n It is really quite extraordinary: one human \u201cmaking\u201d something that no human can \u201cunmake\u201d.<\/p>\n Originally, crypto could only protect files (by putting them in metaphorical safes or envelopes). But it later progressed to digital identities, and ultimately, payments (ie Bitcoin). Since Bitcoin is peer-to-peer, it is itself<\/em> a smart contract, in the sense that, if you turn it on, no one else<\/em> can turn it off<\/a>. A single peer can regenerate (or even maintain) the entire network.<\/p>\n As a result, the post-Bitcoin era is one where Szabo\u2019s vending machine can be much more powerful. The physical \u201cmachine\u201d is unbreakable \u2013the glass cannot even be scratched, if all the world\u2019s armies were to turn and fire at once\u2013, the machine cannot be cheated or deprogrammed, it will always operate with perfect reliability all the time, and it cannot be unplugged (because the customers power it, by pressing the buttons).<\/p>\n These include:<\/p>\n Smart contracts have a number of advantages. The first is that they are written in computer code, which makes them 100% unambiguous. No \u2018interpretation\u2019 is required; no subjectivity. Legal and Economic theory are clear: enforcement ambiguity = bad for commerce.<\/p>\n A second huge advantage is that smart contracts are entirely self-contained. All of the \u2018evidence\u2019 of fulfillment is cryptographic. There is absolutely no need for a \u2018fact-finder\u2019 such as mediator, judge, or jury. Courts are very slow and deliberate (for good reason), but smart contracts can be resolved at the speed of the CPU \u2013 thousands per second. And as the tech improves, smart contracts get even faster.<\/p>\n Of course, there is a trade-off: being software code, smart contracts are very hard to write<\/a>, and their influence is limited to cyberspace<\/a>.<\/p>\n But in general this is fantastic \u2013 an unambiguous contract, where you can get the ruling you deserve, inside of a single minute, at zero marginal cost.<\/p>\n The traditional contracting system is, of course, quite expensive. A paper contract requires courts, to interpret contracts and resolve disputes. These courts, in turn, require baliffs and policemen, if their orders are to be enforced anywhere. This public-service monopoly-on-violence implies membership fees of some kind (ie, taxes), collective-action (ie, \u201cgovernment\u201d), and preference-aggregation (ie, democracy, monarchy, etc). In any society of reasonable size, this in turn implies representation, specialization, legislature, politicians, and all the rest. At larger scales, significant corruption is inevitable. If any of the violence-monopolies disagree with each other<\/em>, there will be wars!<\/p>\n That\u2019s a lot of overhead! And SC-users must still pay their \u2018real\u2019 taxes, of course. Just as they must tolerate \u2018real\u2019 wars (and just as they make use of paper contracts themselves). Nonetheless, you see the appeal of moving in the digital direction.<\/p>\n \u201cSmart\u201d and \u201ccooperative\u201d. Necessary because one smart contract can \u201cdumb\u201d another one down.<\/p>\n Wise Contracts are two things. Firstly, they are \u201csmart\u201d; they execute themselves.<\/p>\n Secondly, they are also cooperative<\/strong>, they don\u2019t attack each other.<\/p>\n Cooperation is important because, smart contracts can attack each other, thereby \u2018dumbing\u2019 each other down and preventing themselves from executing at all (let alone automatically). Often, these harmful, non-cooperative interactions are profitable for attackers.<\/p>\n Two examples I gave last summer were:<\/p>\n These examples might be hard to understand. Instead, an analogy might be helpful: imagine a corporation, where anyone can work. The CEO can\u2019t fire anyone, no matter how unproductive, or outright disruptive they are.<\/p>\n For example,<\/p>\n Biologically, it is comparable to an organism which does not have an immune system. Since it is \u201cpermission-less\u201d, it \u201callows\u201d qualities to emerge which contradict the qualities of the underlying organism. This (infection, cancer) results in the death of the organism (and everything in it).<\/p>\n The result of this, is that the addition of some contracts can subtract the effects of others. As if King Trident could invalidate Ursala\u2019s contract, just by writing one of his own. Or as if a brand new vending machine could somehow cause an older vending machine to no longer work<\/strong>.<\/p>\n <\/p>\n Since the entire point of a contract, is that the signers expect it to be enforced, this \u201cdumbness\u201d phenomenon ruins the who \u2018smart contracts\u2019 idea.<\/p>\n We need a way to prevent smart contracts from \u201cdumbing\u201d each other down.<\/p>\n Sidechains provide most of the solution, as sidechains are firewalled from each other. Sidechains filter out messages that don\u2019t belong to their chain, while sharing the same value-token and economic network. In this way, we can add or subtract chains as we like, allowing new messages (ie, new \u2018smart contracts\u2019).<\/p>\n But the technical firewall does not necessarily prohibit harmful interactions<\/em> among chains, at the \u201cmacro-chain\u201d level.<\/p>\n To upgrade our firewall, we rely on a simple capitalist principle: uniting \u2018ownership\u2019 and \u2018control\u2019. Bitcoin-miners \u2018control\u2019 which sidechains are added (and can remove them), and these same agents \u2018own\u2019 the chains and enjoy the benefits (or costs) of maintaining them.<\/p>\n This is accomplished, in Drivechain, by requiring withdrawal-proofs to use the \u2018parent\u2019 mainchain\u2019s PoW, instead of the sidechain\u2019s PoW. In this way, mainchain miners always get the last word \u2013 on everything that affects their<\/em> token (even if the sidechain uses a different PoW algorithm, or PoS, etc).<\/p>\n Above: a slide from my presentation series<\/a><\/p>\n We can safely assume that miners will try to maximize the purchasing power of their total block reward across all chains. Most obviously, miners would do this to earn more money. In addition, as time passes, miners who do not<\/em> engage in this maximization strategy will tend to go out of business. Eventually, the miner\u2019s \u201cmaximum\u201d revenue will be also be \u201cexactly as much money as we need, in order to stay in business\u201d. At which point miners will have no choice but to consistently maximize from this point out.<\/p>\n In addition, it is probable that miners will be able to maximize in this way, for free (ie, without actually doing anything). An implicit threat of miner-action is sufficient. This is because smart contracts are difficult to create \u2013 the developer must move first, investing tremendous time and effort in writing the software code. The miners can move later, at minimal effort, to block the contract if it misbehaves.<\/p>\n If we use a tripartite analogy (where miners are police, developers are legislators, and nodes are the judiciary), then the \u201csidechains\u201d concept would be comparable to a world where citizens are free to opt-in to a new set of laws. The concept of merged-mining (ie, placing the same miners in charge of enforcing both sets of protocol rules), is akin to placing the same police officers in charge of enforcing all of these laws. It is difficult for me to believe how it could be any other way \u2013 if the laws were enforced by a different \u2018competing\u2019 group of police offers, how would we resolve any disputes between the two groups? This seems, to me, to be reintroducing the very \u201cwars\u201d<\/a> and other \u2018expensive competition\u2019 that we originally wanted to replace!<\/p>\n Finally, this idea here, of \u2018wise\u2019 contracts, is akin to allowing the police to refuse to enforce some \u201cnew laws\u201d if these contradict \u201cold laws\u201d. Again, it is hard for me to see how anything else could be practical. Our miner police-force already<\/em> charges us fees-for-service, and we don\u2019t expect miners to process transactions which neglect to pay a sufficient fee. So, why would we expect miners to enforce laws which have a net negative fee<\/em> (ie that, by collecting some positive fee-amount, their total fee-revenues nonetheless decrease)?<\/p>\nCryptography: Very Very Smart<\/h3>\n
Examples of Cryptographic Smart Contracts<\/h3>\n
\n
Value of Smart Contracts<\/h3>\n
Wise Contracts<\/h3>\n
\n
\n
Enforcing Cooperation<\/h3>\n
Motivation and Equilibrium<\/h3>\n