Controlling Autonomy: A New Tool to Stop Smart Contracts Once Executed

OpenLaw
ConsenSys Media
Published in
6 min readAug 8, 2018

OpenLaw has developed new tools to halt the execution of smart contracts once deployed, ensuring legal compliance, granting parties more control over their commercial relationships, and solving one of the major technical limitations for blockchains to achieve widespread commercial mainstream adoption.

We’re rapidly entering into an era of smart legal agreements. Blockchains currently serve as a robust asset management layer, keeping track of hundreds of billions of dollars worth of assets from virtual currencies like bitcoin and ether to various tokens. At their core, smart contracts help transfer assets around the globe, making these complex functions as simple as sending an email. With this new capability, we usher in a new era of low friction and low latency commercial activity.

As blockchain technology has matured, we’ve begun to see an increasing range of contractual provisions modelled and managed through smart contract code. Indeed, we’re at the beginning of a longer term trend, where increasingly more aspects of legal agreements will be encoded into smart contract code to manage asset transfers and other performance obligations in a trusted and potentially autonomous manner.

Benefits and Risks

This trend presents a number of benefits and some risks. Because of a blockchain’s disintermediated nature, no single party controls or can halt the execution of a smart contract on the Ethereum blockchain once triggered. Any encoded performance obligations execute according to the terms and conditions expressly provided for in the underlying code.

On the plus side, due to these characteristics, smart contracts reduce the need for parties to keep track of — and monitor — encoded obligations on an ongoing basis. Using blockchain technology, there is less of a need for parties to repeatedly check and monitor obligations embodied in a smart contract because a blockchain-based network will automatically execute the smart contract’s code.

Of further benefit, because blockchains serve as resilient and tamper-resistant data structures, parties gain assurance that the underlying smart contract code has not, and most likely will not, be changed in the future. The difficulty in altering information stored on a blockchain makes smart contracts robust and ultimately narrows opportunities for parties to engage in opportunistic behavior by modifying the code embodying their arrangement. In other words, blockchains are helping to forge a new era of trusted storage and computing with smart contracts creating new avenues for commercial relationships, potentially facilitating an increasing range of economic activity between untrusting parties.

At the same time, the autonomy of smart contract code creates tangible risks for contracting parties and tensions with existing law. As we learned with TheDAO hack, the Parity Wallet hack, and the second Parity Wallet hack, smart contracts will not always operate as intended, and as parties increasingly rely on blockchain technology, they will go through normal life cycle events like terminating and suspending agreements and going into bankruptcy. In such instances, parties relying on smart contracts will need to have control in order to halt the code of a smart contract from running.

For example, at the heart of the American bankruptcy system is the concept of an “automatic stay” provided by Section 362 of the Bankruptcy Code. Under Section 362, effective immediately upon the commencement of a debtor’s bankruptcy case, the automatic stay prohibits a wide range of actions affecting a debtor’s estate, including barring the transfer of the debtor’s actions via existing contracts. To comply with this law, parties will need to be able to halt a smart contract’s execution.

The Power to Control Smart Contracts

Parties relying on smart contracts will undoubtedly run into disputes or instances where they want to halt or stop the transfer of assets, necessitating tools that grant them the ability to control the autonomy of smart contracts. Visions of alternative dispute resolution systems, automated supply chain systems, organizational governance mechanism all will require one or more parties to exercise control over smart contracts. And, once these controls take root, blockchains will help steward an increasing range of commercial activity.

At OpenLaw, we’ve long been cognizant of these risks and have built the first version of a tool that grants parties the ability to stop the smart contract executions they have triggered via the OpenLaw protocol. Our unique approach and architectures makes it possible for us to solve one of the fundamental limitations for blockchain technology to gain mainstream commercial adoption.

Recurring Interactions with the Blockchain

From the beginning, we’ve offered a mechanism for users to trigger smart contracts to execute after contracting parties reach a mutual agreement.

We’re able to accomplish this feat by first deploying a smart contract of the user’s choice to the blockchain and then embedding the OpenLaw-defined EthereumCall markup tag into their template’s markup on the OpenLaw platform. The EthereumCall tag then lets the user interact with their smart contract code deployed on the Ethereum blockchain.

The following is an example of how we defined an EthereumCall tag for a recent demonstration of how to automate a loan agreement through OpenLaw and the Ethereum blockchain.

[[Loan Creation Call:EthereumCall( contract:”0x27b085eda7b00e755f81f9561bb605a3df753691";interface: . . .;function:”createLoanAgreement”;arguments:Lender Ethereum Address,Borrower Ethereum Address,Interest Rate Basis Points)]]

In the example above, we defined [[Loan Creation Call]] as a smart contract function to be called on the blockchain after the parties reach an agreement. The EthereumCall tag requires the name of the smart contract’s function and arguments from the template to be passed into the function of the smart contract.

But the interaction isn’t limited to a single smart contract call. The same markup tag can also be used to make recurring calls by adding additional parameters, as we do here in this employee offer demonstration where the employee is paid 0.001 ETH every minute:

[[Payroll call:EthereumCall(contract:”0x550af6dccc444a07696d74abc8fef171e13311ea”;interface: . . . ;function:”makePayment”;arguments:Recipient Address,Salary in Wei;startDate:Payment Start Date;repeatEvery:”1 minute”)]]

The extra parameters highlighted above, startDate and repeatEvery, make recurring calls possible. Notice that there is no endDate parameter set, so the recurring calls to the makePayment function are scheduled to go on indefinitely.

However, as we demonstrate below, with our new “stop contract” tool, it’s now possible to halt a smart contract just like the above with the simple click of a button (which facilitates a call to OpenLaw’s API). In the following demonstration, we build on the employee offer and salary payment demonstration to show what we can now do if the employer needs to stop making payments to an employee once the relationship is terminated.

OpenLaw’s demonstration of stopping Smart Contracts

As part of the stop functionality, we needed to prove that the people who signed the contract were the same ones stopping it. To ensure this verification, we used an amended hash for the stop function: the original hash uploaded to the blockchain to memorialize the executed agreement, plus more, to show that it’s been stopped by an appropriate party. The effect of this is that the program is able to read the hashes as essentially saying, “I signed the contract” and then, “I signed the contract and I stopped the contract.”

As described above, circumstances sometimes change and parties relying on smart contracts will invariably need to control some of the autonomy that blockchain technology provides. The world of smart legal contracts is developing rapidly. Join us on our mission to transform legal services and send us a note at hello@openlaw.io. We look forward to sharing more new features with you soon!

https://openlaw.io/

Disclaimer: The views expressed by the author above do not necessarily represent the views of Consensys AG. ConsenSys is a decentralized community withConsenSys Media being a platform for members to freely express their diverse ideas and perspectives. To learn more about ConsenSys and Ethereum, please visit our website.

--

--

OpenLaw
ConsenSys Media

A commercial operating system for blockchains. By @awrigh01 and @bmalaus; a @ConsenSys spoke. https://openlaw.io/