How Will Non-Coders Write Smart Contracts that Have to be Written in Code?

There’s a challenge in the smart contract realm.  Attorneys and other non-coders want to write smart contracts instead of English-language contracts, but how will they be able to write the code in which smart contracts are written?

Easy!  With smart contract editor applications and templates.  These tools will enable non-coders to write smart contracts.

In an earlier post, we discussed why smart contracts should be written in computer code and include the smallest possible amount of English.  Because of those reasons, pasting an English-language contract inside a smart contract is generally a bad idea, even though it would make writing smart contracts easy for non-coders.

In this article, we will discuss two main tools that can enable non-coders to write smart contracts, which need to be written in computer code.  These are Smart Contract Editors and Smart Contract Templates.

We will mostly be focusing on smart contracts with manual negotiation, but keep in mind that there are automatic smart contract negotiation platforms that can help non-coders negotiate.  I will write an article on this topic and update this post with a link.

 

Smart Contract Editors

Several tools will enable non-coders to write smart contracts whose terms are written in computer code:

Just as there are what-you-see-is-what-you-get (“WYSIWYG”) website editors, there will be smart contract editors that will allow non-coders to write smart contracts.  Smart contract editors can allow parties to visually track each others’ modifications to a draft smart contract (as Track Changes operates in Word), in order to enable them to negotiate back-and-forth.  We’ve included an example of a Smart Contract Editor at the end of this article.

 

Smart Contract Templates

Just as there are website templates, there will be smart contract templates for almost any conceivable purpose.  These templates can be provided with English translations, which explain in clear English the terms of the smart contract.  I will include a link here to an upcoming blog post on smart translations.  A layperson can use a contract template as-is or tweak it to suit their particular transaction.

There will be many variations of both Editors and Templates, but the purpose will be the same: Allow non-coders to write smart contracts that need to be written in code.

We’re pretty much done here!

The example below is for a robust smart contract editor.  If you’re interested, please keep reading.  If not, see you next time!

Smart Contract Editor Example

Oh good! You’re still here.

As I mentioned, the following is a walkthrough of a robust smart contract editor that can allow a user to create any conceivable contract as a smart contract.  Multisided platforms that cater to specific use cases (e.g. freelancing) can have simpler built-in smart contract editors because the scope of their smart contracts will be limited.

Below we’ll go through a two-step process where we are filling out two separate forms.  We’ll identify all the relevant fields and their purpose.

 

Step 1 – Create a new smart agreement

Smart agreement.  The user names the smart agreement, which is defined as a set of one or more related smart contracts that are signed simultaneously.  Then, the user decides whether to create their new smart agreement from a premade template or from scratch.

Parties.  The user enters identifying information for all of the parties to the smart agreement.

Assets.  The user enters identifying information for all of the cryptocurrencies or smart assets that may be transacted through the smart agreement.

 

Step 2 – Create a new smart contract

Smart contract.  The user names the smart contract, which is part of the smart agreement that the user set up in the first step.  Then, the user decides whether to create their new smart contract from a premade template or from scratch.

Trigger.  The user selects how the smart contract’s execution will be triggered.

  • “By signing” means that execution will be triggered when the parties all agree to the smart contracts within the smart agreement.
  • “By smart contract” means that the smart contract identified contains a function that will trigger execution.
  • “By manual trigger” means that the party named will manually trigger execution through a web interface.
  • “Upon delay (days)” gives the number of days that execution will be delayed after the trigger event.  For example, if the user selects “By manual trigger” and “Upon delay” of 30 days, then the smart contract will execute 30 days after the named party manually triggered execution.

Variables.  Here, the user defines the contract variables that will appear in the smart contract.  An example of a contract variable is “the percent of a project that was completed.”

  • Name.  The user provides the name by which the variable will be referenced in the smart contract’s terms.
  • Type.  The user selects one of the three possible variable types:
    • User input variable.  This is a variable whose value is determined by a user or a third-party process and is stored on a blockchain.  If this variable type is selected, the user would be prompted to enter either
      • the value of the variable, or
      • the address of the variable’s value.
    • Data feed variable.  This is a variable that inputs a value from an Oracle (a service that feeds publicly available data to the smart contract).  If this variable type is selected, the user would be prompted to select one of the available Oracles and to specify how a particular value would be inputted from the Oracle.
    • Judgment variable.  This is a variable whose value could potentially be disputed by the parties.  Smarter Contract helps resolve judgment variable disputes.  An example of a judgment variable is ‘the percent of a project that was completed’ (“Completion Percentage”).  If this variable type is selected, the user would be prompted to enter several properties related to the judgment variable.  Some of these properties are displayed in the above image and described below:
      • Name.  The name of the judgment variable, for reference purposes.
      • Prompt.  This is the question that would be posed to a third-party expert that would allow them to determine the value of the judgment variable after reviewing evidence.  Files can be attached as part of the prompt. For example, for a software development project, the specifications might be part of the prompt.
      • Variable type.  Not to be confused with the “Type” field above, “Variable Type” specifies the type of data that will be stored in the Judgement Variable.  For example, it can be a counting number, a percentage, or a selected text string from a list of options.
      • Minimum value.  Since “Variable” Type” of “Counting Number” is selected by default, the “Minimum Value” field appears for specification of the smallest allowable value of the judgment variable.
      • Maximum value.  Since “Variable” Type” of “Counting Number” is selected by default, the “Maximum Value” field appears for specification of the largest allowable value of the judgment variable.
      • Areas of expertise.  This is a list of the expertise that an individual must possess in order to be qualified to determine the value of the judgment variable.  An example could be “GAAP accounting.”
  • Terms.  The user will write each term by inserting any of the below elements through a drop-down menu.  What can appear within the terms will be limited (by the drop-down menu) to the below elements. The drop-down menu will appear wherever the user clicks within the ‘Terms’ box.
    • Logic.  Logic includes “if”, “then”, “else”, “and”, “or”, “not”, “greater than (>)”, “less than (<)”, and “equal to (=)”.
    • Variables.  Variables can include the variables specified above on the same page.
    • Outcomes.  When a user inserts an outcome, a “then ( )” will appear, and the user will specify the outcome within the parentheses.  There are three types of outcomes:
      • Transfer.  This will transfer an asset from one party to another.  For this outcome, the user will be required to select
        • an asset,
        • a quantity of that asset (which can be determined by a formula), and
        • the party receiving that asset.
      • Execute.  This will trigger the execution of another smart contract.  For this outcome, the user will be required to specify the smart contract to be executed.
      • Judgment.  This will trigger production of a document by the smart contract that will specify a judgment that must be enforced by a traditional court, along with instructions for causing the court to enforce the judgment.  The reason for this outcome type is that there are certain outcomes that a smart contract will be unable to enforce. One such example is an injunction.

If this all seems complicated, keep in mind that this still requires some training. It would be similar to how you learned to use Microsoft Excel. Might have been overwhelming at first, but when you wrote your first if(then) formula, you started to get more confident and did a vlookup just for kicks.

%d bloggers like this: