<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eliza Mik on Medium]]></title>
        <description><![CDATA[Stories by Eliza Mik on Medium]]></description>
        <link>https://medium.com/@elizamik?source=rss-42b301f74828------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*t0rl67FFdmO5FUz2A6y_MA.jpeg</url>
            <title>Stories by Eliza Mik on Medium</title>
            <link>https://medium.com/@elizamik?source=rss-42b301f74828------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 10:56:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@elizamik/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Legal Hallucinations?]]></title>
            <link>https://elizamik.medium.com/legal-hallucinations-6454922ab3c0?source=rss-42b301f74828------2</link>
            <guid isPermaLink="false">https://medium.com/p/6454922ab3c0</guid>
            <category><![CDATA[legal-services]]></category>
            <category><![CDATA[legaltech]]></category>
            <category><![CDATA[hallucinations]]></category>
            <category><![CDATA[gpt-4]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Eliza Mik]]></dc:creator>
            <pubDate>Wed, 21 Feb 2024 04:18:31 GMT</pubDate>
            <atom:updated>2024-03-20T10:02:47.205Z</atom:updated>
            <content:encoded><![CDATA[<p>Do we know when an LLM is hallucinating? In the legal area — it may not be that obvious…</p><p>Two old friends meet up in a bar. Larry is a lawyer. Cody is a software engineer. After catching up on family affairs, they chat about work. Cody complains: “I asked this legal question to five different lawyers and each of them gave me a <em>different answer</em>. I’m really beginning to lose trust in the legal profession. I’m just going to use an LLM. Much cheaper!”</p><p>Larry responds: “You think LLMs are better? I recently asked a legal question to GPT-3.5, to GPT-4 and then to Llamma2. Each gave me a different answer! And you know what? Next day, I asked GPT-4 the same question - twice! And it gave me two completely different answers, again! What a joke! I can’t believe some people think that LLMs will replace lawyers!”</p><p>The conversation gets heated.</p><p>Cody insists that lawyers are a bunch of overpriced clowns. How can there be five different answers to one legal question? Either four of the lawyers or all five were totally incompetent. Larry observes that language models are not much better because they hallucinate and are inherently unreliable. One would be “stupid to trust them.” After all, “how can one model provide a different answer to the same question depending on the time of the day? How can different models provide diverging answers? If it knew the answer — it should respond correctly, if it did not — it should say ‘I do not know.’ I swear I always used the same prompt!” Cody shrugs. Larry focuses on his drink. The friends fall silent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Fa0ljjfNv_xo-U1YeaZFg.jpeg" /><figcaption>This is Larry’s fancy-schmancy drink. Cody is having a manly IPA…</figcaption></figure><p>The silence is broken by Lizzy, the bartender. “Hi guys… I could not help but overhearing your little quarrel. I think both of you are wrong…</p><p><strong>Shouldn’t you first establish what type of question it was?</strong></p><p>Was there a single answer to the question or was the question more open-ended, like, it depended on one’s knowledge and interpretation of the law? I mean, could there be different answers.”</p><p>Cody and Larry stare at Lizzy in disbelief. “Care to explain?” says Larry.</p><p>Lizzy answers: “I think people mistakenly assume that there is <em>always only one answer</em> to a legal question. In reality, everything depends on the question. If, for example, I ask whether a certain case exists or whether a particular statute is still in force, there is only 1 answer. <a href="https://arxiv.org/abs/2401.01301">The case exists or it does not, the statute is in force, or it is not.</a> Those are questions of fact that can be answered with reference to a ground truth. You guys with me?”</p><p>Larry and Cody nod.</p><p>Lizzy continues: “I could also ask about the interpretation of a case or even a more concrete legal question such as ‘are smart contracts enforceable.’ I think that it is perfectly fine to have five different opinions about how a case or a statute should be interpreted or how a legal issue should be approached. Have you ever attended a conference where a bunch of contract law professors debated the rules of contractual interpretation or discussed recent developments in liquidated damages? So much disagreement! So many opinions!”</p><p>Larry whispers: “I think I know what you mean. In law, there might be many instances where there is no legal ground truth. The answer to a legal question may be a matter of legal opinion. There may be 5 different answers to a legal question — and all of them could be correct! Everything may depend on how a lawyer interprets the law.”</p><p>Cody spills his drink. “Can’t believe this nonsense! Isn’t the law all about rules and principles and statutes? Isn’t it, like, binary?”</p><p>Larry and Lizzy answer in unison:</p><h3>“No.”</h3><p>Cody gets agitated. “Do you guys realize the practical implications of this?</p><h4>If there are legal questions that can have more than one correct answer — then how can you establish whether an LLM hallucinates? If there is no ground truth — how can you say whether the generated output is correct or not?</h4><p>The very idea underpinning hallucinations is that it is possible to evaluate whether the generated output is correct or not. There’s all this <a href="https://arxiv.org/abs/2309.01219">technical literature</a> that talks about the detection and mitigation of hallucinations. The assumption is that <a href="https://arxiv.org/abs/2307.03987">hallucinations can be clearly identified</a>. If, there is no ground truth, then it is extremely difficult if not impossible to state whether something is a hallucination or not!”</p><p>Lizzy interjects: “Slow down, Cody. You can’t make a blanket statement that when language models are applied to legal tasks, it is impossible to establish whether they are hallucinating. Precision please. <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4757452">Everything depends on the type of question</a>. On one hand we have questions that are capable of a clear yes/no answer and here we can state whether a model hallucinates. On the other, we have questions that do not have a single perfect answer. Then, it may be really difficult to determine whether the model hallucinates or not. It follows that whether an answer generated by an LLM is a hallucination may depend on the opinion of the person evaluating such answer. Of course, I am bypassing answers that are total gibberish, like, generation errors…Or some dude turning up the <a href="https://txt.cohere.com/llm-parameters-best-outputs-language-ai/">temperature</a> or fiddling with <a href="https://docs.cohere.com/docs/controlling-generation-with-top-k-top-p?ref=txt.cohere.com">topK</a>…”</p><p>Larry, who abandoned his fancy cocktail and poured himself a double Hibiki to calm his nerves, mutters: “This is a big problem — people with no legal background, law students or even junior lawyers with little experience may look at the generated answer and take it at face value.</p><p><strong>If it looks good it must be good! If you do not have a lot of legal knowledge and experience you will simply be unable to evaluate whether a statement is correct.</strong></p><p>The problem is that even very experienced lawyers or judges or law professors may look at the generated statement and totally disagree. Of course, sometimes it is clear that the model generates nonsense. But sometimes whether the statement is correct may be a question of opinion.”</p><p>Lizzy nods: “LLMs can be really dangerous. If people have no idea how to evaluate the generated output — they are in trouble. They may just think that because the <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4678265">generated text looks so good</a> and is so fluent and it contains a lot of legal words, <a href="https://arxiv.org/abs/2308.02312">then it must be correct.”</a></p><h4>Maybe the current fascination with LLMs derives from the fact that many users lack the expertise to evaluate the quality of the generated text?</h4><p>Cody: “Yeah, I see your point. After all, LLMs cannot really explain how or why they generated a particular answer. I assume that even a junior lawyer could tell you more or less why he or she gave a particular answer… right?”</p><p>Larry laughs: “Yes. At least in theory! Sometimes lawyers give intuitive answers, especially if they are already knowledgeable or experienced. Of course, they also make mistakes but at least you can always discuss with them why they gave a particular answer. And I hear that models can even make-up explanations to their nonsensical answers! ”</p><p>Cody sighs. With some hesitation, he pays the bill and whispers: “You never really know why a model generated a particular input… They are total black boxes, and you really can’t explain how it arrived at an answer… maybe it’s the <a href="http://Maybe the current fascination with LLMs derives from the fact that many users lack the expertise to evaluate the quality of the generated text?">embers of autoregression?</a> Maybe its <a href="https://aclanthology.org/2020.emnlp-main.437.pdf">crappy parametric knowledge</a>? Who knows…”</p><p>Lizzy checks her watch. “Ladies, we are closing. Might see you next week?”</p><p>“Yes, ma’am.”</p><p>She <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4757452">knows</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_EkmDolZld3Zftvx7f2wOg.jpeg" /><figcaption>Lizzy… as caught by CCTV when leaving the bar…</figcaption></figure><p>…</p><p><strong><em>Disclaimer: this blog is separate from my teaching position at the Faculty of Law, CUHK. All brilliant and not-brilliant views are mine.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6454922ab3c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLMs will not replace lawyers.]]></title>
            <link>https://elizamik.medium.com/llms-will-not-replace-lawyers-d491e7c655ca?source=rss-42b301f74828------2</link>
            <guid isPermaLink="false">https://medium.com/p/d491e7c655ca</guid>
            <category><![CDATA[legaltech]]></category>
            <category><![CDATA[legal-services]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Eliza Mik]]></dc:creator>
            <pubDate>Thu, 13 Jul 2023 07:00:33 GMT</pubDate>
            <atom:updated>2023-11-10T12:29:20.346Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fwfz_DMh0z7q8nmsuUDXbw.jpeg" /><figcaption>me grinning at all the billable hours…</figcaption></figure><h3>Will LLMs replace lawyers?</h3><p>No.</p><p>If we were to believe the mainstream predictions made less than 10 years ago, the legal profession should have been revolutionised/transformed by the introduction of IBM Watson. Pick your favourite term, but the point was that if a fancy computer program can win at Jeopardy, then this program can also revolutionise/transform the legal profession.</p><p>IBM Watson turned out to be a total disaster.</p><p>It had zero impact on the legal profession. IBM tried to apply it in the medical field but had <a href="https://spectrum.ieee.org/how-ibm-watson-overpromised-and-underdelivered-on-ai-health-care">zero success</a>. Total waste of time.</p><p>It is now predicted that large language models, or “LLMs,” will have a <a href="https://www.economist.com/business/2023/06/06/generative-ai-could-radically-alter-the-practice-of-law?gclid=Cj0KCQjwnrmlBhDHARIsADJ5b_n8Kr62GyG40JFYHRcsO0jVWjhi4ocRi4tDFtXFaEIYHaeDujJjqA8aAmq6EALw_wcB&amp;gclsrc=aw.ds">massive impact on the legal profession.</a> This prediction is, however, based on some naïve and uninformed assumptions:</p><h4>LLMs generate text. Lawyers consume and produce a lot of text.</h4><h4>Therefore:</h4><h4>LLMs will revolutionize/transform the work of lawyers.</h4><p>This prediction is usually not made by lawyers but by computer scientists, journalists, and bankers. Professionals who are not necessarily familiar with what lawyers actually do and - how they do it.</p><p>Remember how Geoffrey Hinton, the father of deep learning, predicted that machine learning will obviate the need for radiologists? To date, <a href="https://nautil.us/deep-learning-is-hitting-a-wall-238440/#:~:text=Deep%20learning%20systems%20are%20black,up%20with%20the%20wrong%20answers.">not a single radiologist has been replaced</a>. Professor Hinton excels at backpropagation and Boltzmann machines, not at radiology. I excel at drafting contracts, negotiating indemnities and drinking vodka. I shut up about the rest. Maybe we should stop listening to people from one profession making wild predictions about another. Maybe we should stop making predictions in the first place: we tend to overestimate the effect of a technology in the short run and underestimate its effect in the long run, (aka: Amara’s Law).</p><p>Equating legal work with text generation fails to acknowledge the reasons why lawyers “produce text,” not to mention the expertise required to do so. Lawyers do not generate text. Lawyers use language to achieve specific goals. It may take 10 minutes to write 5 sentences — but those 10 minutes often leverage 10 years of legal practice combined with 4–10 years of legal studies.</p><p>Moreover, once we examine the technical literature, the transformative potential of LLMs becomes less obvious.</p><p>Below are my observations on the “transformative” potential of LLMs in legal practice. They are pretty high-level and the technical details are simplified. No-one will read a blog post with 25000 words.</p><p>Two assumptions:</p><p>(0) technology sets factual limits of what can be done. If, for example, we establish that LLMs cannot understand text, then we need not debate whether LLMs can understand legal language.</p><p>(1) while certain aspects of legal work are repetitive, most tasks performed by lawyers require understanding, common sense, and legal knowledge.</p><p><strong>What LLMs can do</strong></p><p>LLMs owe their name to the large number of parameters in their underlying neural networks and to the vast amounts of data they are trained on. LLMs generate text by predicting the likelihood of a token (character or word) given either its preceding or surrounding context. As Wolfram puts it: they produce a <a href="https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/">“reasonable continuation” of the preceding text by estimating the probabilities of the next word</a>, based on prior words — including those generated by itself.</p><p>Language models have been around for a while and many of us have been using them daily. Think: Google Translate. The latter operates in the background, so we don’t really appreciate its inner workings and how amazing it is. After a brief period of fascination, we have just accepted the fact that Google can translate, say, English into Mandarin pretty seamlessly. The public was introduced to a more advanced language model in November 2022, by the brilliantly designed ChatGPT — a (seemingly) simple chat interface that can be prompted to generate text that is coherent and plausible.</p><p>Fun fact 1: ChatGPT relies on a<a href="https://arxiv.org/abs/1706.03762"> technological breakthough made by Google around December 2017</a>: the introduction of transformers. The latter (in super-simple terms) are deep learning models capable of producing human-like text by, quite literally, “looking around” larger portions of text to evaluate the relationships, or dependencies, between words. Unlike traditional n-gram models, which can only predict words given the preceding sequence of 5 or fewer words, transformer-based models apply a so-called attention mechanism which evaluates relationships between multiple words, regardless of their respective positions. Transformers are super-amazing but they execel at one task:</p><h3>Word Prediction.</h3><p>Let this sink in.</p><p>LLMs excel at generating coherent and plausible text based on their ability to predict the next word in a sequence. This is particularly amazing given that LLMs do NOT know the rules of grammar, syntax and semantics.</p><p>But:</p><p>Generating text is not the same as <em>understanding </em>and <em>using </em>language.</p><p>Generating legalese is not the same as giving legal advice.</p><p>We need to understand that LLMs do not understand. We need to understand that LLMs have some inherent limitations that cannot be overcome with more data or more compute…</p><h4><strong><em>Understanding</em></strong></h4><p>In principle, a language model is “a system for haphazardly stitching together sequences of linguistic forms it has observed in its vast training data, according to probabilistic information about how they combine, but without any reference to meaning: <a href="https://dl.acm.org/doi/10.1145/3442188.3445922">a stochastic parrot.</a>” LLMs understand neither their training data nor the output they generate. They deal in statistics, not semantics. The problem is that <a href="https://aclanthology.org/2020.acl-main.463.pdf">meaning cannot be learned from text alone</a> — irrespective of the amount of text LLMs “see” during their training.</p><p>Understanding requires grounding: a connection between text and reality, between the words and the world. For LLMs to learn to understand text, we would have to solve the <em>symbol grounding problem</em>. We would have to teach LLMs to establish associations between symbols, such as words, with their real-world referents, such as physical objects. The symbolic representations of objects and concepts are always arbitrary. For example, the word “cheese” is a string of letters, or text, with no inherent meaning. “Cheese” has meaning <em>for us</em> because <em>we </em>associate it with the physical object commonly schmeared on fancy sourdough. This association, this grounding, happens in our heads.</p><p>In the case of abstract referents, like “justice” or “obligation,” meaning does not derive from associations with physical objects but from relationships between concepts. Even then, however, such relationships require internal representations that exist independently from text. Without grounding, words are just strings of letters. Without solving the symbol grounding problem, LLMs will not progress beyond shallow and probabilistic pattern recognition.</p><p>LLMs cannot learn meaning because they do not have access to the world. Irrespective of the amount of text and the length of training, language models trained on text cannot connect words to the world. They can generate text, not solutions or purpose-driven communications. Knowing the statistical regularities of language differs from knowing how to use language. In fancier terms: <a href="https://arxiv.org/abs/2301.06627">formal linguistic competence differs from functional linguistic competence.</a></p><p>Lawyers do not generate text for the sake of filling pages with legalese. (ok, sometimes we do…especially some judges) Lawyers use language as a tool to advise, to defend, to adjudicate and to argue. In contrast, LLMs cannot use language to achieve goals or to solve problems in a situated context. To purposefully use language, LLMs would also require “<a href="https://arxiv.org/abs/2302.02662">functional grounding</a>:” the ability to model, predict and control external physical and social processes.</p><p>I will spare you a very long paragraph describing the intricate relationships between knowledge, common sense and reasoning as well as a discussion of the different types of knowledge. The point is simple: using language involves reasoning and world knowledge. We cannot reason about something we do not know, and we cannot make use of knowledge without the ability to reason. Reasoning cannot be learned from text alone as the rules of reasoning <a href="https://direct.mit.edu/daed/article/151/2/139/110627/The-Curious-Case-of-Commonsense-Intelligence">cannot be written down or replicated by feeding LLMs with formal logic.</a> A system devoid of world knowledge and common sense can hardly be expected to augment legal work, not to mention — revolutionise the legal profession.</p><p>Fun fact 2: building machines capable of reasoning is regarded as one of the most complex challenges in AI. Chollet states: anything that requires reasoning remains beyond the reach of deep-learning models, “no matter how much data you throw at them.”[1]</p><p>In sum: without basic world knowledge and common sense, we cannot even dream of any form of legal reasoning…</p><p>I know what you are going to say.</p><p><strong>“But surely having been trained on so much text, LLMs must know a lot!”</strong></p><p>During training, LLMs are given terabytes of text. Unfortunately, LLMs can only learn to extract statistical information <em>about words</em>, not facts about the world. Given the sheer size of the language corpora used in their training, they “acquire” and reflect <em>some</em> world knowledge. Such knowledge is, however, limited to concepts and facts explicitly stated in such corpora. While it may include mathematical (e.g., “two plus one is three”), factual (e.g., “Berlin is the capital of Germany”) or even legal (“contracts are enforceable agreements”) knowledge, it does not contain such basic information like “if you drop a glass of red wine, the glass with break and the wine will stain your carpet and your mother-in-law will kick you out of the house.” A lot of knowledge is implicit. It cannot be learned from text.</p><p>Fun fact 3. There have been attempts to create a knowledge base with the general rules of common sense and world knowledge. The <a href="https://cyc.com/">famous CYC </a>project, which contains rules stated in a domain-independent form to provide a universal “reasoning backbone,” has occupied a team of knowledge engineers for over 35 years! Arguably, LLMs could be integrated with CYC in the future. The practical success of such integration will, however, depend on the completeness and accuracy of CYC.</p><p>Fun fact 4: GPT-4 and ChatGPT (I mean the whole GPT-family from OpenAI) are autoregressive decoders. A small but important detail. Autoregressive decoders are unidirectional and can only use information from the left of the predicted token. GPTs are thus inherently limited to predicting the next word and, by definition, cannot understand the broader context of the generated text. Bidirectional autoencoders, such as BERT, predict masked words from a sentence, given context from before and after the missing word. They are more suitable for tasks that require an understanding of the entire input, such as sentence classification and information extraction. So, if LLMs are ever to be really useful to lawyers — I do not think any of the GPTs will be a winner…</p><p>The terabytes of text that models have been trained on contain a lot of nonsense, misinformation, and fiction. And — irrespective of the amount of text they were trained on - LLMs can’t tell fact from fiction. They will learn that “Berlin is the capital of Germany” and that “Mordor is southeast of Middle Earth.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_fg59nPtZVJSogId" /><figcaption>Photo by <a href="https://unsplash.com/pt-br/@davidsonluna?utm_source=medium&amp;utm_medium=referral">D A V I D S O N L U N A</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>To clarify:</strong></p><p>We often read that language models understand or reason. This seems to contradict the broader consensus that LLMs cannot do either. The terms “understand” and “reason” are often used colloquially or in technical contexts. Technical papers often equate both terms with the ability to perform specific, narrowly defined tasks such as textual entailment, pronoun disambiguation or document classification. If an LLM can perform any of the aforementioned tasks above random chance, it is said to “understand” or “reason.” We may also read that LLMs demonstrate “<a href="https://blog.google/technology/ai/bard-improved-reasoning-google-sheets-export/">improved logic and reasoning skills</a>” only to realize, upon examining the source, that such skills concern “computation-based word and math problems.”</p><p>We have established that LLMs do not understand anything (apart from word prediction!) and that they have no common sense and no world knowledge. They excel at generating text. That’s really it.</p><p>What does this mean in practice?</p><h4><strong><em>Hallucinations</em></strong></h4><p>LLMs often “hallucinate:” generate text that is nonsensical or factually incorrect. The main problem with hallucinations is that they should not be called hallucinations. Hallucinations are commonly associated with delusions or imaginary things and are easy to detect. We can normally tell when the other person talks nonsense or, after ingesting some illegal substance, well, hallucinates. The problem with LLMs is that the “hallucinated text” generally appears plausible, informative, and credible! Cute terminology notwithstanding, hallucinations are falsehoods or outright lies. Even OpenAI acknowledges that GPT-4 tends to “make up facts, to double-down on incorrect information. […] Moreover, it often exhibits these tendencies in ways that are more convincing and believable than earlier models (e.g., due to authoritative tone or to being presented in the context of highly detailed information that is accurate).” You don’t believe me? <a href="https://arxiv.org/abs/2303.08774">GPT-4 technical report</a>. Page 19.</p><p>It gets worse.</p><p>LLMs generate true and false statements with identical confidence. They can produce incorrect answers followed by incorrect explanations but, when given the incorrect explanation alone, they recognize it as incorrect! Such “<a href="https://arxiv.org/abs/2305.13534">hallucination snowballing</a>” derives from the fact that LLMs try to stay consistent: they aim to generate a plausible continuation of the text they have generated previously, including any hallucinations contained therein. Once they start producing fiction — they can’t stop! LLMs may acknowledge their mistake but will not always revise their answer. I speak from experience: on countless occasions I have pointed out to ChatGPT, very politely, that a particular answer was wrong. The model apologised, also very politely, acknowledged the correctness of my explanation, and continued to hallucinate…</p><p>Before you ask: I only enquired about legal topics that are pretty straightforward and uncontroversial.</p><p>Falsehoods/hallucinations are commonly attributed to the large amount of false information in the training data. An LLM trained on Lord of the Rings and The Witcher would confidently generate text about dragons, elves, and mosters! Having ZERO common sense and world knowledge, it assumes such “objects” exist! They are in the text, after all. Chomsky (yes. <em>the </em>Chomsky) observed that language models “are <a href="https://www.nytimes.com/2023/03/08/opinion/noam-chomsky-chatgpt-ai.html">incapable of distinguishing the possible from the impossible. </a>Whereas humans are limited in the kinds of explanations we can rationally conjecture, machine learning systems can learn both that the earth is flat and that the earth is round.” Their learning is ability is unconstrained by the laws of physics, common sense or causation etc.</p><p>The second reason for hallucinations is that many LLMs, such as the GPT-family, are specifically trained for open-ended text generation. As LLMs prioritise fluency over factuality, hallucinations may be a by-product of language generation. Their aim is to produce text not to use language for specific purposes that may require a solid grounding in reality. This is beneficial when writing fiction, love letters or poetry, but detrimental in such tasks as question answering and/or document summarization. The latter require models to be factual and/or faithful to the source text. Hallucinations can, in some instances, be equated with creativity and creativity could be useful in some legal context, such as when devising novel arguments or litigation strategies. The value of any “creative solutions” generated by an LLM must, however, be balanced against the cost of their verification.</p><h4><strong><em>Overreliance</em></strong></h4><p>The plausibility of the generated text creates the risk of overreliance: most users have a limited (if any!) understanding what LLMs are trained to do and tend to trust the generated content. If it looks good, it must be good. The problem is not that the machine-generated text is indistinguishable from human-generated text, but that its increased fluency creates an appearance of adequacy. Brooks (the famous roboticist, not the actor!) stated that <a href="https://spectrum.ieee.org/gpt-4-calm-down">performance in language generation is generally mistaken for competence.</a></p><p>The problem: factually incorrect output can still be — or appear to be — relevant, plausible and informative. As falsehoods become harder to detect, users are less likely to challenge or verify the generated responses. This can even happen in domains where users have expertise but simply fail to notice <em>one</em> falsehood “hidden” within a longer sequence of correct statements. The potential for disaster increases where users lack domain expertise. When faced with long paragraphs of coherent legalese, the average user will assume that the text contains correct legal information.</p><p><em>An aside: the idea of using language models to democratize access to the law is simply dangerous.</em></p><p>Of course, the risk of overreliance can be reduced with careful reviews and verifications of the output generated by the LLM. I think, however, that it is unrealistic to expect the average user to verify each generated sentence. Why would you verify something that <em>looks</em> correct? The superficial plausibility of the text discourages verification. Paradoxically, the need to carefully review and verify seems to defy the very purpose of deploying LLMS: saving time and optimizing human performance. After all, verification and review require competence and expertise…</p><p>It may take one minute to generate a “wonderful” legal opinion. But then we need to spend six hours to establish its accuracy… which brings me to the next point….</p><h4><strong><em>Explainability</em></strong></h4><p>You might say it is irrelevant whether LLMs <em>actually</em> understand anything as long as the generated text is correct. The problem is that ALL generated text must be verified and that such verification requires an explanation <em>how</em> it was arrived at. We cannot trust the output — even if it appears correct — if we cannot examine the underlying reasoning! We may agree with the output, but we may be wrong. We may also disagree with the output but if the underlying reasoning is sound we may have to accept it and revise our own assumptions. Much will depend on the level of our expertise in a given topic. Explainability is particularly important when evaluating responses to open-ended questions, which may not have a single answer. Verification requires explainability — unless we are willing to spend considerable resources to research &amp; evaluate multiple reasoning paths that could have produced a given response. Interestingly, GPT-4 can generate plausible and <em>convincing </em>explanations even where the generated text is 100% wrong.</p><p>Another point: an important aspect of explainability is the indication of the sources relied on. While search engines, by definition, provide detailed references in their search result, LLMs often generate a single answer, without referring to any sources. Such references can be generated on request but, again, without any assurances as to their correctness. Quite the opposite: ChatGPT is known to provide <a href="https://www.forbes.com/sites/mollybohannon/2023/06/22/judge-fines-two-lawyers-for-using-fake-cases-from-chatgpt/?sh=722c6445516c">non-existent sources to “support” its responses.</a></p><p>Hilarious.</p><p>Again, I know what you are going to say.</p><p><strong>“But surely LLMs must be awesome because they have demonstrated unbelievable performance on some benchmarks!”</strong></p><p>Yes, but…. Benchmarks measure performance on artificially created and narrowly defined tasks, which bear little resemblance to their real-world equivalents. Stellar benchmark performance does not mean that a model can perform in real-world scenarios or that it developed the ability to reason or to understand. Unfortunately, LLM research often focuses on achieving success on benchmarks, not on developing LLMs that actually understand language or reason. Moreover, excellent performance on benchmarks is often attributable to “technical shortcuts” as LLMs rely on heuristics to exploit certain biases in datasets without developing any understanding of the text. The LLM’s amazing performance falls back to chance when given adversarial examples, that is, inputs designed to fool the model. In sum: I find benchmarks very useful when comparing models <em>in general</em> but not when evaluating whether they can assist in legal work.</p><p>To examine whether superior performance on some specific benchmark translates into actual usability, whether it is actually relevant for legal tasks, we must investigate the benchmark itself: do the tasks comprised therein adequately represent the skill the benchmark is supposed to measure? Note that benchmarks are composed of dozens, sometimes hundreds of different <a href="https://arxiv.org/abs/2111.15366">component tasks </a>each of which measures a different aspect of the skill measured by a given benchmark. At present, we have no benchmark that contains a sufficient number of <em>diverse</em> tasks that would represent general understanding or reasoning. Arguably, such benchmark would include hundreds if not thousands of discrete tasks. Arguably, such list of tasks may be impossible to create to begin with. The benchmarks in the legal domain seem to confirm this very point.</p><p>Of particular interest is <a href="https://arxiv.org/abs/2209.06120">LegalBench</a>, which examines whether LLMs can be guided to execute tasks involving <em>legal </em>reasoning. LegalBench consists of an <a href="https://github.com/HazyResearch/legalbench">online repository </a>where domain experts can submit tasks to evaluate different forms of legal reasoning. While this domain-specific effort seems commendable, it also confirms the complexity of legal reasoning. Most of the tasks included in the benchmark are extremely narrow, often confined to a yes/no question about the contents of single clause in a specific type of contract.</p><p>As an academic, I love LegalBench. As a (former) transactional lawyer — not so much. I am not sure whether it is worthwhile measuring the performance of a model on dozens of super-narrow and very domain specific legal tasks, instead of focusing on the fundamental tasks of causal or deductive reasoning. Why, for example, investigate whether LLMs can identify whether a <em>clause</em> describes how user information is protected if it is clear that none of the LLMs can reason by analogy? If LLMs struggle with the basic building blocks of reasoning, such as causality and common sense, testing more specific forms of legal reasoning seem questionable.</p><p>But there is an elephant in the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Lbx7WSYNip9DF1LS" /><figcaption>Photo by <a href="https://unsplash.com/@kaffeebart?utm_source=medium&amp;utm_medium=referral">Kaffeebart</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>GPT-4 passed the Bar Exam!</strong></p><p>Unlike benchmarks, the Bar Exam is a test designed for humans. It does not test performance on a single task but the general ability to solve legal problems and apply the law. Unsurprisingly, the fact that GPT-4 passed the Bar Exam has caused quite some panic in the legal profession. This result must, however, be <a href="https://aiguide.substack.com/p/did-chatgpt-really-pass-graduate">approached with great caution</a>. To date, GPT-4 has passed the exam once, in sanitized lab conditions, and its achievement has not been replicated. This may seem like a small detail but replicability is extremely important both from an academic and from a practical perspective given that GPT-4 has been created by a commercial entity. (thank you, <a href="https://www.bloomberg.com/news/articles/2023-01-23/microsoft-makes-multibillion-dollar-investment-in-openai">Microsoft for 10,000,000,000 USD</a> in investment!) Academic endeavors must be distinguished from promotional activities. To repeat: GPT-4 has passed the bar exam <em>once</em>. To evaluate the <em>practical </em>significance of this achievement, we would require insights as to how the model was trained and how it was used at time of inference. Citing competitive pressure, OpenAI provided no “details about the architecture (including model size), hardware, training compute, dataset construction, training method, or similar.” Without such details, we cannot evaluate and trust the result. In particular, we must have assurances that the training data were not contaminated with data from the test set, that the model has not seen the test data during training.</p><p>Nonetheless, I do not want to downplay GPT-4’s performance because it is unquestionably impressive. Some components of the Bar Exam required, for example, the drafting of memos in the context of a complex legal scenarios, including domestic relations as well as criminal law and legal ethics. There is another interesting detail: GPT-4 excelled at the multiple-choice component of the exam, showing the largest improvement in the areas of contract law and evidence. Answering questions about contract law, however, differs from drafting or interpreting contracts. Apart from legal knowledge, the latter require an understanding of context and common sense. Knowing the rules is not synonymous with applying the rules against the background of a specific transaction. In practice, the drafting of contracts as well as the collection and evaluation of evidence require real-world knowledge. It would be interesting to observe GPT-4’s performance on tasks involving the interpretation of statutes and contracts…</p><p>Again, you will say:</p><p><strong><em>“But, of course, we can solve all those problems with more…”</em></strong></p><p>Many of you anticipate that “with more training data and more parameters,” LLMs will ‘scale up’ to acquire understanding, commonsense, and other essential abilities. After all, LLMs have already displayed emergent abilities that were not in their original training. Think of few-shot prompting and chain-of-thought prompting — these are amazing capabilities that the LLMs were not specifically trained for. We must not assume, however, that more training data or more powerful processors will remedy the shortcomings of LLMs. It is becoming clear that understanding, common sense, and reasoning will <em>not</em> emerge from more powerful LLMs. If something has been trained to generate text it will not suddenly start to reason. Scaling up cannot solve the grounding problem or equip LLMs with a world model required for common sense and causal reasoning.</p><p>Fun fact 5: many tasks requiring causal reasoning and general world knowledge exhibit flat scaling curves, that is, when we add compute and/or training data, the performance of the scaled model does not improve.[4] It has also been established that the quality of the generated output often decreases with increased model size,[5] that larger models are often less truthful than their smaller predecessors[6] and that the performance of transformer-based LLMs rapidly decays with increased task complexity.[7] Making models larger makes them more fluent but not more trustworthy or reliable.[8] Consequently, when we make a model bigger, “bad output” may not become less frequent but more difficult to detect.</p><p><strong>At your own risk…</strong></p><p>The use of LLMs in legal practice requires a cost-benefit assessment in terms of time and quality. When evaluating the speed with which an LLM generates its output, we must consider the time and <em>human resources</em> required for its verification. The risk of hallucinations must not be underestimated. What would be an acceptable “hallucination rate” for your law firm? How would it translate into cost savings?</p><p>Given the risk of overreliance, the question is not whether LLMs can perform a particular task but <em>whether they should be used</em> to perform such task.</p><p>What is the benefit of text generation that is unconstrained by common sense and world knowledge?</p><p>In the next post, I will focus on the technical difficulties of adapting LLMs to legal tasks, pre-training, fine-tuning (including RLHF), prompt-engineering, RAG etc…</p><p>Possible fun fact: did you know that GPT-4 is (most likely) not a single model but a <a href="https://medium.com/@albertoromgar/gpt-4s-secret-has-been-revealed-439db1568180">hybrid</a>? The implications of this might be pretty significant — especially when it comes to its stellar performance…</p><p>[1] F. Chollet, <em>Deep Learning with Python</em> (2018 Manning) 325</p><p>[4] Mirac Suzgun et al. “Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them.” <em>ArXiv</em> abs/2210.09261 (2022)</p><p>[5] Antonio Valerio Miceli-Barone et al., ‘The Larger They Are, the Harder They Fail: Language Models do not Recognize Identifier Swaps in Python’ (2023)</p><p>[6] Stephen Lin et al., TruthfulQA: Measuring How Models Mimic Human Falsehoods (2022)</p><p>[7] Nouha Dziri et al., ‘Faith and Fate: Limits of Transformers on Compositionality’ (May 2023)</p><p>[8] R Thoppilan et al., LaMDA: language models for dialogue applications (2022)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d491e7c655ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t Trust Smart Contracts]]></title>
            <link>https://elizamik.medium.com/dont-trust-smart-contracts-851e25339e72?source=rss-42b301f74828------2</link>
            <guid isPermaLink="false">https://medium.com/p/851e25339e72</guid>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Eliza Mik]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 07:54:30 GMT</pubDate>
            <atom:updated>2023-04-19T09:44:12.359Z</atom:updated>
            <content:encoded><![CDATA[<p>…a slighlty more technical follow-up to “Can we express contracts in code?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5gXoapvSbThte1xWpr669w.jpeg" /><figcaption>…it takes a lot of training (and photoshop) to look this EVIL.</figcaption></figure><p>The blockchain narrative features evil bankers, corrupt judges, overpriced lawyers (pictured above) and untrustworthy contracting parties. The only solution to the resulting problems lies in code — and in selfless and competent coders! Enter the world of smart contracts where trust and certainty are based on distributed computations, beautiful blockchains and unicorn-riding, benevolent crypto-evangelists! Secure, infallible, and unbiased code replaces unpredictable and biased humans. Immutable and transparent, smart contracts revolutionise commerce by <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3913783">providing certainty and guaranteeing the agreed outcomes</a>! The idea is that — fasten your seatbelts— if humans are eliminated from the contracting process, then we no longer need to trust the other transacting party or to rely on courts in the event of a dispute. Performance is guaranteed by code. Unlike those nasty humans, code cannot change its mind, refuse to act, or deviate from the agreed terms. The entire smart contract ideology rests on the assumption that once set in motion, their code cannot be modified, and their execution cannot be interfered with. The implementation of this ideology takes the form of a complex technological ecosystem constructed for the sole purpose of preventing the possibility of — and the necessity for — any human participation in the performance of contracts. This idea is so abstract (and fantastical!) that it bears repeating: the smart contract is supposed to run by itself and ensure absolute adherence to the rules embodied therein. The rules are set in stone (aka: engraved in the blockchain) so they cannot be changed / broken.</p><p><em>Let this sink in for a moment.</em></p><p>The idea of trusting smart contracts — or code in general — derives from grave technological ignorance. After all, it is easier to read tweets than to analyse technical papers….</p><p>Let’s stay high-level and look at some practical problems with smart contracts. I want to focus on the <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3913783">challenges of writing good code</a>, the misunderstandings surrounding transparency and immutability as well as the need to trust someone. Take a sip of vodka, you might need it.</p><p><em>(you forgot to put it in the freezer. of course)</em></p><h3>Bad code…</h3><p>I have explained in a <a href="https://elizamik.medium.com/can-we-express-contracts-in-code-de6e2b1f63b1">previous post</a> that there are no legal obstacles to expressing contracts in code. The problems are purely technical and derive from the fact that, notwithstanding the fancy label, smart contracts are computer programs. If smart contracts are to guarantee performance, provide certainty and obliterate the legal profession, their code must be perfect. Kosher. Error-free. At a basic level — to trust a smart contract, it must contain:</p><h3>ZERO BUGS.</h3><p>Especially given that its code is immutable. Once deployed on some blockchain — you cannot change it. (There are some efforts to make “amendable” smart contracts but let’s leave them aside — seriously, amendability goes against the whole blockchain ideology…You can’t be amendable AND immutable.)</p><p>Unfortunately, it is practically impossible to create perfect code. Smart contracts are computer programs and, statistically, <em>each</em> computer program contains errors. Regular computer programs can be corrected. Smart contracts cannot.</p><p>Smart contracts are, in fact, notorious for vulnerabilities and coding errors. The latter are mistakes in the implementation of a system design that result in programs not providing the intended functionality or producing unexpected results. The former enable the malicious misuse of system implementations to achieve effects contrary to its goals (so-called “exploits”). Not all vulnerabilities derive from programming errors and not all programming errors can be exploited. Some programming errors resemble those found in traditional programs (e.g. integer overflows), others are specific to smart contracts. For example, “greedy contracts” can lock Ether indefinitely and “gasless send bugs” can prevent the execution of smart contracts. Although the significance of smart contracts cannot be measured by the price of the cryptocurrencies they control, such price highlights the commercial risks involved if a smart contract does not execute as expected or is otherwise compromised. Programming errors and vulnerabilities translate into monetary losses.</p><p>Still excited about immutability?</p><p>When extolling the role of smart contracts in replacing traditional payment intermediaries, such as banks, it is forgotten that software used in financial transactions is rigorously tested before deployment. For months or even years. The same cannot be said of smart contracts. There is no assurance of their quality — and there may be no-one to be held liable in case they do not execute as intended. There is, simply speaking, no reason to trust smart contracts.</p><h4>Consensus Algorithms do NOT validate code</h4><p>The popular assumption that we can trust smart contracts may derive from a misunderstanding of their relationship with blockchains. Ok, smart contracts execute on blockchains — but they do not share the same attributes as blockchains. The fact that (some) blockchains are trustless in the sense that they (kind-of) eliminate the need to trust a single entity, does not mean that smart contracts are trustless or trustworthy. I could endlessly play with the terms “trustless” and “trustworthy” but let’s leave semantics aside and look at some technical facts. Consensus algorithms guarantee the decentralised, tamper-proof, super-sexy-secure execution of smart contracts, but they do not guarantee the quality of their code. To rephrase: distributed execution ensures reliability and resistance to external interference. It is, however, unrelated to the quality of the code. Don’t forget: consensus algorithms validate individual transactions but do NOT validate the code of smart contracts. The code is written off-chain, in the real world, by real people. Using Ethereum as an example, the blockchain will execute good code and bad code with the same unwavering gass-fuelled enthusiasm.</p><p>It gets worse.</p><p>My crypto-friends tell me that the majority of the current programming languages for smart contracts were designed to encourage programmers to move from traditional programming paradigms to a distributed environment. This was done to promote the creation of applications for specific blockchain ecosystems, such as Ethereum, Solana, or Tezos. After all, the value of blockchains (= their native cryptocurrencies or tokens) /other than the Bitcoin blockchain/ largely depends on the applications that they provide as well as on the size of the developer community. Being in a bit of a hurry not to miss out on the crypto-revolution, the designers of such languages have borrowed concepts and features from traditional programming languages although they may not have been adequate for distributed computing environments. The idea: bring more developers in. The result:</p><h4><strong>half-baked programming languages + novice programmers</strong></h4><h4><strong>= bugs and vulnerabilities</strong></h4><h4><strong>/AKA: Where is my crypto?!/</strong></h4><h3><strong>Transparency + Testing</strong></h3><p>The public visibility (i.e. transparency) of the code is of limited practical importance because it is extremely difficult (if not impossible!) to establish how a smart contract will operate without actually running it. The source code is, theoretically, human-readable because it is text. But, in practice, it is illegible to non-programmers. High-level programming languages aim to facilitate programming — not the communication of meaning to humans. Even programmers often struggle to understand what code will do, as inspecting source code is a very limited way of predicting how a computer program will behave. Comments in the code are super helpful but they only go so far… also, comments are made for other developers, to help them maintain the code etc, not to enable the average user to “read” code. In sum, you can “read” source code but you will not understand it.</p><p>Unfortunately, it gets more complicated. Smart contracts are written in source code but are executed in byte code. (there are some exceptions but let’s keep it simple…) To “run on the blockchain,” source code requires compilation into bytecode. Bytecode takes the form of binary strings of code and is not human readable. As it is the bytecode that is executed, not the source code, the former seems more important than the latter — especially given that the compilation process may introduce errors into the final, executable code. If we follow the transparency narrative to its logical conclusion, then the code of the compiler should also be made available for inspection. The visibility of the smart contract (source) code seems of limited usefulness if such code must be transformed and if the “transforming mechanism” (that is: the compiler) may affect its execution. Although bytecode can be easily decompiled into source code, the mere need to perform this operation may overwhelm the average user — not to mention the fact that such operation only leads back to square one, that is: to human-readable but incomprehensible computer instructions. I suspect that the average user does not have the technical expertise to examine, decompile and <em>evaluate</em> a smart contract in all its instantiations.</p><p>If we interpret transparency as availability for testing, things do not get much better. Testing code cannot provide total assurance of how it works, because any analysis of an existing computer program is inherently incomplete. We can never be certain that a program has a desired property unless it has been designed to guarantee that specific property. (I will spare you a paragraph on invariants, specs, formal verification, blockchain emulators and testnets… )</p><p>Smart contract evangelists often claim that by reviewing the smart contract’s code we can determine how it will operate “in the wild.” Such claims seem to associate transparency with the effectiveness of static testing methods. But: the latter only look at the code without running it and are rather bad at discovering malicious code. (recall the Hartbleed bug? or the DAO? or the super-delicious MonoX exploit?)</p><p>I sometimes ask myself: if smart contract code is transparent why are smart contracts notorious for security vulnerabilities? I mean: everyone had a <em>chance to look at it</em>, right?….why have millions of juicy US $$$ been lost if so many people inspected the code? ….</p><p>…</p><p>Knock yourself out. Look at the code all you want. It will not magically reveal what the smart contract will do.</p><p><a href="https://arstechnica.com/information-technology/2021/12/hackers-drain-31-million-from-cryptocurrency-service-monox-finance/">Really stupid &quot;smart contract&quot; bug let hackers steal $31 million in digital coin</a></p><p>We could also use dynamic testing methods, which run the program and assess the outputs for particular inputs, but even this approach cannot establish how a specific smart contract would execute in a<em> </em>situation that has not been tested. Moreover, once the code is on the mainnet — why bother testing it if you cannot change it… And if you test it on a testnet, it may not fully replicate the potential interactions with other smart contracts that is: mimic the real execution environment… So: static methods may not reveal what a program will do and dynamic methods are constrained by the finite number of inputs that we can test or outputs that we can observe. (I will spare you the joy of reading about formal verification etc…)</p><p>Predicting a program’s behavior by testing alone is impossible. If it was, then software would have no bugs.</p><p>I expect the objection that “OMG, you Evil Incompetent Eliza! But we cannot understand contracts written in legalese, either!” This is not the point here. The function of a smart contract is completely different from the function of a traditional contractual document. The former is a computer program that is supposed to run and produce some specific result. The latter “only” provides evidence of the agreement. A contract “does” nothing apart from just “being there” and memorializing what the parties have agreed. The contract itself is performed by the parties — and no one can predict or guarantee human behavior. In contrast, the smart contract is supposed to actually do something, like, unlock doors, transfer cryptoassets, spawn brand-new kitties, make the world a better place, or activate some stuff on-chain or off-chain…</p><h3>Trusting code = Trusting coders</h3><p>Smart contracts are created by coders who make them available for general use by placing them on a blockchain. Consequently, most smart contracts are used by parties who have not written them and have no skills to evaluate their technical correctness. It follows that in order to trust the smart contract, those who use it must trust those who created it. The problem is that in (or <em>on</em>? I cannot get those prepositions right…) public blockchains, such as Ethereum, anybody is allowed to <em>create and to</em> <em>deploy</em> smart contracts. While this approach embodies the spirit of decentralisation and democratisation, it does not provide any guarantees that those who create smart contracts have the necessary expertise AND are not malicious. A competent but evil coder may deliberately create a smart contract containing a vulnerability in order to exploit it once it controls more crypto-currencies. An incompetent but well-meaning coder may create such vulnerability unintentionally and render the smart contract susceptible to exploits by more technologically competent coders. The code is, after all, visible to all…</p><p>Seriously. Think about it: software that keeps and transfers assets worth millions of $$$ can be written by anyone and the only guarantee that it is actually going to do what it is meant to do is that its code is visible…</p><p><em>really?</em></p><p>We often overlook the obvious: smart contracts are written by humans. Those very same biased, opportunistic, and unpredictable humans they are supposed to replace. Technical competence aside, we cannot assume that coders are more ethical or morally superior to bankers, judges, lawyers etc. If coders are dishonest or incompetent, then their code cannot be trusted — not to mention eliminate the need for trust. And, if such coders cannot be identified, then there is also no one you could sue for losses caused by “malfunctioning” smart contracts. Ouch.</p><p>To fully appreciate the absurdity of “trusting code”, check out my full peer-reviewed paper… (highly unpleasant reading. Better (re-)watch Psycho-Pass or The Witcher)</p><p><a href="https://techreg.org/article/view/11784">Smart Contracts: Tales of Trust and Certainty</a></p><p>(please put the vodka in the freezer.)</p><p><strong><em>Disclaimer: this blog is separate from my teaching position at the Faculty of Law, CUHK. All brilliant and not-brilliant views are mine.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=851e25339e72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smart Contracts: Clarifying Some Misunderstandings]]></title>
            <link>https://medium.com/coinmonks/smart-contracts-clarifying-some-misunderstandings-358e2961d96f?source=rss-42b301f74828------2</link>
            <guid isPermaLink="false">https://medium.com/p/358e2961d96f</guid>
            <category><![CDATA[smart-legal-contracts]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[smart-contract-blockchain]]></category>
            <dc:creator><![CDATA[Eliza Mik]]></dc:creator>
            <pubDate>Wed, 09 Feb 2022 10:22:25 GMT</pubDate>
            <atom:updated>2023-10-19T05:10:36.172Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Smart Contracts are not vending machines — and self-enforcement is a misnomer</strong></h3><p>…or: why the vodka will not drink itself and why you will always need a “friendly” Godfather…</p><p>Let’s address two common misunderstandings that pop-up in many of the discussions of smart contracts. I suspect that these misunderstandings have derailed the entire debate and created a lot of confusion… I am talking about comparisons with vending machines and the term “self-enforcement.”</p><p><strong>Vending machines</strong></p><p>Many technical writings regard vending machines as early examples of smart contracts. The “reasoning” is somewhat blurry but, in principle, it goes like this:</p><h4><strong>A smart contract is like a vending machine</strong></h4><h4><strong>A vending machine is a contract</strong></h4><h4><strong>Therefore: a smart contract is a contract</strong></h4><p>The problem is that vending machines are NOT contracts. From a legal perspective, vending machines are offers made to the world at large. An offer is not a contract — it is the preliminary stage that might lead to a contract if/when it is accepted. The offer is made by the vendor, who uses the machine to publicly display his goods. A contract is formed with whoever selects one of the options (candy? fizzy drink? The latter can be mixed with vodka…) and inserts the required sum. In principle, acceptance of the offer occurs by making the selection &amp; payment…</p><p>The vending machine automates the formation and the performance of a contract. It also ensures that transactions can occur in only one particular manner and, vandalism or malfunctions aside, guarantees that the fizzy drink is dispensed only to those who provide payment. Stating that vending machines are contracts is, however, 100% incorrect. So, if the point of departure is incorrect — then the whole subsequent analysis is, uhm, “unconvincing.”</p><p>“Something” that enables the automation of the formation and/or performance <em>of</em> a contract is very useful — but “it” is not a contract.</p><p>As an aside: the case law on vending machines confirm that it is ok to automate both the process of forming contracts and the process of performing contracts. The absence of direct human involvement is not a problem.</p><p><strong>“Self-enforcement”</strong></p><p>I suspect that the concept of “self-enforcement” might have been derived from the technical term “self-execution.” “Self-execution” refers to computer programs that autonomously (i.e. without the need for ongoing human input/instructions) change their state according to pre-defined rules. In this sense, “self-enforcement” denotes that the code operates irrespective of external circumstances and thus guarantees the achievement of the pre-programmed result.</p><p>Unfortunately, in some writings the meaning of “self-enforcement” resembles “performance.” For example, it is often claimed that the blockchain, “rather than any appendage of the state,” ensures performance. Such claims are non-sensical. Performance and enforcement concern two distinct stages in the life-cycle of a contract. You cannot combine them. Performance relates to the obligations arising from the contract and can only be “done” by the parties to this contract. Enforcement concerns the protection of performance.</p><p>Let’s further examine the legal concept of enforcement… After all, blockchains seek to replace traditional legal enforcement mechanisms so maybe some minimal understanding of the legal meaning of the term would be useful.</p><p>Contracts are, by definition, <em>enforceable</em> agreements. Enforcement is the act of compelling compliance with an obligation. In a legal context, enforcement is associated with the state-sanctioned protection of the parties’ economic interest in the performance of the contract.</p><p>(Attention: there is a difference between performance vs protection of performance, enforcement only concerns the latter!)</p><p>In practice, to enforce a contract means to go to some judge (or arbitrator) and ask for help:</p><p>“Your Honor! This no-good person refuses to [pay, deliver goods, fix defects, whatever this person promised to do].”</p><p>When parties enforce their contractual rights, they seek to obtain what was promised to them. In practice, however, courts rarely compel the contract-breaker to actually perform but, instead, they award damages for the loss resulting from non- or defective performance. The aim is to place the aggrieved party in the same position she/he would have been in had the contract been performed.</p><p><strong>The point is that in most instances:</strong></p><p><strong>enforcement = court gives you $$$ to compensate you for your loss resulting from non- or defective performance</strong></p><p>Of course, the parties can agree NOT to go to court and submit their disputes to private arbitration, that is (I am simplifying slightly) to specialized tribunals where a bunch of non-judges evaluate each parties’ claim and make decisions in the form of arbitral awards. The problem is that (in a nutshell) if one of the parties refuses to actually follow the instructions of the arbitral award — the assistance of the court is required to enforce the award. Back to square one. This can get pretty messy, especially in international transactions and you need a special lawyer to sort out this mess… (don’t come to me, I only do substantive contract law… but my cousin Motoko might be available.)</p><p>The point is: when things go bad, you need the assistance of a court in the jurisdiction where the contract breaker is located…</p><p>If we want to take an even broader approach to enforcement, one that does not involve courts or arbitrators, let’s think of situations where a group of shady individuals (think: tracksuits + tattoos) is engaged in clandestine exchanges of, say, illicitly distilled alcohol. (yum?) If anything goes bad in such transaction you can’t ask a judge for assistance. “Your honor, Marco/Darek/Igor failed to deliver [insert name of illegal substance], please help!”</p><p>You would all go to jail together. (that could be fun ….)</p><p>In such situations, contracts are not legally enforceable but “privately enforceable.” Given the shadiness of your transaction, you need to seek assistance outside of the law. So, you ask your friendly local Mafia boss to send a couple of dudes to encourage Marco/Darek/Igor to deliver whatever he promised to do (and to discourage Marco/Darek/Igor from talking to the police). (If you still do not get the idea of “private enforcement” watch The Godfather. All three parts. pronto.)</p><h4><strong>The point is: enforcement always requires a third-party.</strong></h4><h4><strong>No contract can enforce itself.</strong></h4><h4><strong>It’s like saying the vodka will drink itself.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*PDfTR3zRld_o4i38f5EFNA.jpeg" /><figcaption>this is vodka. (my private collection)</figcaption></figure><p>Trust me. Vodka never drinks itself. I drink it.</p><p>Which brings me to the next point. Just like contracts cannot enforce themselves, they also cannot perform themselves. Contracts are performed by the parties.</p><p>If somebody says that a “smart contract” will do something or “self-enforce” they are inadvertently admitting that “smart contracts” are not contracts. (and that the airbags in their lambos did not work…)</p><p>In sum: the enforcement of a contract requires third parties and only the parties to a contract can perform the obligations deriving from such contract.</p><p>As an aside: I do not quite understand why so many blockchain dudes ask me whether smart contracts are legally enforceable. Why do they care? Smart contracts are supposed to self-enforce and exist <em>outside</em> or (depending who you ask) <em>above</em> the law. So: if they self-enforce on the blockchain who cares whether they are legally enforceable…</p><h4><strong>If you do not care about the law, why do you worry if something is legally enforceable?</strong></h4><p>Moreover, if smart contracts prevent breach and/or guarantee performance — the need to enforce the contract should never arise… So why worry about it…</p><p>For full academic version, with fancy footnotes etc, see:</p><p><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3038406">Smart Contracts: Terminology, Technical Limitations and Real World Complexity</a></p><p><strong><em>Disclaimer: this blog is separate from my teaching position at the Faculty of Law, CUHK. All brilliant and not-brilliant views are mine.</em></strong></p><blockquote>Join Coinmonks<a href="https://t.me/coincodecap"> Telegram Channel</a> and<a href="https://www.youtube.com/c/coinmonks/videos"> Youtube Channel</a> learn about crypto trading and investing</blockquote><h4>Also, Read</h4><ul><li><a href="https://coincodecap.com/bookmap-review-2021-best-trading-software">Bookmap Review</a> |<a href="https://coincodecap.com/crypto-exchange-usa"> 5 Best Crypto Exchanges in the USA</a></li><li>The Best Crypto<a href="https://medium.com/coinmonks/hardware-wallets-dfa1211730c6"> Hardware wallet</a> |<a href="https://medium.com/coinmonks/bitbns-review-38256a07e161"> Bitbns Review</a></li><li><a href="https://coincodecap.com/crypto-exchange-in-singapore">10 Best Crypto Exchange in Singapore</a> |<a href="https://coincodecap.com/buy-axs-token"> Buy AXS</a></li><li><a href="https://coincodecap.com/red-dog-casino-review">Red Dog Casino Review</a> |<a href="https://coincodecap.com/swyftx-review"> Swyftx Review</a> |<a href="https://coincodecap.com/coingate-review"> CoinGate Review</a></li><li><a href="https://coincodecap.com/best-crypto-to-invest-in-india-in-2021">Best Crypto to Invest in India</a> |<a href="https://coincodecap.com/wazirx-p2p"> WazirX P2P</a> |<a href="https://coincodecap.com/hi-dollar-review"> Hi Dollar Review</a></li><li><a href="https://coincodecap.com/5-best-crypto-trading-bots-in-canada">Best Crypto Trading bots in Canada</a> |<a href="https://coincodecap.com/kucoin-review"> KuCoin Review</a></li><li><a href="https://coincodecap.com/best-crypto-books">10 Best Books on Crypto</a> |<a href="https://coincodecap.com/uk-trading-bots"> 5 Best Crypto Bots in the UK</a></li><li><a href="https://coincodecap.com/crypto-exchanges-in-germany">Best Crypto Exchanges in Germany</a> |<a href="https://coincodecap.com/arbitrum"> Arbitrum: A Layer 2 Solution</a></li><li><a href="https://coincodecap.com/binomo-review">Binomo Review</a> |<a href="https://coincodecap.com/stoic-vs-3commas-vs-tradesanta"> Stoic vs 3Commas vs TradeSanta</a></li><li><a href="https://coincodecap.com/capital-com-review">Capital.com Review</a> |<a href="https://coincodecap.com/crypto-lending-hong-kong"> Crypto Lending Platforms in Hong Kong</a></li><li><a href="https://coincodecap.com/uphold-card-review">Uphold Card Review</a> |<a href="https://coincodecap.com/trust-wallet-vs-metamask"> Trust Wallet vs MetaMask</a></li><li><a href="https://coincodecap.com/earn-sign-up-bonus">Earn Sign-up Bonus — 10 Best Crypto Platforms</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=358e2961d96f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/smart-contracts-clarifying-some-misunderstandings-358e2961d96f">Smart Contracts: Clarifying Some Misunderstandings</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are “Smart Contracts” Contracts?]]></title>
            <link>https://elizamik.medium.com/hello-judge-2afb32b5fd88?source=rss-42b301f74828------2</link>
            <guid isPermaLink="false">https://medium.com/p/2afb32b5fd88</guid>
            <category><![CDATA[smart-contract-blockchain]]></category>
            <category><![CDATA[smart-legal-contracts]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Eliza Mik]]></dc:creator>
            <pubDate>Wed, 09 Feb 2022 07:27:13 GMT</pubDate>
            <atom:updated>2022-02-15T02:23:53.897Z</atom:updated>
            <content:encoded><![CDATA[<h4>…or: why you should not feed cheese to your computer mouse…</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRA7zDwXzMNgjMsgUtF4XA.jpeg" /><figcaption>…grinning at my mate, Amr, who messed up his mouse with creamy camembert.</figcaption></figure><p>Can a “smart contract” be a contract in the legal sense, that is: can it be legally enforceable? We cannot address this question without knowing what a “smart contract” is and what a contract is.</p><p>Let’s start with “smart contracts.”</p><p>The US National Institute of Standards and Technology describes them as a “collection of code and data (sometimes referred to as functions and state) that is deployed using cryptographically signed transactions on the blockchain network.”</p><p>Those dudes are pretty smart so if they say a “smart contract” is a “collection of code,” they probably know what they are talking about.</p><p>But: the term “smart contract” has gained popularity with the development of the Ethereum blockchain, so maybe it is worth having a look the Ethereum.org website. It states:</p><p>“A “smart contract” is simply a program that runs on the Ethereum blockchain. It’s a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. Smart contracts are a type of Ethereum account. This means they have a balance and they can send transactions over the network. However they’re not controlled by a user, instead they are deployed to the network and run as programmed. User accounts can then interact with a smart contract by submitting transactions that execute a function defined on the smart contract. Smart contracts can define rules, like a regular contract, and automatically enforce them via the code.”</p><p>Ok. So it is a collection of code and a type of Ethereum account but “they define rules like a regular contract.” Interesting. I had no idea that regular contracts “define rules” but… I guess we could agree if we introduced heaps of clarifications and caveats and disregarded a large part of contractual doctrine… Nevermind.</p><p>Let’s continue…</p><p>One of the classic books on the topic, Mastering Ethereum, states:</p><p>“In the context of Ethereum, the term is actually a bit of a misnomer, given that Ethereum smart contracts are neither smart nor legal contracts, but the term has stuck. In this book, we use the term “smart contracts” to refer to immutable computer programs that run deterministically in the context of an Ethereum Virtual Machine as part of the Ethereum network protocol — i.e., on the decentralized Ethereum world computer.”</p><p>Vitalik Buterin observed that he regrets using the term “smart contract” for something that is a “persistent script.”</p><p>To complicate matters, technical writings (both academic and industry) contain dozens of inconsistent definitions/ descriptions of “smart contracts.” I mean: dozens.</p><p>Without a standard definition, it seems illogical to inquire <em>“are smart contracts contracts?”</em> as each <em>“</em>smart contract” must be analysed individually. Sometimes it looks like everybody&#39;s talking about a different thing. Especially when lawyers come into the picture. My question: why would we debate the legal character of a “persistent script”? How could “immutable computer programs” be contracts? Why would we want to use the analytical tools of contract law to examine computer programs?</p><h4><strong>Are we asking the right question(s)?</strong></h4><p>Maybe “smart contracts” are to contracts what computer mice are to rodents?</p><p>Now, let’s clarify what a contract is, in the legal sense. [Alert: boring.]</p><p>A contract is a legally enforceable agreement. An agreement is the product of two parties <em>intending </em>to be bound by their respective promises. Sometimes we also speak of “offer and acceptance.” The latter concepts are not, however, indispensable components of a contract but analytical tools used to determine the exact time or place a contact is formed.</p><p>Note that:</p><p>(0) The common law of contract is quite messy because — guess what. It developed in a decentralized fashion! There was no single, centralized wise dude who proclaimed the principles of contract law. It was more like, hundreds of dudes over hundreds of years in different locations that gradually created the principles of contract law in response to actual disputes. As decentralized and organic as it gets, baby. (Civil law jurisdictions are a bit different — they rely on Roman law and dudes in long dresses; this post is only about the Common Law of Contract).</p><p>(1) Contract law does not always clearly differentiate between enforceability and validity. A seemingly valid contract may be unenforceable due to the presence of so-called “vitiating factors,” like, economic duress, mistake or misrepresentation, as well as on grounds of illegality (think: Silk Road, where many transactions had an illegal subject matter). Also, a contract will not be enforceable if one or both parties have no contractual capacity (e.g. they are 10 years old or have brain damage because they crashed in their Lambos).</p><p>In principle, if you want your agreement to be a contract in the legal sense, you need two basic components:</p><p><strong>Intention + consideration</strong></p><p><strong>Intention</strong></p><p>The parties must intend to be legally bound. Usually, whether somebody intends to be legally bound depends on the context in which an interaction occurs or in which words are spoken. If it looks, objectively speaking, that you want to transact — the law automatically assumes that you have contractual intention. (To fully “get” this — you need to read about 500 pages of cases and attend hours of boring lectures. The theory is difficult, the practice is easy. If you want to buy stuff, the law will assume you want to contract and that you have the necessary intention.)</p><p>Next, intention must be manifested in some manner. This is simple in practice. The parties can express their intention in any way they want because contract law is indifferent to the manner or form of expressing intention. Subject to few exceptions, contracts need not be in writing or formalized in any manner. Many self-proclaimed “smart contract” gurus proclaim that contracts <em>in general</em> require notaries etc. Total nonsense. Very very few contracts require formalities — not to mention notaries. Also, there are no legal obstacles to expressing a contract in code. I address this issue here:</p><p><a href="https://elizamik.medium.com/can-we-express-contracts-in-code-de6e2b1f63b1">Can we express contracts in code?</a></p><p>In practice, most contracts are formed by conduct or orally. Think: malls, markets, supermarkets, ticketing machines, amazon etc.</p><p>You have been forming legal contracts all your life: buying groceries, lambos, laptops, drinks, tickets, houses, insurance etc. (and how often have you used a lawyer or a notary? just asking…)</p><p><strong>Consideration</strong></p><p>This is where things get complicated. Consideration emphasizes the reciprocal nature of contracts. It is something given in return. We contract to get something from the other party — think: dollars for stilettos or bitcoin for bubble gum. The stilettos are consideration for dollars and dollars are consideration for stilettos. Bitcoin is consideration for bubblegum and bubblegum is consideration for bitcoin. Each party has to provide consideration to the other.</p><p>For something to be a contract, it must have at least two parties and each of them must provide consideration to the other (there is one exception that&#39;s irrelevant here).</p><p>In the context of consideration, two questions arise: 1. “can crypto-assets be consideration?” and 2. “does the smart contract involve an exchange?”</p><p>Question 1: easy. Yes. Consideration need not be adequate; it only needs to be sufficient in the eyes of the law. In laymen’s terms: courts will (almost) never enquire whether the price adequately represents the value of the things being exchanged or whether a transaction makes commercial sense. Bitcoins or tokens can constitute valid consideration. I can exchange my Lambo for 1 ETH or for 1 dogecoin or for 100 USD. Perfectly fine in contract law — but you might get in trouble with the tax man (note I am using the word “exchange” not “sell” — a sale requires that the price be paid in fiat, tasty USD or CHF, not crypto…).</p><p>Question 2: hard. Contract law does not require equivalence of value — but it requires an exchange. One party does something or promises something to the other party and, <em>in return</em>, obtains a promise or an act from that party. Most contracts are bilateral in nature: two parties <em>make and receive</em> executory promises. Don’t be confused by the term “unilateral contract” — it does not mean that it is one sided or that it does not require an exchange. It only means that one party makes an executory promise <em>in return </em>for the doing of an act. (vending machines are offers in unilateral contracts — you accept the offer by payment.)</p><p>If, however, something is not given (or promised to be given) in return for something else, there is no contract. Why is this important? Because: if a “smart contract” does not involve reciprocity, questions of its enforceability are pointless. We are simply not dealing with something that can be analyzed as a contract.</p><p>Many smart contracts, seem to be unilateral transfer mechanisms: instructions of varying degrees of complexity to transfer some crypto from one account to another. Such transfer mechanism, to be clear, can facilitate the provision of consideration — if the consideration takes the form of cryptocurrencies of tokens. It is not. however, a contract.</p><p>For example: a credit card (issued by your evil bank) can be used to pay for stuff, including vodka. The card is a technology that facilitates payment, moving juicy dollars from one account to another. It helps you to provide your side of the bargain— payment for goods/services — but it is not a contract.</p><p>Unfortunately, the fact that contracts require or involve exchanges often passes unnoticed. Many of the existing implementations of “smart contracts” confirm that they are programs enabling the transfer of crypto-assets or, to be more technical, programs codifying the conditions of such transfer. Many “smart contracts” are really “just” apps executing on various blockchains… They “just sit there” and wait to be called… If you look at the “Mastering Ethereum” book, smart contracts are described as the back-end of dapps… and dapps can be anything: games, collectibles, investment schemes etc. Check out some dapps here:</p><p><a href="https://www.stateofthedapps.com/">State of the DApps - A list of 3,734 blockchain apps for Ethereum, Hive, EOS, and more</a></p><p>or maybe dig around <a href="https://etherscan.io/">https://etherscan.io</a> for some “smart contract” code…</p><p>Most importantly, contracts require 2 parties.</p><p>ZERO exceptions.</p><p>The “smart contract” itself cannot be a party. I think it is fair to assume that “smart contract” developers do not become parties just by creating a “smart contract” and deploying it in a live environment…</p><p>To be clear: I am not saying that “smart contracts” cannot be contracts in the legal sense. Theoretically, they could. All I’m saying is that, in practice, given what they <em>actually are</em> asking whether they can be contracts makes little sense… For something to be a contract, it needs to be an agreement first (clumsy sentence, sorry). How is a dapp an agreement?</p><p>If you want to inflict an entire paper upon yourself, here it is:</p><p><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3499998">Smart Contracts: A Requiem</a></p><p>It’s got all the references— and it has been peer reviewed.</p><p><strong><em>Disclaimer: this blog is separate from my teaching position at the Faculty of Law, CUHK. All brilliant and not-brilliant views are mine.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2afb32b5fd88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can we express contracts in code?]]></title>
            <link>https://elizamik.medium.com/can-we-express-contracts-in-code-de6e2b1f63b1?source=rss-42b301f74828------2</link>
            <guid isPermaLink="false">https://medium.com/p/de6e2b1f63b1</guid>
            <category><![CDATA[crypto-contracts]]></category>
            <category><![CDATA[contract-law]]></category>
            <category><![CDATA[code-is-law]]></category>
            <category><![CDATA[contracts-in-code]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Eliza Mik]]></dc:creator>
            <pubDate>Sun, 21 Mar 2021 09:13:25 GMT</pubDate>
            <atom:updated>2022-02-24T03:22:42.043Z</atom:updated>
            <content:encoded><![CDATA[<h3>Smart Contracts: can we express contracts in code?</h3><p>…or: Eliza sells lambo to Azmina who sells it to Agi = everyone’s happy…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dw4SNoSLXAehkiMnvVmElw.jpeg" /><figcaption>This is what an incredibly competent but evil legal intermediary looks like…</figcaption></figure><p>Problems concerning the enforceability of “smart contracts” usually boil down to one question:</p><p><strong>“can contracts be expressed in code?”</strong></p><p>Yes. They can.</p><p>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.</p><p>By the way: it is total nonsense that contracts must be notarised. This is an absolute exception (concerns property transfers in some jurisdictions)…</p><p>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 <em>need to be</em> — involved…</p><p>The ongoing debate concerning the enforceability of “smart contracts” (which are, by definition, expressed in code) stems from the failure to distinguish between the <em>substance</em> of the contract, i.e. the rights and obligations agreed by the parties, and its <em>expression</em>, 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…</p><p>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.</p><p>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 <em>our</em> time.</p><p>Technically, courts do not enforce contracts but <em>individual contractual obligations.</em> 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”).</p><p>The contract <em>as a whole</em> 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 <em>described</em> in such clause or term. The problem: often one obligation is described in multiple clauses…</p><p>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.</p><p>But….</p><p><strong>Contracts in Arabic</strong></p><p>You will ask: can agreements be expressed in code, if the parties do not understand them?</p><p>Yes.</p><p><em>Totally counterintuitive</em> 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)…</p><p>Let’s get back to pure contract law.</p><p>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.</p><p>Assuming that:</p><p>a) both Eliza and Azmina have contractual capacity,</p><p>b) there are no vitiating factors (such as mistake or mental incapacity or being extremely drunk)</p><p>c) the subject matter is legal (Lambos are legal — and so are British Pounds!)</p><p>the contract expressed in Arabic (“Arabic contract”) is legally enforceable.</p><p>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.</p><p>Let’s consider two variations:</p><p>(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.</p><p>(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.)</p><p>In both instances, the contract is enforceable because <em>in theory</em> 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.</p><p>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!”</p><p>Of course, <em>in practice</em> 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 <em>procedural </em>&amp; <em>evidentiary</em> 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…</p><p>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.</p><p>To repeat: contract law does not care about the manner of expressing agreement. The contractual document <em>provides evidence</em> of the parties’ rights and obligations — but <em>it does not create them!!!</em> Of course, the manner of expression affects the difficulty of establishing <em>what</em> has been agreed.</p><p>This a problem of proof, not enforceability.</p><p>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.</p><p>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.</p><p>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?</p><p>But we have only cleared some ground… what happens when contracts are actually expressed in code?</p><p>For the academic, peer-reviewed version: <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3499998">https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3499998</a></p><p>Ps. Azmina and Eliza remain friends. Azmina managed to sell the lambo to Agi. Agi needed to create some juicy tax losses…</p><p><strong><em>Disclaimer: this blog is separate from my teaching position at the Faculty of Law, CUHK. All brilliant and not-brilliant views are mine…</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de6e2b1f63b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>