Smart Contracts: can we express contracts in code?

Eliza Mik
6 min readMar 21, 2021

…or: Eliza sells lambo to Azmina who sells it to Agi = everyone’s happy…

This is what an incredibly competent but evil legal intermediary looks like…

Problems concerning the enforceability of “smart contracts” usually boil down to one question:

“can contracts be expressed in code?”

Yes. They can.

Contract law is totally indifferent as to the manner in which parties express their agreement. We can express our contracts however we want. In smoke signals and in Morse code, in English or in Arabic, in spoken or written words. In practice, we usually form contracts by conduct. We buy burgers and laptops by walking into a shop and exchanging money for goods — not by signing lengthy documents. Subject to some statutory exceptions, which usually concern real estate transactions and consumer guarantees, contract law does not prescribe the form in which agreements should be made or — if we want to be more academic about it — the manner of manifesting intention. We put some agreements in writing not because we have to but because we want to — to be able to prove that someone promised to do something. The more complex the transaction or the more money is at stake, higher the likelihood of putting it in writing. We want to have evidence.

By the way: it is total nonsense that contracts must be notarised. This is an absolute exception (concerns property transfers in some jurisdictions)…

In sum: 99.99% of the contracts we enter into require zero formalities and are concluded by conduct. No notaries or evil lawyers are — or need to be — involved…

The ongoing debate concerning the enforceability of “smart contracts” (which are, by definition, expressed in code) stems from the failure to distinguish between the substance of the contract, i.e. the rights and obligations agreed by the parties, and its expression, i.e. the document containing the words describing such rights and obligations. On one hand we have the abstract agreement (in the legal sense), on the other — the written document (in the physical sense). The words on the paper document only provide evidence of the agreement…

Even if the document is destroyed, the agreement persists. Tearing up your lease agreement or your mortgage documents will not help you to avoid the next payment.

To complicate matters, some misunderstandings regarding the questions “is code enforceable” or “can contracts be expressed in code” stem from a popular colloquialism: even lawyers say that “courts enforce contracts.” That’s just a mental shortcut we make because (unless we are billing you in 6 minute increments) we often use abbreviated legal lingo to save our time.

Technically, courts do not enforce contracts but individual contractual obligations. Cutting a long story short, courts enforce the contract by ordering the contract breaker to pay damages for the loss caused by non-performance (or non-conforming performance, aka: breach) or, in exceptional circumstances, by ordering the actual performance of specific contractual obligations (this is super-rare, it’s called “specific performance”).

The contract as a whole is not enforced. After all, many of its clauses do not describe any obligations and are of an administrative nature. Moreover, when lawyers say that “the court enforces a clause or term in a contract” we mean that the court enforces the obligation described in such clause or term. The problem: often one obligation is described in multiple clauses…

In sum: as obligations are expressed in words, asking “is code is enforceable?” is like asking “are words enforceable?” Enforceability concerns obligations, not words or documents. And — as indicated above — we can express our obligations in whatever form we want.

But….

Contracts in Arabic

You will ask: can agreements be expressed in code, if the parties do not understand them?

Yes.

Totally counterintuitive but true. Unless, of course, we are talking about a regulated consumer transaction where some statute prescribes that certain contracts must be in a certain form etc. But, technically, this is not contract law issue but relates to consumer or investor protection (and that’s a different story altogether)…

Let’s get back to pure contract law.

Expressing a contract in code is like expressing a contract in a foreign language. To illustrate: Eliza agrees to sell her classy pink lambo to Azmina for GBP 10000. Although both ladies speak English (and the contract has been formed in London and is governed by the laws of England and Wales), they want the document to be written in Arabic. They choose Arabic because, coincidentally, both adore Amr Diab and have fond memories of partying in Cairo in the late 00’s.

Assuming that:

a) both Eliza and Azmina have contractual capacity,

b) there are no vitiating factors (such as mistake or mental incapacity or being extremely drunk)

c) the subject matter is legal (Lambos are legal — and so are British Pounds!)

the contract expressed in Arabic (“Arabic contract”) is legally enforceable.

By a Court in England. Not in Egypt. Really. This means that if/when there is a problem with the contract, either of them can go to an English judge and file a claim.

Let’s consider two variations:

(a) Azmina and Eliza first create an English version of the contract and agree to translate it into Arabic. They also agree that the Arabic version shall prevail and that, in case of any discrepancies, the English version is disregarded. As neither party understands Arabic, they are at the mercy of the translator and can never be 100% certain what is actually says. Good luck, habibi.

(b) Azmina and Eliza instruct an Egyptian lawyer, Ahmed, to express their agreement in Arabic from the outset. There is no original document written in English — only verbal instructions. It may not make a difference whether the instructions are verbal or in writing. The point is that there is no contract in English that is translated into Arabic. The only version is in Arabic. Again, the parties must trust whoever created such contract. (They kind-of trust Ahmed because he used to represent Amr Diab, long story.)

In both instances, the contract is enforceable because in theory the language of expression is irrelevant. Azmina and Eliza have agreed on the “Arabic contract” to govern their transaction and have assumed the accompanying risks. That’s it.

The contents of the “Arabic contract” (and the accompanying difficulties of translation) become relevant in the event of a dispute, e.g. “That’s not a Lambo! It’s a Fiat!” or “Ayaaaa! This Lambo sooo slow/old/ugly!”

Of course, in practice the usual problems of interpretation are aggravated by having to establish the meaning of individual words or clauses in the Arabic version and by potential disputes concerning the correctness of the translation. In principle, however, once the contract is translated from Arabic into English, the usual standards of interpretation apply. The difference between situation (a) and (b) lies in the difficulty of determining the substance of the agreement, e.g. when is payment due, how fast should the Lambo go, etc. I could mercilessly expand this paragraph by describing all the procedural & evidentiary challenges the parties may face in court, but — the point is that from a legal perspective the contract is enforceable — but the language creates problems of evidence…

When we replace Arabic with code, the futility of the “smart contract” debate becomes apparent. ( I hope!) The source of the parties’ respective obligations is the agreement — not words or documents.

To repeat: contract law does not care about the manner of expressing agreement. The contractual document provides evidence of the parties’ rights and obligations — but it does not create them!!! Of course, the manner of expression affects the difficulty of establishing what has been agreed.

This a problem of proof, not enforceability.

I like comparing code to a foreign language because in both instances, the parties do not understand the final expression of their agreement and must trust third parties to ensure that the expression matches the substance of what was agreed. The difference between the “Arabic contract” and a contract written in code is that the latter can be directly executed by computers. Computers really cannot understand and follow instructions written in a natural language. Especially not in Arabic, habibi.

Also note that Azmina and Eliza become totally dependent on third parties. In the case of the “Arabic contract” they are at the mercy of the translator and the Egyptian lawyer, Ahmed. In the case of “smart contracts”… Well, assuming the parties do not know how to code they become totally dependent on coders.

And there goes disintermediation… It is surprising that smart contract enthusiasts fail to observe that we are replacing one type of intermediary, the evil lawyer, with another. The coder… May I assume that every coder is competent and trustworthy AND carries professional liability insurance?

But we have only cleared some ground… what happens when contracts are actually expressed in code?

For the academic, peer-reviewed version: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3499998

Ps. Azmina and Eliza remain friends. Azmina managed to sell the lambo to Agi. Agi needed to create some juicy tax losses…

Disclaimer: this blog is separate from my teaching position at the Faculty of Law, CUHK. All brilliant and not-brilliant views are mine…

--

--

Eliza Mik

Artificially Intelligent. Naturally allergic to non-sense. Technology and law are questions of fact. The best vodka is Żubrówka. Emptiness is Luxury.