Getting started with Legal Engineering: #1 — OpenLaw.io

Ross Campbell
7 min readNov 13, 2018

--

This Post marks the first of a Series covering legal engineering platforms and tools *for beginners*.

Looking ahead: I hope this Series can be especially useful for attorneys leaning into coding, blockchain applications, “smart” legal agreements, and similar tech developments approaching legal services.

Let’s do this.

1. Create an OpenLaw.io account:

OpenLaw.io describes itself as:

a blockchain-based protocol for the creation and execution of legal agreements. Using OpenLaw, lawyers can more efficiently engage in transactional work and digitally sign and store legal agreements in a highly secure manner, all while leveraging next generation blockchain-based smart contracts.

You can register a free account on OpenLaw.io to start drafting and gain access to community templates. We crib…we do not sow. To skip ahead, you can also upload and put some of your wooly old contracts out to pasture among the OL “library of agreements”.

https://app.openlaw.io/ (for registered users)

For our purposes, we will start from scratch and click “Start a New Template” from the dropdown column. An OL agreement template, among other things, can offer users a starting point for negotiation , and with “markup language” such as “advanced conditionals,” a template may be recycled for a variety of situations and return more value. Smart(er) agreements FTW. For example, in addition to allowing users to populate a draft with intuitive references (do you need a lawyer to add ‘names’ and ‘addresses’ to a market form?), a template NDA can also query users to add clauses and other standard language to their agreement (familiar to consultation?), where selecting “yes” to “Does this involve biotechnology?” instantly revises the definition of “Confidential Information” to reflect “regulatory information, medical reports, clinical data and analysis, reagents, cell lines, biological materials, chemical formulas.” Further below, we will scratch the surface of including smart contract references to disintermediate aspects of performance (buzzy much?) and integrating the same to make agreements walk their talk.

2. Start drafting with OL markup language:

*Whooh* Ok, NOW:

(a) Try placing the following chunk into the empty template “Source” and toggle back-and-forth against the “Draft” view to get a feel for how the OL markup translates into natural language (here, the usual ‘throat-clearing’ contract intro):

This Agreement (this "**Agreement**") is made as of [[Effective Date: Date]], by and between [[PartyA "What's the name of the first party to the agreement?"]] ("**[[PartyA Abbreviation "What do you want to use as an abbreviation for the first party?"]]**"){{PartyAEntity "Is the first party a legal entity?" => [[PartyA Entity Type: Choice("corporation", "limited liability company", "public benefit corporation")]][[#PartyA Entity: PartyA Entity Type "What type of entity is the first party?"]]{{PartyA Entity = "corporation" =>, a [[PartyAStateOfIncorporation "What state is the first party incorporated in?"]][[PartyA Entity]], }}{{PartyA Entity = "limited liability company" =>, a [[PartyAStateOfIncorporation "What state is the first party organized in?"]][[PartyA Entity]], }}{{PartyA Entity = "public benefit corporation" =>, a [[PartyAStateOfIncorporation "What state is the first party incorporated in?"]][[PartyA Entity]], }} }} and [[PartyB "What is the name of the counterparty?"]]{{PartyBEntity "Is the counterparty a legal entity?" => [[PartyB Entity Type: Choice("corporation", "limited liability company", "public benefit corporation")]][[#PartyB Entity: PartyB Entity Type "What type of entity is the counterparty?"]]{{PartyB Entity = "corporation" =>, a [[PartyBStateOfIncorporation "What state is the counterparty incorporated in?"]][[PartyB Entity]], }}{{PartyB Entity = "limited liability company" =>, a [[PartyBStateOfIncorporation "What state is the counterparty organized in?"]][[PartyB Entity]], }}{{PartyB Entity = "public benefit corporation" =>, a [[PartyBStateOfIncorporation "What state is the counterparty incorporated in?"]][[PartyB Entity]]}} }} ("**Counterparty**").

Above should return something like this in people speak when you click “Draft”:

As you can tell, the familiar convention of placing [[ _ ]] around placeholder language is effective to create variables for users to customize to their own agreement needs.

The chunk above also demonstrates more advanced markups, such as how you can add a (i) colon within brackets to limit variable inputs [[x:y]], e.g., [[Effective Date: Date]] generates calendar for user selection, (ii) “question” within brackets to guide user inputs [[x “y?”]], e.g., [[PartyA “What’s the name of the first party to the agreement?”]], and (iii) curly brackets to create conditionals for better customizability {{}}, e.g.:

{{Name of Conditional "Question to Prompt User" =>
Text to include in an agreement if a user selects 'yes'}}

Now, play around with adding clauses to the “Source” view and flesh out your agreement template. When you reach an impasse or the “Draft” view gets borked, check in with the OL markup docs. Don’t be afraid of sketchy results — run as far as you can, draw the owl.

When you are satisfied, you can email a copy of the agreement for comment and e-signature (trackable on Rinkeby testnet through OL website; can also execute via MetaMask to link signature to a personal Ethereum address, more below…).

Closing things up, the following signature block markup will allow you to test out OL’s sign/send function (add at end of template agreement or as standalone test):

[[PartyA Email: Identity | Signature]]
_______________________
[[PartyB Email: Identity | Signature]]
_______________________

Up and over, the OL “Contract Management” page shows the status of your agreement and party signatures, as well as links to public verification on the Rinkeby Testnet:

Check the “From” address to see transactions from OL signature smart contract

Zounds!! You just ran through basic drafting and execution of a customizable template agreement on OL. This shouldn’t have taken more than 10 minutes.

3. Create and reference a smart contract:

Now, to get a little more interesting, let’s try deploying a smart contract and reference this automated business function in a traditional agreement.

Though the use of smart contracts in commercial arrangements is still #HeavilyWIP, utilizing them to escrow funds online for ‘remote purchases’ and issue digital tokens to track contractual rights and obligations lend potential (near-term) applications.

Indeed, smart escrow is one of the primary examples given in the Solidity docs, with helpful elaborations from the dev community. Among other things, referencing smart contracts in agreements, rather than say, the services of a third-party, may help more cheaply and transparently resolve trust issues that otherwise prevent parties from effectively coming to the bargaining table (among other potential drafting/programming ‘value adds’ that attorneys might offer in future).

I will try and keep this coding rigamarole dead simple to generate a reference for an OL template. At the end of the day, if there are chances right now to program party performance and make contracts uber efficient from the get-go, why shouldn’t attorneys tinker? So:

(a) Create a MetaMask account and add extension to browser: think of this as your digital passport and wallet for Web 3.0 applications.

(b) Top up your new MetaMask wallet with sweet sweet testnet Ether:

MetaMask makes it easy to request ‘Ropsten’ testnet Ether. Remember to make sure that your MM wallet is set to ‘Ropsten’ at the top and testnet Ether is displayed.

(c) Copy and paste some Solidity code into a fresh Remix window: select “Start to compile” to reveal the smart contract functions and check issues; source code available here.

Shout out to bitfwdcommunity for their ERC20 code.

Make variations in two key spots to customize your ERC20 token custody, symbol, name, supply and decimals:

Using MM ethereum address for token deployment.

Then, select “Run” from top right and “Deploy” the “TestToken” option to trigger a MetaMask window and “confirm” the contract-creation transaction (a tiny fee of Ether will be paid to host your contract on public blockchain):

Follow the Remix window link (lower right) to see your transaction on Ropsten and follow another link to your new token contract’s address:

In order to show the new ERC20 tokens in your MetaMask wallet, simply copy-paste the contract “address” into the wallet:

Whooh!! Now you have custom tokens to reference in your agreements and can try your hand at drafting around smart contract concepts in OL templates, exploring their usefulness in context, e.g.:

(#roastmyform #roastmycode)

4. *Integrate* a smart contract into an Agreement:

Drafting a “smart” legal agreement is a topic for another day (this author is still very much learning…), but hopefully the above lessons can help attorneys and others curious about legal engineering get started and feel more confident in their tinkering with OL and smart contracts.

For introductions to smart contract integrations on OL, the following demos illustrate more advanced features of this platform (e.g., an offer letter that automatically transfers payments to employee in real time after e-signature):

--

--