ON TIME BUSINESS MANAGEMENT, A+ WORK, ON TIME, NO PLAGARIZING; ON TIME
A Contract Law Approach for the Treatment of Smart Contracts’ ‘Bugs’
Evripidis RIZOS *
Abstract: This article attempts to derive some principles concerning the legal treat- ment of bugs in smart contracts, namely errors in the smart contract code which may result to some unwanted or unexpected outcome at the execution of the contract. Before dealing with this main issue, the article concludes that despite the practical issues that arise concerning the application of traditional contract law rules and principles, these rules remain relevant, and that a smart contract is typically (but not necessarily) a mere tool for the performance of the contract and not a legal contract itself. Therefore, typically, bugs in smart contracts should be examined under the doctrines of the breach of contract and/or the unfair enrichment and not as reasons for any potential invalidity of the contract. Only in (rather unlikely cases) where a smart contract could be indeed perceived as the body of the legal contract itself, printing errors in the code or other expressional mistakes concerning the semantics of the code (albeit not its function) could be perceived as potential reasons for the invalidity of the contract, according to the relevant rules of each jurisdiction. Nevertheless, even in these cases, interpretation of the contract with objective standards should not be ruled out, even when the contract is concluded by means of artificial intelligence (AI). The article examines also contrib- utory negligence issues.
Zusammenfassung: Dieser Beitrag versucht, einige Prinzipien bezüglich der rechtlichen Handlung bzw. Beurteilung von den sog. ‘Smart Contracts Bugs’, d.h. von Fehlern im Smart Contract Code, zu gewinnen, wessen Fehler zu einem unerwarteten oder unerwünschten Ergebnis bei der Vertragserfüllung führen können. Vor der Handlung dieser Hauptfrage schließt der Beitrag trotz der praktischen Fragen bezüglich der Anwendung von den Prinzipien bzw. Regeln des traditionellen Vertragsrechts, dass diese Prinzipien bzw. Regeln noch relevant bleiben und dass ein Smart Contract nur ein Mittel für die Vertragserfüllung, aber keinen Vertrag im rechtlichen Sinne darstellt. Deshalb sind die Smart Contracts Bugs normalerweise mithilfe der Vertragsverletzungslehre und/oder der Lehre der ungerechtfertigten Bereicherung zu untersuchen, aber nicht als Ursachen einer möglichen Vertragsunwirksamkeit zu betrachten. Nur in (vielmehr unwahrscheinlichen) Fällen, in denen ein Smart Contract selbst tatsächlich als ein Vertrag im rechtlichen Sinne zu betrachten ist, sind Tippfehler oder andere Ausdrucksfehler bezüglich der Code- Semantik (aber nicht bezüglich der Code-Funktion) als mögliche Ursachen der Vertragsunwirksamkeit einzuordnen, was allerdings von den einschlägigen Regeln und Prinzipien jeder individuellen Rechtsordnung abhängt. Eine objektive Vertragsauslegung ist auch in den letzten Fällen nicht auszuschließen, auch wenn der Vertrag mittels künstlicher Intelligenz abgeschlossen wird. Am Ende untersucht der Beitrag Fragen des Mitverschuldens.
* Assistant Professor, Law Faculty, Aristotle University Thessaloniki. The final version of this contribution was submitted on 29 June 2022. Email: [email protected].
European Review of Private Law 5-2022 [775–802] © 2022 Kluwer Law International BV, The Netherlands.
775
Résumé: Cet article vise à déterminer quelques principes concernant le traitement juridique de bogues dans des contrats intelligents (bugs in smart contracts), principale- ment des erreurs dans le code du contrat intelligent pouvant conduire à certains résultats indésirables ou inattendus lors de l’exécution du contrat. Avant de traiter cette question centrale, l’article indique que malgré les questions pratiques qui se posent concernant l’application de règles et de principes du droit traditionnel des contrats, ces règles demeurent toutefois nécessaires et qu’un contrat intelligent est généralement (mais pas nécessairement) un simple instrument d’exécution du contrat mais n’est pas lui-même un contrat juridique. Dès lors, en règle générale, les bogues dans les contrats intelligents devraient être examinés selon les principes de la violation du contrat et/ou de l’enrichissement sans cause et non comme des causes de quel- conque nullité éventuelle du contrat. Seulement dans les cas (assez improbables) où un contrat intelligent pourrait être en effet considéré comme le corps du contrat juridique lui-même, des erreurs d’impression dans le code ou d’autres fautes expressives concer- nant la sémantique du code (quoique n’étant pas sa fonction) pourraient être considérées comme causes éventuelles de nullité du contrat, selon les règles applicables de chaque instance compétente. Néanmoins, même dans ces cas, il ne faudrait pas écarter l’interprétation du contrat par des normes objectives, même lorsque le contrat est conclu au moyen de l’intelligence artificielle. L’article examine aussi les questions de négligence contributive.
Keywords: Subrogation, causa, causa acquirendi, termination of debt, third party, third party payments
Stichwörter: Subrogation (persönliche Surrogation), causa, causa acquirendi, Tilgungswirkung, der Dritte, Drittleistung
Mots-clés: contrats intelligents, bogues, violation du contrat, enrichissement sans cause, doctrine de l’erreur.
1. Introductory Remarks
1. The smart contracts have drawn extensively the attention of legal scholar- ship in the last five years. Mostly discussed are the issues concerning their legal classification, 1 issues that arise due to their function (for example issues
1 K. WERBACH & N. CORNELL, ‘Contracts ex Machina’, 67. DLJ (Duke Law Journal) 2017, pp 313– 382; P. CUCCURU, ‘Beyond Bitcoin: An Early Overview on Smart Contracts’, 25. Int. J. Law Inf. Technol. (International Journal of Law and Information Technology) 2017, pp 179–195; J.J. SZCZERBOWSKI, Place of Smart Contracts in Civil Law. A Few Comments on Form and Interpretation, Proceedings of the 12th Annual Scientific Conference NEW TRENDS 2017, published by Private College of Economic Studies Znojmo (9 Nov. 2017), pp 333–338, https:// ssrn.com/abstract=3095933 (accessed 22 Jun. 2022); M. DUROVIC & A. JANSSEN, ‘The Formation of Blockchain-based Smart Contracts in the Light of Contract Law’, 26. ERPL (European Review of Private Law) 2018, pp 753–772; L.A. DIMATTEO & C. PONCIBÒ, ‘Quandary of Smart Contracts and Remedies: The Role of Contract Law and Self-Help Remedies’, 26. ERPL (European Review of Private Law) 2018, pp 805–824; J.G. ROHR, ‘Smart Contracts and Traditional Contract Law, or:
776
regarding their inflexibility2 or the need to interact with the offline world3), their capacity or suitability to perform certain economic or contractual functions,4 their economic and legal potential,5 regulatory issues and legislative
The Law of the Vending Machine’, 67. Clev. St. L. Rev. (Cleveland State Law Review) 2019, pp 71–91; R. DE CARIA, ‘Blockchain and Smart Contracts: Legal Issues and Regulatory Responses between Public and Private Economic Law’, 6. ItaLJ (Italian Law Journal) 2020, pp 363–379; R. HERIAN, ‘Smart contracts: a remedial analysis’, 30. I&CTL (Information & Communications Technology Law) 2021, pp 17–34. See also Ε. TJONG TJIN TAI, ‘Force Majeure and Excuses in Smart Contracts’, 26. ERPL (European Review of Private Law) 2018, pp 787–804; M. DUROVIC & F. LECH, ‘The Enforceability of Smart Contracts’, 5. ItaLJ (Italian Law Journal) 2019, pp 493– 512. In the German-speaking scholarship, see C. JACOBS & C. LANGE-HAUSSTEIN, ‘Blockchain und Smart Contracts: zivil- und aufsichtsrechtliche Bedingungen. Funktionen, Anwendungsfälle, Perspektiven der Blockchain-Technologie’, ITBR (IT-Rechtsberater) 2017, pp 10–15; C. BUCHLEITNER & T. RABL, ‘Blockchain und Smart Contracts’, Ecolex 2017, pp 4–14; M. KAULARTZ
& J. HECKMANN, ‘Smart Contracts – Anwendungen der Blockchain-Technologie’, 32. CR (Computer und Recht) 2016, pp 618–624; M. HECKELMANN, ‘Zulässigkeit und Handhabung von Smart Contracts’, 71. NJW (Neue Juristische Wochenschrift) 2018, pp 504–510; U. BERTRAM, Praxisrelevante Fragen zu Vertragsabschluss, Leistungsstörungen und Auslegung’, 72. MDR (Monatschrift für Deutsches Recht) 2018, pp 1416–421; D.K. KIPKER, P. BIRRECK, M. NIEWÖHNER
& T. SCHNORR, ‘Rechtliche und technische Rahmenbedingungen der „Smart Contracts“’, 23. MMR (Multimedia und Recht) 2020, pp 509–513; N. KUPKA, ‘Die Vereinbarkeit von Smart Contracts in der Blockchain mit § 103 InsO’, 43. ZIP (Zeitschrift für Wirtschaftsrecht) 2021, pp 837–842.
2 J.M. SKLAROFF, ‘Smart Contracts and the Cost of Inflexibility’, 166. U.Pa.L.Rev. (University of Pennsylvania Law Review), 2017, pp 263–iv. See also J.G. ALLEN, ‘Wrapped and Stacked: “Smart Contracts and the Interaction of Natural and Formal Language”’, 14. ERCL (European Review of Contract Law) 2018, pp 307–343; O. MEYER, ‘Stopping the Unstoppable: Termination and Unwinding of Smart Contracts’, 9. EuCML (Journal of European Consumer and Market Law) 2020, pp 17–24.
3 J. FRANKENREITER, ‘The limits of Smart Contracts’, 175. JITE (Journal of Institutional and Theoretical Economics) 2019, pp 149–161. See also E.D. CHASON, ‘Smart Contracts and the Limits of Computerized Commerce’, 99. Neb. L. Rev. (Nebraska Law Review) 2020, pp 330–374.
4 See P. RYAN, ‘Smart Contract Relations in e-Commerce: Legal Implications of Exchanges Conducted on the Blockchain’, 7. TIM Review (Technology Innovation Management Review) 2017, pp 14–20; A.J. KOLBER, ‘Not-So-Smart Blockchain Contracts and Artificial Responsibility’, 21. STLR (Stanford Technology Law Review) 2018, pp 198–234; C. VAN DER ELST & A. LAFARRE, ‘Blockchain and Smart Contracting for the Shareholder Community’, 20. EBOR (European Business Organization Law Review) 2019, pp 111–137; B. PASA & L.A. DIMATTEO, ‘Observations on the Impact of Technology on Contract Law’, in L.A. DIMATTEO, M. CANNARSA & C. PONCIBÒ (eds), The Cambridge Handbook of Smart Contracts, Blockchain Technology and Digital Platform (Cambridge University Press, Cambridge 2019), pp 334–358; T. CUTTS, ‘Smart contracts and consumers’, 122. WVLR (West Virginia Law Review) 2019, pp 389–446; T. SCHREPEL, ‘Collusion by Blockchain and Smart Contracts’, 33. Harv. J. L. & Tech. (Harvard Journal of Law and Technology) 2019, pp 117–166; M. VERSTRAETE, ‘The Stakes of Smart Contracts’, 50. Loy. U. Chi. L.J. (Loyola University Chicago Law Journal) 2019, pp 743–796; F. GHODOOSI, ‘Contracting in the Age of Smart Contracts’, 96. Wash. L. Rev. (Washington Law Review) 2021, pp 51–92; E. LINDNER, ‘Der programmierte Mietvertrag’, 24. NZM (Neue Zeitschrift für Miet- und Wohnungsrecht) 2021, pp 665–672.
5 J.A.T. FAIRFIELD, ‘Smart Contracts, Bitcoin Bots, and Consumer Protection’, 71. Wash. Lee L. Rev. Online (Washington and Lee Law Review Online) 2014, pp 35–50; P. PAECH, ‘The Governance of
777
prospects6 etc. An issue that has drawn the attention of the legal literature,7 but it is usually approached in a rather cautious manner,8 is the issue of the so-called
Blockchain Financial Networks’, 80. MLR (The Modern Law Review) 2017, pp 1073–1110; O. BORGOGNO, ‘Smart Contracts as the (new) Power of the Powerless? The Stakes for Consumers’, 26. ERPL (European Review of Private Law) 2018, pp 886–902; J. JIANG, ‘The Normative Role of Smart Contracts’, 15. UCLR (US-China Law Review) 2018, pp 139–149; D.A. LARSON, ‘Mitigating Risky Business: Modernizing Letters of Credit with Blockchain, Smart Contracts, and the Internet of Things’, 2018. Mich. St. L. Rev (Michigan State Law Review) 2018, pp 929–986; J. LINGWALL & R. MOGALLAPU, ‘Should Code be Law? Smart Contracts, Blockchain and Boilerplate’, 88. UMKC Law Rev. (University of Missouri – Kansas City Law Review) 2019, pp 285–302; H. EENMAA- DIMITRIEVA & M.J. SCHMIDT-KESSEN, ‘Creating markets in no-trust environments: The law and economics of smart contracts’, 35. CLSR (Computer Law and Security Review) 2019, pp 69–88; S.N. SANCHEZ, ‘The Implementation of Decentralised Ledger Technologies for Public Procurement: Blockchain Based Smart Public Contracts’, 14. EPPPL (European Procurement & Public Private Partnership Law Review) 2019, pp 180–196; D. D’ONFRO, ‘Smart Contracts and the Illusion of Automated Enforcement’, 61. Wash. U. J. L. Pol’y (Washington University Journal of Law & Policy) 2020, pp 173–192; K. ESCHENBRUCH & R. GERSTBERGER, ‘Planungs-, Bau- und Immobilienverträge als Programm?’, 19. NZBau (Neue Zeitschrift für Baurecht und Vergaberecht) 2018, pp 3–8.
6 A. WRIGHT & P. FILIPPI, Decentralized Blockchain Technology and the rise of Lex Cryptographia (2015), https://ssrn.com/abstract=2580664 (accessed 22 Jun. 2022); C. REYES, ‘Conceptualizing Cryptolaw’, 96. Neb. L. Rev. (Nebraska Law Review) 2017, pp 384–445; C.R. YOUNG, ‘A Lawyer’s Divorce: Will Decentralized Ledgers and Smart Contracts Succeed in Cutting Out the Middleman’, 96.Wash. U. L. Rev. (Washington University Law Review) 2018, pp 649–679; K. WERBACH, ‘Trust, but Verify: Why the Blockchain needs the Law’, 33. BTLJ (Berkeley Technology Law Journal) 2018, pp 487–550; L.D. MUKA TSHIBENDE, ‘Contract Law and Smart Contracts: Property and Security Rights Issues’, 26. ERPL (European Review of Private Law) 2018, pp 871–883; R. BROWNSWORD, ‘Regulatory Fitness: Fintech, Funny Money, and Smart Contracts’, 20. EBOR (European Business Organization Law Review) 2019, pp 5–27; G.M. COLE, ‘The Long Convergence: Smart Contracts and the Customization of Commercial Law’, 92. S. Cal. L. Rev. (Southern California Law Review) 2019, pp 851–896; M.N. TEMTE, ‘Blockchain Challenges Traditional Contract Law: Just How Smart Are Smart Contracts’, 19. Wyo. Law Rev. (Wyoming Law Review) 2019, pp 87–118; R. DE CARIA, 6. ItaLJ 2020, pp 363–379.
7 C.M. CHRISTOPHER, ‘Error Correction Mechanisms for Transactional Script Smart Contracts’, 69. U. Kan. L. Rev. (University of Kansas Law Review) 2021, pp 493–526; A. LESLEY, ‘Unravelling Smart Contracts: Smart Contracts and the Law of Rescission in Canada’, 19. Asper Rev. Int’l Bus. And Trade L. (Asper Review of International Business and Trade Law) 2019, pp 164–166; R. HERIAN, 30. I&CTL 2021, pp 27–29.
8 See e.g., A. SAVELYEV, ‘Contract law 2.0: “Smart” contracts as the beginning of the end of classic contract law’, 26. I&CTL (Information & Communications Technology Law) 2017, p 126 who, in face of the bugs in smart contracts, submits that ‘this vulnerability probably needs to be addressed by the newly developed rules on interpretation of such contracts’. See also S. MCLEAN & S. DEANE- JOHNS, ‘Demystifying Blockchain and Distributed Ledger Technology – Hype or Hero? Blockchain’s potential of transforming business and its legal and regulatory implications’, 17. CRi (Computer Law Review International) 2016, p 101; K. WERBACH & N. CORNELL, 67. DLJ 2017, p 365; L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 813; M. CANNARSA, ‘Interpretation of Contracts and Smart Contracts: Smart Interpretation or Interpretation of Smart Contracts?’, 26. ERPL (European
778
‘bugs’ that may appear in the code of a smart contract and of their potential legal treatment. In the software engineering slang, the term ‘bug’ is used to describe any coding flaw, which may lead to a software malfunction. Since smart contracts are in fact software codes, the possibility of coding errors is significantly larger than a non- expert might have thought. This article aims to set some criteria for the legal treatment of these bugs using and comparing, when necessary, rules and principles from common and civil law legal systems (mainly the English and German ones) and from international legislative texts (such as the United Nations Convention on Contracts for the International Sale of Goods (CISG)). The main issue concerning the principles for the legal treatment of bugs in smart contracts is the perspective under which bugs are to be perceived. Could they have an impact on the legal validity of the contract (if there is indeed a legal contract) or are they to be seen as causes of breach of contract and/or restitutional remedies in cases of allocations of resources that exceed the contractual agreement? This question cannot nonetheless be answered without a prior answer to the fundamental questions of the legal nature of smart contracts and their role to the parties’ contractual relationship and of their interpretation (if such an interpretation is possible at all).
Chapter 1 introduces the concept of a smart contract ‘bug’ and its poten- tial effects on the execution of the contract. On this matter, modern research on the field of smart contract bugs from a software engineering perspective is being taken into account. Chapter 1 sets also the framework, within which the issue of the legal treatment of these bugs is approached. Chapter 2 discusses the two main preliminary issues, namely whether contract law is relevant as far as smart con- tracts are involved and whether smart contracts are contracts themselves from a legal perspective or merely a tool for the performance of a legal contract. Chapter 3 examines the main issues of this article, i.e., the principles for the legal treatment of bugs in a smart contract, based on the findings of the previous chapters. Finally, Chapter 4 analyses issues concerning the defence of contribu- tory negligence, with respect to claims for damages due to bugs in smart contracts.
2. Definition and Potential Legal Relevance of Smart Contract Bugs
2.1. Definition and Types of Smart Contracts
2. Even today there is no consensus on the exact definition of a smart contract,9
while there have been also voices for the adoption of other terms, such as
Review of Private Law) 2018, p 778; A. GUADAMUZ, ‘All watched over by machines of loving grace: A critical look at smart contracts’, 35. CLSR (Computer Law & Security Review) 2019, p 11; U. BERTRAM, 72. MDR 2018, p 1421.
9 See O. MEYER, 9. EuCML 2020, p 17; R. DE CARIA, ‘Definitions of Smart Contracts. Between Law and Code’, in L.A. DIMATTEO, M. CANNARSA & C. PONCIBÒ (eds), The Cambridge Handbook of Smart
779
‘transactional script’.10 The term ‘smart contract’ was introduced by Nick Szabo in 1994, who defined smart contracts as ‘computerized transaction protocols that execute terms of a contract’.11 After the appearance of the blockchain, the concept of the smart contract gained much more attention, as the blockchain offers great potential for smart contract applications.12 The points of interest seem to be mainly two. First, whether an attachment to a blockchain (i.e., a decentralized, peer-to-peer network which monitors a digital ledger, while each node of this network holds a copy of the smart contract and no node alone may modify its code13) is a conceptual and functional prerequisite to a smart contract14 or not.15 Second, whether the concept of ‘smart contract’ requires the use of smart contracts in some legally relevant context16 or not.17 For example, according to a definition by software engineers ‘smart contracts are Turing-complete programs that run on the blockchain, in which consensus proto- col ensures their correct execution’18; thus, accordingly a blockchain is necessary, while the use of a smart contract in a legally relevant context is not.
Contracts, Blockchain Technology and Digital Platforms (Cambridge University Press, Cambridge 2019), p 21; R. HERIAN, 30. I&CTL 2021, p 19.
10 C.M. CHRISTOPHER, 69. U. Kan. L. Rev. 2021, pp 499–500. For the suggestion that the term ‘smart contract is a misnomer’ see M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 757.
11 N. SZABO, Smart Contracts (1994), ht tps://www.fon.hum.uva.n l/rob/Courses/ InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart.con tracts.html (accessed 21 Jan. 2022). See also H. SURDEN, ‘Computable Contracts’, 46. UC Davis Law Rev. (University of California Davis Law Review) 2012, pp 629–700.
12 J. FRANKENREITER, 175. JITE 2019, p 152; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 757; S. AGNIKHOTRAM & A. KOUROUTAKIS, ‘Doctrinal Challenges for the Legality of Smart Contracts: Lex Cryptographia or a New, Smart Way to Contract’, 19. JHTL (Journal of High Technology Law) 2019, p 302; M.N. TEMTE, 19. Wyo. Law Rev. 2019, p 95. For the evolution of smart contracting see also K. WERBACH & N. CORNELL, 67. DLJ 2017, pp 319–338.
13 See K. WERBACH & N. CORNELL, 67. DLJ 2017, pp 325 ff.; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 758.
14 A. SAVELYEV, 26. I&CTL 2017, p 121; M. CANNARSA, 26. ERPL 2018, p 776; O. BORGOGNO, 26. ERPL 2018, p 886; C.R. YOUNG, 96. Wash. U. L. Rev. 2018, p 654; J. JIANG, 15. UCLR 2018, p 140; J.G. ROHR, 67. Clev. St. L. Rev. 2019, p 72.
15 M. RASKIN, ‘The Law and Legality of Smart Contracts’, 1. GLTR (Georgetown Law Technology Review) 2017, p 309; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 756; J.G. ALLEN, 14. ERCL 2018, p 313; S. GEIREGAT, ‘Cryptocurrencies are (smart) contracts’, 34. CLSR (Computer Law & Security Review) 2018, p 1148; M.K. WOEBBEKING, ‘The Impact of Smart Contracts on Traditional Concepts of Contract Law’, 10. JIPITEC (Journal of Intellectual Property, Information Technology and Electronic Commerce Law) 2019, p 106; H. EENMAA-DIMITRIEVA & M.J. SCHMIDT-KESSEN, 35. CLSR 2019, p 71; O. MEYER, 9. EuCML 2020, p 18; C.M. CHRISTOPHER, 69. U. Kan. L. Rev. 2021, p 495; C. JACOBS & C. LANGE-HAUSSTEIN, ITBR 2017, p 12.
16 M. RASKIN, 1. GLTR 2017, p 309; J.G. ALLEN, 14. ERCL 2018, p 313; S. GEIREGAT, 34. CLSR 2018, p 1148.
17 A. SAVELYEV, 26. I&CTL 2017, p 127. See also A. GUADAMUZ, 35. CLSR 2019, p 6. 18 J. CHEN, X. XIA, D. LO, J. GRUNDY, X. LUO & T. CHEN, ‘Defining Smart Contract Defects on
Ethereum’, 48. IEEE TSE (IEEE Transactions on Software Engineering) 2022, p 327.
780
3. So far, there are some statutory definitions of smart contracts, mostly in the legislation of some American States (for example according to the definition in the legislation of Arizona, a smart contract ‘means an event-driven program, with state, that runs on a distributed, decentralized, shared and replicated ledger and that can take custody over and instruct transfer of assets on that ledger’19), while only few European countries (such as Italy,20 Malta21 and Belarus22) have adopted a statutory definition. In general, some consensus could be discerned that a smart contract is a computer code with certain self- executing qualities23 based on certain conditions that trigger its self-execution,- 24 and what is described as a ‘smart contract’ typically runs on a blockchain.25
Furthermore, from a legal perspective, self-executing computer programs may be of legal significance when they automate the execution of some legally relevant agreement, mainly by distributing automatically resources,26 according to some predefined conditions.27
4. Therefore, from a blockchain perspective, one could distinguish between smart contracts in a broad sense (lato sensu), as they were initially defined by Szabo, a concept which focuses on the automation of the execution mechanism and does not contain the blockchain as a conceptual element, and smart contracts in a narrow sense (stricto sensu), where residence on a blockchain is indeed conceptually necessary.28 With respect to their use in a legally relevant context, one could distinguish between smart contracts, which are not used for purposes of performing a legally relevant agreement29 and those which are used for such purposes and
19 Arizona Revised Statutes, §§ 44–7061 (2021). See also F. GHODOOSI, 96. Wash. L. Rev. 2021, p 61. 20 See M. DUROVIC & F. LECH, 5. ItaLJ 2019, p 501. 21 See R. DE CARIA, in The Cambridge Handbook of Smart Contracts, p 23. 22 See L. EFIMOVA, O. SIZEMOVA & A. CHIRKOV, ‘Smart contracts: Between freedom and strict legal
regulation’, 30. I&CTL (Information & Communications Technology Law) 2021, p 349. 23 M. RASKIN, 1. GLTR 2017, p 309; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 756; M. CANNARSA, 6.
ERPL 2018, p 776; O. BORGOGNO, 26. ERPL 2018, p 894. 24 R. UNSWORTH, ‘Smart Contract This! An Assessment of the Contractual Landscape and the
Herculean Challenges it. Currently Presents for “Self-executing” Contracts’, in M. CORRALES, M. FENWICK & H. HAAPIO (eds), Legal Tech, Smart Contracts and Blockchain (Springer, Singapore 2019), p 20.
25 S. GRUNDMANN & P. HACKER, ‘Digital Technology as a Challenge to European Contract Law’, 13. ERCL (European Review of Contract Law) 2017, p 285; J. FRANKENREITER, 175. JITE 2019, p 152; G.M. COLE, 92. S. Cal. L. Rev. 2019, p 860; T. CUTTS, 122. WVLR 2019, p 404. See also C.M. CHRISTOPHER, 69. U. Kan. L. Rev. 2021, p 499.
26 See A. GUADAMUZ, 35. CLSR 2019, pp 6–8. 27 A. SAVELYEV, 26. I&CTL 2017, p 122; M. RASKIN, 1. GLTR 2017, p 313; J. FRANKENREITER, 175. JITE
2019, p 156. 28 See R.H. WEBER, ‘Liability in the Internet of Things’, 3. EuCML (Journal of European Consumer
and Market Law) 2017, p 209. 29 See M.K. WOEBBEKING, 10. JIPITEC 2019, p 108; O. MEYER, 9. EuCML 2020, p 18.
781
could be described as legally relevant smart contracts.30 The stricto sensu legally relevant smart contracts are the ones that have mostly drawn the attention of the legal scholarship and this article focuses on them.
2.2. Definition of Smart Contract ‘Bugs’
5. Under the general term ‘software bugs’ are understood any flaws or errors in a software code, which may possibly lead to a software malfunction with respect to its intended and/or desired functions. For example, a bug might lead to a software performance failure, or to a non-intended software performance or may potentially allow security breaches. Common software bugs are usually easily fixed (‘debugged’), and they are of rather little legal importance.
Nonetheless, things seem to differ with respect to smart contracts from a functional perspective. Even in this respect, a smart contract bug may be defined as ‘an error, flaw or fault in a smart contract that causes it to produce an incorrect or unexpected result, or to behave in unintended ways’.31 Nevertheless, since smart contracts typically run on a blockchain, their developer cannot alter the code or perform any debugging whatsoever due to the technical nature and function of blockchains. Therefore, they are (almost) immutable,32 and for this reason recent empirical research on the field of software engineering points out that there should be no bugs when they start to operate, since any errors can hardly be corrected.33
6. There is no lack of empirical research on the field of smart contract bugs from a software engineering perspective.34 Software engineers have put a lot of
30 See also H. EENMAA-DIMITRIEVA & M.J. SCHMIDT-KESSEN, 35. CLSR 2019, p 71. 31 J. CHEN, X. XIA, D. LO, J. GRUNDY, X. LUO & T. CHEN, 48 IEEE TSE 2022, p 327. 32 J.M. SKLAROFF, 166. U.Pa.L.Rev. 2017, p 273. 33 J. CHEN, X. XIA, D. LO, J. GRUNDY, X. LUO & T. CHEN, 48. IEEE TSE 2022, pp 327–345; P. ZHANG, F.
XIAO & X. LUO, ‘A Framework and DataSet for Bugs in Ethereum Smart Contracts’, in L.O’CONNER
(ed.), Proceedings of 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME 2020) (The Institute of Electrical and Electronics Engineers, Los Alamitos, Washington & Tokyo 2020), pp 139–150.
34 B. JIANG, Y. LIU & W.K. CHAN, ‘ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detection’, in M. HUCHARD, C. KÄSTNER & G. FRASER (eds), ASE’18 Proceedings of the 33rd ACM/ IEEE International Conference on Automated Software Engineering (The Association for Computing Machinery, New York 2018), pp 259–269; C. LIU, H. LIU, Z. CAO, Z. CHEN, B. CHEN
& B. ROSCOE, ‘ReGuard: Finding Reentrancy Bugs in Smart Contracts’, in M. CHAUDRON, I. CRNKOVIC, M. CHECHIK & M. HARMAN (eds), Proceedings of the 40th International Conference on Software Engineering: Companion Proceedings, ICSE 2018, Gothenburg, Sweden, May 27–June 03 (The Association for Computing Machinery, New York 2018), pp 65–68; Z. WANG, H. JIN, W. DAI, K.K.R. CHOO & D. ZOU, ‘Ethereum smart contract security research: Survey and future research opportunities’, 15. Front. Comp. Sci. (Frontiers of Computer Science) 2021, p 152802; C.F. TORRES, J. SCHÜTTE & R. STATE, ‘Osiris: Hunting for Integer Bugs in Ethereum Smart Contracts’, in ACSAC
782
effort on conceptualizing, detecting, and categorizing bugs in the existing smart contracts and their programming causes, although there are yet voices of con- cern about the lack of general criteria for the detection of smart contract bugs.35
According to one of the most astonishing findings in one of these empirical studies, 99.82% of the researched smart contracts contained at least one bug, albeit the number of bugs that could actually lead to an unintended or undesired allocation of resources is significantly lower.36 This research also pointed out that there are some hardly to overcome difficulties concerning the detection of certain bugs.37
Conclusions that could be drawn from the empirical research on this subject is that coding errors are to be found in a smart contract much more often than lawyers might expect38 and that even detecting them could be a hard task.
2.3. Legal Relevance of Smart Contract Bugs
7. Not all smart contract bugs are legally relevant, even if they are related to a legal contract. For example, bugs that concern the availability or reusability of a smart contract might not be of legal significance if the bug prevents only the presentation of the smart contract to anyone who might be interested in it. Moreover, security bugs that leave the contract vulnerable to external attacks or to exploitation by a party may not affect the performance of a specific smart
‘18: Proceedings of the 34th Annual Computer Security Applications Conference (The Association for Computing Machinery, New York 2018), pp 664–676; C. COLOMBO, J. ELLUL & G. PACE, ‘Contracts over Smart Contracts: Recovering from Violations Dynamically’, in T. MARGARIA & B. STEFFEN (eds), Leveraging Applications of Formal Methods, Verification and Validation, Industrial Practice. 8th International Symposium, ISoLA 2018, Limassol, Cyprus, November 5–9, 2018 Proceedings, Part IV, (Springer, Cham 2018), pp 300–315; J. CHEN, X. XIA, D. LO, J. GRUNDY, X. LUO & T. CHEN, 48. IEEE TSE 2022, pp 327–345; W. DINGMAN, A. COHEN, N. FERRARA, A. LYNCH, P. JASISNKI, P. BLACK & L. DENG, ‘Defects and Vulnerabilities in Smart Contracts, a Classification using the NIST Bugs Framework’, 7. IJNDC (International Journal of Networked and Distributed Computing) 2019, pp 121–132; T. DURIEUX, J. FERREIRA, R. ABREU & P. CRUZ, ‘Empirical Review of Automated Analysis Tools on 47,587 Ethereum Smart Contracts’, in G. ROTHERMEL & D.H. BAE
(eds), ICSE ‘20: Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering (The Association for Computing Machinery, New York 2020), pp 530–541.
35 P. ZHANG, F. XIAO & X. LUO, in Proceedings of 2020 IEEE International Conference. 36 J. CHEN, X. XIA, D. LO, J. GRUNDY, X. LUO & T. CHEN, IEEE TSE 2022, p 338. See also B. JIANG, Y. LIU
& W.K. CHAN, ASE’18 Proceedings. 37 P. ZHANG, F. XIAO & X. LUO, in Proceedings of 2020 IEEE International Conference. See also T.
DURIEUX, J. FERREIRA, R. ABREU & P. CRUZ, in ICSE ‘20. 38 See A.J. KOLBER, 21. STLR 2018, p 204; H. EENMAA-DIMITRIEVA & M.J. SCHMIDT-KESSEN, 35. CLSR
2019, p 75; M. KAULARTZ, ‘Smart Contracts’, in A. LEUPOLD, A. WIEBE & S. GLOSSNER (eds), IT -Recht, Recht, Wirtschaft und Technik der digitalen Transformation (C.H. Beck: München, 4th edn 2021), no. 19.
783
contract, if no such attack or exploitation takes place after all. Besides, bugs in smart contracts in general may be triggered under certain conditions, which might never be met. Nonetheless, the inability to debug a smart contract after its attachment to a blockchain might indeed be the cause of some serious legal issues, when a bug leads to an allocation of resources in a manner not intended by at least one of the parties to the contract. This could happen in cases of bugs that prevent the execution of the contract even when its conditions are met and vice-versa (e.g., the policyholder does not receive the agreed benefit despite the occurrence of the insurance risk and vice-versa) or that lead to a miscalculation of the amount of resources to be allocated (e.g., a smaller amount of cryptocurrencies are sent to the payee) or that allow the unintended reallocation of resources or multiple allocation of resources between the par- ties (such as a multiple execution of a payment which was meant to be executed only once) or an unintended allocation of resources to third parties or that lead in an outcome unwanted by at least one party in any other way (such as a delayed contractual performance).
8. If an unintended or unwanted outcome is the result of a bug in a smart contract, there are mainly two ways that this bug and its consequences are legally relevant, provided of course that one accepts that smart contracts having an impact on property rights do not evade generally the rules of a legal order, something which does not go without saying. One way is to treat bugs from the perspective of the validity of the contract, since one could argue that the code of the smart contract is the legally binding text of the contract and any errors in the code are errors (‘mistakes’) of the contract itself (the conditions and the form of invalidity in cases of contractual mistakes vary of course in each legal order). The other way is to treat bugs from the perspective of the contractual performance and, more specifically, from the perspective of the breach of contract or even from the perspective of unfair enrichment or any relevant restitution doctrine in cases that the allocation of resources exceeds the alloca- tion contractually provided, since one could argue that smart contracts are just a means for the contractual performance. Of course, there could be also a combi- nation of these two approaches depending on the nature of the bug and its consequences.
Therefore, there are two preliminary questions to be answered before deal- ing with the main issue of this article, namely the selection of the said approaches concerning the legal treatment of bugs in smart contracts. First, there is the question of the relevance and application of contract law concerning smart con- tracts. Second (and only if the answer to the previous question is that smart contracts do not evade contract law in general), it should be examined whether a smart contract is a legal contract itself or a tool for the performance of a contract that is to be found outside of the code.
784
3. Legal Rules and Smart Contracts
3.1. Are Contract Law Rules and Principles Applicable to Smart Contracts?
9. Breach of the smart contract as it is coded39 is not likely to happen due to its automated nature40 (albeit not entirely impossible41), while a restitution meets a lot of practical difficulties,42 not only due to the possible anonymity of the parties.43 Therefore, one could argue that not only litigation in smart contracts is unnecessary or impractical,44 but also out of the question, because parties who choose smart contracting choose a way to transact which lies beyond law, as they know that relevant disputes could hardly arise and/or be solved by courts.45 Thus, it could be argued that parties to a smart contract choose to transact out of any legal system46 and potentially out of reach of any legal order, since the only applicable law is the code of the smart contract.47
10. However, these thoughts are rebutted by the prevailing view in the legal literature,48 where it is correctly submitted that the intention of staying out of
39 Nevertheless, whether a breach of the agreement that underlies the smart contract is possible is another issue, which is discussed later in this article (Under Part 3).
40 A. SAVELYEV, 26. I&CTL 2017, p 130; M. CANNARSA, 6. ERPL 2018, p 777; O. BORGOGNO, 26. ERPL 2018, p 887.
41 See Ε. TJONG TJIN TAI, 26. ERPL 2018, pp 798–800. 42 J. FRANKENREITER, 175. JITE 2019, p 160; J.G. ALLEN, 14. ERCL 2018, p 333; M.K. WOEBBEKING, 10.
JIPITEC 2019, p 111; R. DE CARIA, 6. ItaLJ 2020, pp 368–369. 43 O. MEYER, 9. EuCML 2020, p 20; L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 817; T. CUTTS,
122. WVLR 2019, p 435. See however also J.M. SKLAROFF, 166. U.Pa.L.Rev. 2017, p 296 who argues that anonymity can also be a hindrance to the potential of smart contracts. For a proposal about the technical solution of the anonymity problem see S. LINOY, N. STAKHANOVA & S. RAY, ‘De- anonymizing Ethereum blockchain smart contracts through code attribution’, 31. Int. J. Net. Manag. (International Journal of Network Management) 2021, p e2130.
44 K. WERBACH & N. CORNELL, 67. DLJ 2017, p 333; A. SAVELYEV, 26. I&CTL 2017, p 131; L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 817; O. BORGOGNO, 26. ERPL 2018, p 892.
45 See A. SAVELYEV, 26. I&CTL 2017, p 132; P. PAECH, 80. MLR 2017, p 1096. 46 See J.G. ALLEN, 14. ERCL 2018, p 321; J.O. MCGINNIS & K. ROCHE, ‘Bitcoin: Order Without Law in
the Digital Age’, 94. Ind. L. J (Indiana Law Journal) 2019, p 1533. See also U. RODRIGUES, ‘Law and the Blockchain’, 104. Iowa Law Rev. (Iowa Law Review) 2019, p 716.
47 See A. SAVELYEV, 26. I&CTL 2017, p 124; A. GUADAMUZ, 35. CLSR 2019, p 9. 48 K. WERBACH & N. CORNELL, 67. DLJ 2017, p 340; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 767;
L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, pp 814–815; M.K. WOEBBEKING, 10. JIPITEC 2019, p 108; M. CLEMENT, ‘Smart Contracts and the Courts’, in L.A. DIMATTEO, M. CANNARSA & C. PONCIBÒ
(eds), The Cambridge Handbook of Smart Contracts, Blockchain Technology and Digital Platforms (Cambridge University Press, Cambridge 2019), p 278; S. AGNIKHOTRAM & A. KOUROUTAKIS, 19. JHTL 2019, p 318; R. DE CARIA, 6. ItaLJ 2020, p 367; R. HERIAN, 30. I&CTL 2021, p 26. See also M.N. TEMTE, 19. Wyo. Law Rev. 2019, p 104; M. HECKELMANN, 71. NJW 2018, p 509; E. LINDNER, 24. NZM 2021, p 667.
785
reach of the legal order is not necessarily respected by the legal order. It is the consequences of the smart contract that matter. If the execution of a smart contract ends to an allocation of resources, such as property rights, which occurs only by some legally provided and regulated means, then smart contracts cannot but lie within the reach of the legal order.49 Some examples for smart contracts can be offered by insurance contracts,50 contracts for booking of flights,51 sales contracts,52 crowd- funding projects for investment purposes,53 issuance of securities in companies54 etc. These kinds of transactions are legally relevant, irrespective of the means applied for the undertaking and performance of the respective obligations. Hence, it is correctly pointed out that ‘(contract) law remains relevant in most transactions even if they are entirely structured by way of smart contract’.55
This finding does not depend on the answer to the question of whether a smart contract is itself a legal contract or just a tool for the contractual perfor- mance. Even if smart contracts are merely tools for the contractual performance, they draw the legal attention as every contractual performance in general. Issues that derive from the (possible but not necessary) anonymity of the parties or the irrevocability of the blockchain registries may make the applicability of legal rules harder or lead to the adoption of suitable technical means to tackle them.56
Notwithstanding, these technical issues should not a priori exclude the application of legal rules and principles as they stand,57 since mere technicalities can be no excuse for evading the law.
49 K. WERBACH & N. CORNELL, 67. DLJ 2017, p 340; A. SAVELYEV, 26. I&CTL 2017, p 123. 50 See A. SETH & H. SUBRAMANIAN, ‘Blockchain and contract theory: Modeling smart contracts using
insurance markets’, 46. Manag. Fin. (Managerial Finance) 2020, pp 803–814. See also K. WERBACH
& N. CORNELL, 67. DLJ 2017, p 331; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 759. 51 See e.g., O. BORGOGNO, 26. ERPL 2018, p 896. 52 C.M. CHRISTOPHER, 69. U. Kan. L. Rev. 2021, p 494. 53 A. SAVELYEV, 26. I&CTL 2017, p 122. 54 G.M. COLE, 92 S. Cal. L. Rev. 2019, p 862. 55 J. FRANKENREITER, 175. JITE 2019, p 150. Of the same mind K. WERBACH & N. CORNELL, 67. DLJ 2017,
p 318; L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 809; A.J. KOLBER, 21. STLR 2018, p 220; C.R. YOUNG, 96. Wash. U. L. Rev. 2018, p 660; J. JIANG, 15. UCLR 2018, p. 141; R. DE CARIA, in The Cambridge Handbook of Smart Contracts, pp 33–34; J.G. ROHR, 67. Clev. St. L. Rev. 2019, p 76; R. HERIAN, 30. I&CTL 2021, pp 26–32; D.C. SLOAN, ‘Smart Contracts: A Leap Forward in Technology and a Step Backward in Law’, 60. WLJ (Washburn Law Journal) 2021, p 421. See however also L.H. SCHOLZ, ‘Algorithmic Contracts’, 20. STLR (Stanford Technology Law Review) 2017, p 151 who argues against the legal enforceability of algorithmic contracts under the traditional approach to contract law.
56 See L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, pp 814–815; O. MEYER, 9. EuCML 2020, pp 22– 24; D.K. KIPKER, P. BIRRECK, M. NIEWÖHNER & T. SCHNORR, 23. MMR 2020, p 511.
57 See K. WERBACH & N. CORNELL, 67.DLJ 2017, p 364; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 767; J. JIANG, 15.UCLR 2018, p. 141; J.G. ROHR, 67.Clev. St. L. Rev. 2019, p 77; A. LUESLEY, 19.Asper Rev. Int’l Bus. And Trade L. 2019, pp 167–170; R. HERIAN, 30. I&CTL 2021, p 29; C. BUCHLEITNER & T. RABL, Ecolex 2017, pp 9–10; M. HECKELMANN, 71. NJW 2018, p 508.
786
3.2. Is a Smart Contract a Legal Contract Itself or a Performance Tool?
3.2.1. Relevance of the Question: Stance of the Legal Literature
11. Opinions in the legal scholarship seem to be divided with respect to the issue of the legal role of a smart contract. According to one point of view, smart contracts are indeed legal contracts themselves58 concluded in a formal pro- gramming language.59 According to another point of view, smart contracts are not contracts themselves, but rather serve as an execution tool,60 as above mentioned. Of course, there can be also a combination of these views, according to which smart contracts can be either tools for the execution of a legal contract or they can be legal contracts themselves, depending on the circumstances of each case.61
The answer requires first the examination of an agreement, as a conceptual prerequisite to a contract. It is commonly stated that the agreement is a ‘meeting of minds’.62 It should be clarified how the minds of the parties are met. If the programming language of the smart contract code is the means for this ‘meeting of minds’ then the code is (or contains) the contract. If the ‘minds are met’ by means of some natural language that describes the function of the code, this means that the agreement (as this ‘meeting of minds’) lies out of the code and the code serves the fulfilment of this agreement. Therefore, it is obvious that it is a problem of a linguistic nature as well.
58 K. WERBACH & N. CORNELL, 67. DLJ 2017, p 343; A. SAVELYEV, 26. I&CTL 2017, p 123; J.G. ALLEN, 14. ERCL 2018, p 329; L.D. MUKA TSHIBENDE, 26. ERPL 2019, p 882; R. DE CARIA, in The Cambridge Handbook of Smart Contracts, p 32.
59 M. CANNARSA, 6. ERPL 2018, p 779. 60 P. CUCCURU, 25. Int. J. Law Inf. Technol. 2017, p 185; T. CUTTS, 122. WVLR 2019, pp 423–424; O.
MEYER, 9. EuCML 2020, p 19; C.M. CHRISTOPHER, 69. U. Kan. L. Rev. 2021, p 506; A.J. KOLBER, 21. STLR 2018, pp 214–226; S. GEIREGAT, 34. CLSR 2018, p 1148. See also A. GUADAMUZ, 35. CLSR 2019, p 15; R. BROWNSWORD, 20. EBOR 2019, p 9; J. JIANG, 15. UCLR 2018, p. 14; M. FINCK, ‘Blockchains: Regulating the Unknown’, 19. Ger. Law J. (German Law Journal) 2018, p 670; R. DE CARIA, 6. ItaLJ 2020, p 367; D.C. SLOAN, 60. WLJ 2021, p 395; E. LINDNER, 24. NZM 2021, p 667.
61 J. LINGWALL & R. MOGALLAPU, 88. UMKC Law Rev. 2019, p 299; D. PAULUS, ‘Was ist eigentlich… ein Smart Contract’, 60. JuS (Juristische Schulung) 2020, pp 107–108; C. BUCHLEITNER & T. RABL, Ecolex 2017, p 7; M. KAULARTZ & J. HECKMANN, 32. CR 2016, p 621. See also M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 756 who distinguish between the ‘smart contract code’ and the ‘smart legal contract’. See also M. DUROVIC & F. LECH, 5. ItaLJ 2019, pp 497–501.
62 M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 764; O. MEYER, 9. EuCML 2020, p 18.
787
3.2.2. The Conclusion of a Contract from a Linguistic Perspective
12. In general, a contractual agreement requires an offer and its acceptance.63
The offer should be communicated from one party to the other in a way that the other party could understand it. Of course, the actual or complete comprehension of the meaning of the offer is not a prerequisite to the conclusion of the contract, since contracts might be a product of some false understanding as well. The recipients of the offer may express their consent even if the offer is incomprehen- sible. Nonetheless, an incomprehensible offer most likely shall not serve its pur- pose. Therefore, the meaning of the offer should be coded in some communication code, actually or potentially known to the recipient of the meaning, so that the latter could decode the meaning and express the acceptance.
The most frequent communication codes used for the conclusion of con- tracts are the natural languages, such as the English, the German or any other similar natural language.64 Especially in cases where the law provides the written conclusion of a contract, a natural language is typically used as the code for the conveyance of the meaning of the contract.65 Apart from these cases, a natural language is also usually used as this code. Nevertheless, other communication codes could also be used for the conveyance of meaningful messages among human beings such as social norms and accustomed behaviours.66 The code of the offer may differ from the code of the acceptance, while communication of the acceptance to the offeror is not always necessary.67 Since the offer contains the terms (or at least the essential ones) of the contract to be concluded, the terms of the contract are contained in the code used for the conveyance of the meaning of the offer.68 Therefore, it could be said that the object of the ‘meeting of minds’, namely what the parties have agreed to, is to be found in the coded message of the offer.
63 See e.g., Art. 1113 of the French Civil Code and §§ 145–152 of the German Civil Code. For the offer and acceptance in common law see M.P. FURMSTON, Cheshire, Fifoot and Furmston’s Law of Contract (Oxford: Oxford University Press, 17th edn 2017), pp 40–74; E. MCKENDRICK, Contract Law: Text, Cases and Materials (Oxford: Oxford University Press, 8th edn 2018), pp 42–120.
64 See H. SURDEN, 46. UC Davis Law Rev. 2012, p 643. 65 Compare L.D. MUKA TSHIBENDE, 26. ERPL 2019, p 875; M. DUROVIC & F. LECH, 5. ItaLJ 2019, p
506; J. JASCHINSKI, ‘Einsatz moderner Technologien im Spannungsfeld gesetzlicher Formvorschriften. Warum eine „Blockchain-Form“ bzw. DLT-Form“ naheliegt’, 36. CR (Computer und Recht) 2020, pp 423–428 on the issue of smart contracts concerning contracts that must be concluded in a written form.
66 See M.P. FURMSTON, Cheshire, Fifoot and Furmston’s Law of Contract, p 68; K. LARENZ & M. WOLF, Allgemeiner Teil des Bürgerlichen Rechts (München: C.H. Beck, 9th edn 2004), § 29 no. 11.
67 § 151 of the German Civil Code. See also E. MCKENDRICK, Contract Law: Text, Cases and Materials, pp 95–99.
68 K. LARENZ & M. WOLF, Allgemeiner Teil, § 29 no. 17.
788
13. A further relevant question is whether a formal programming language is or could be used as a language for the conveyance of the meaning of the offer. The computer codes have a certain function, that is to codify messages to a machine in a manner that the machine can ‘comprehend’ them69
– as a matter of fact, a computer can comprehend nothing but the pass or not of current (a ‘0 or 1’ situation70); these actions are ‘codified’ by some programming language and with the help of the appropriate hardware so that the machine can act accordingly.71 The meaning of the messages coded in a programming language can only be some orders to a machine,72 so that the machine could act accordingly, if certain conditions of action are met.73 Even if human beings are familiar with some form of programming language and use it to communicate messages with each other, these messages can have no other meaning than the expected outcome of some machine action.74
Therefore, the function of a programming language differs from the function of natural languages. Nevertheless, despite the fact that a programming language seems unsuitable for interhuman communication, its use for purposes of conclusion of contracts is a matter of will of the parties, since such a use is not forbidden.75
3.2.3. Conclusion of the Contract by Humans
14. It seems therefore that there are two main arguments in favour of the approach that the contractual agreement is – at least usually and advisably76 – based not on the computer code directing the machine actions,77 but on the description of its expected function, expressed by means of some natural language.
The first and rather most decisive argument concerns the usual manner of interhuman communication. Programming languages, or, more specifically, pro- gramming languages used for smart contracts (such as Solidity or Vyper) are not comprehensible to most people.78 A smart contract is typically accompanied by or
69 See J.G. ALLEN, 14. ERCL 2018, p 315. 70 C. JACOBS & C. LANGE-HAUSSTEIN, ITBR 2017, p 12. 71 See H. SURDEN, 46. UC Davis Law Rev. 2012, pp 647–648. 72 See H. SURDEN, 46. UC Davis Law Rev. 2012, p 665; M. RASKIN, 1. GLTR 2017, p 325. 73 See M. CANNARSA, 6. ERPL 2018, p 777. 74 J.G. ALLEN, 14. ERCL 2018, p 315. 75 H. SURDEN, 46. UC Davis Law Rev. 2012, p 640; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 764;
M. DUROVIC & F. LECH, 5. ItaLJ 2019, p 497. 76 See M. KAULARTZ, in IT -Recht, Recht, Wirtschaft und Technik, no. 38. 77 A.J. KOLBER, 21. STLR 2018, p 221; C.M. CHRISTOPHER, 69. U. Kan. L. Rev. 2021, p 506; R. DE CARIA,
6. ItaLJ 2020, p 367; M. KAULARTZ & J. HECKMANN, 32. CR 2016, p 621. See however K. WERBACH & N. CORNELL, 67. DLJ 2017, pp 348–350; J.G. ALLEN, 14. ERCL 2018, pp 329–331; M. DUROVIC & A. JANSSEN, 26 ERPL 2018, p 762 who argue for the opposite view, namely that the contract is formulated in the code.
78 See D.C. SLOAN, 60. WLJ 2021, p 398. See also P. CUCCURU, 25. Int. J. Law Inf. Technol. 2017, pp 188–189; M.N. TEMTE, 19. Wyo. Law Rev. 2019, p 97. For issues concerning the lawyers’ failure to
789
follows a description of its expected function in some natural language79 and this language serves as the code used for the conveyance of the message of the offer,80
so that this message could indeed be conceived even by non-programmers.81 This message describes the desirable allocation of resources (put otherwise, the rights and obligations undertaken82) in a manner comprehensible to the people who potentially wish to participate in this allocation.83 Otherwise, smart contracts would have hardly any potential.84
The second argument relates to the context necessary for the understanding of the functionality of the code. A computer code is addressed to machines, and it serves for the guidance and control of their actions. The programming language used in a computer code is generally not suitable for interhuman communication,85
as mentioned above. Even people, who are familiar with a certain programming language, can only understand – at best – what a machine would do if given the orders embedded in the code.86 Nonetheless, even if familiar with this language, the recipient of a message conveyed in some computer code could not possibly be certain whether the execution of the program fulfils indeed its purpose, if this purpose is unknown, or, put otherwise, if there is hardly any context about the desired use of the code.87 They might predict correctly the ‘machine’s behaviour’,
understand the code of a smart contract see R. HASTING, ‘Smart Contracts: Implications on Liability and Competence’, 28. U. Miami Bus. L. Rev. (University of Miami Business Law Review) 2020, pp 373–375.
79 See e.g., how smart contracts are offered at ‘Etherisc’, https://etherisc.com/#products (accessed 23 Jun. 2022).
80 See however L.D. MUKA TSHIBENDE, 26. ERPL 2019, p 882 who argues that the agreement preced- ing the smart contract can be a ‘framework agreement’. See also A.J. KOLBER, 21. STLR 2018, p 221; M.K. WOEBBEKING, 10. JIPITEC 2019, p 108; J.G. ROHR, 67. Clev. St. L. Rev. 2019, p 85; M. CLEMENT, in The Cambridge Handbook of Smart Contracts, p 281. See however also J. LINGWALL & R. MOGALLAPU, 88. UMKC Law Rev. 2019, p 299.
81 M. CLEMENT, in The Cambridge Handbook of Smart Contracts, p 284. See also M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 770 who argue that Standard Contract Terms relating smart contracts should be provided to the consumers in some understandable natural language.
82 See also J. FRANKENREITER, 175. JITE 2019, p 155. See however K. WERBACH & N. CORNELL, 67. DLJ 2017, p 340; A. SAVELYEV, 26. I&CTL 2017, p 129 who argue that there are no promises or obligations involved in a smart contract, due to its self-executing nature. See also A.J. KOLBER, 21. STLR 2018, p 222; F. GHODOOSI, 96. Wash. L. Rev. 2021, p 69.
83 See E. MIK, ‘Blockchains: A Technology for Decentralized Marketplaces’, in L.A. DIMATTEO, M. CANNARSA & C. PONCIBÒ (eds), The Cambridge Handbook of Smart Contracts, Blockchain Technology and Digital Platforms (Cambridge: Cambridge University Press 2019), p 175; F. GHODOOSI, 96. Wash. L. Rev. 2021, p 82.
84 See also O. BORGOGNO, 26. ERPL 2018, p 900. 85 See also J.G. ALLEN, 14. ERCL 2018, p 335. 86 See T. CUTTS, 122. WVLR 2019, p 424. 87 M. KAULARTZ & J. HECKMANN, 32. CR 2016, p 621. See also J. GRIMMELMANN, ‘All Smart Contracts are
Ambiguous’, 2. JLI (Journal of Law and Innovation) 2019, pp 11–14.
790
but they cannot be sure whether this behaviour was indeed desired, if the intended outcome was not communicated by some other means. The context of the use of the code, which also contains its intended function, is also typically conveyed by means of some natural language, even among people who are familiar with the programming language.88
15. Thus, in a contractual context, one could hardly rely on the programming language to convey the message (offer) of the proposed allocation of resources. This message is typically conveyed by means of a code which has significantly higher possibilities to be successfully decoded by its recipient, i.e., a message in a commonly used language.89 Therefore, the smart contract that executes the agree- ment serves typically only as a tool for the performance of the contractual terms,90
as they are set in some other language.91 Even attempts for some standardized translation of legal terminology to programming language seem not to have wide- spread success.92
Of course, as already mentioned, it cannot be ruled out that two persons choose a formal programming language as the code for the conclusion of their contract, even for a part only of the contract93 (for example, the so-called Ricardian contracts, who consist of both legal prose in some natural language and software code94). In this case, the agreement is indeed based on the computer code (partially, at least) and the contractual terms are contained in this code.95 It could be argued, thus, that in this case the smart contract is the legal contract, in the same manner that a document which contains the con- tractual terms is the contract, in the sense that the contract is to be found within the document.96
88 See however also M. CANNARSA, 6. ERPL 2018, p 781. 89 See however K. WERBACH & N. CORNELL, 67. DLJ 2017, p 350 who claim that ‘[f]or the smart
contract, in contrast, everything beyond the code is just commentary’. 90 See O. MEYER, 9. EuCML 2020, p 19. See also J.G. ROHR, 67. Clev. St. L. Rev. 2019, p 85. 91 See R. BROWNSWORD, 20. EBOR 2019, p 15. See also J.J. SZCZERBOWSKI, Place of Smart Contracts, p
337 who distinguishes between smart contracts drafted by a programmer and presented to a layman and smart contracts co-drafted by the contracting parties. See however also M. DUROVIC & F. LECH, 5. ItaLJ 2019, p 502.
92 See e.g., C.R. YOUNG, 96. Wash. U. L. Rev. 2018, p 659. 93 D.C. SLOAN, 60. WLJ 2021, p 396. 94 See F. GHODOOSI, 96. Wash. L. Rev. 2021, p 84. 95 J.J. SZCZERBOWSKI, Place of Smart Contracts, p 337. 96 See J.G. ALLEN, 14. ERCL 2018, p 328. See however also O. MEYER, 9. EuCML 2020, p 19; A.J.
KOLBER, 21. STLR 2018, p 219.
791
3.2.4. Conclusion of Contracts by Artificial Intelligence (AI)
16. Finally, there is the case of the conclusion of a contract by machines, who ‘choose’ to transact with each other. The case where contracts containing smart contracts are concluded by means of AI97 seems to be of particular interest. Ιt could be argued that the contractual terms lie within the code itself, in cases where the AI software searches and responds to smart contract offers only by ‘reading’ their code, analysing its expected performed outcomes, and proceeding to the actions predefined as an expression of acceptance, if the expected outcome satisfies the guidelines already given to the AI program that operates as the recipient of the offer.98 In this case, there is no natural language involved, while the computer code is indeed the communication code that conveys a comprehensible message.
4. Contract Law Principles for the Legal Treatment of Bugs
4.1. Bugs in Smart Contracts Used as Performance Tools
17. Bugs in the code may potentially lead to a result that deviates from the expected contractual outcome, such as delays of payment or deliverance, pay- ments of larger sums than agreed, payments to third parties instead of the contractual payee etc. As long as smart contracts are used as performance tools (as is the usual case), these cases should be evaluated as cases of breach of contract99 or unfair enrichment,100 depending on the specific provisions of each jurisdiction. For example, a breach of contract occurs in cases of delays concerning the payment or the deliverance of goods or in cases of deliverance of other goods than those ordered or in cases of non-performance at all.101 On the contrary, cases of payments of larger sums than those agreed are to be perceived as cases of unfair enrichment. Even tort rules might possibly apply, for example in cases where one party knows aforehand and maliciously takes advantage of the coding error,102 if the application of the rules for the breach of contract is not incompatible to the application of the tort rules. Of course, the question of whether personal fault (of the party who breached the contract) is necessary for the application of the relevant rules is a matter to be judged according to the
97 See L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 812. See also R. HERIAN, 30. I&CTL 2021, p 24.
98 See also M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 760 who distinguish between smart contracts in two categories depending on whether they are concluded ‘smart’ or ‘unsmart’.
99 L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 815. See however also K. WERBACH & N. CORNELL, 67. DLJ 2017, p 332.
100 See also K. WERBACH & N. CORNELL, 67. DLJ 2017, p 376. 101 See however also A. SAVELYEV, 26. I&CTL 2017, p 131. 102 See L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 815.
792
rules of each legal order. In any case however, coding errors could be usually attributed to some fault of the person(s) who have set the code of the smart contract.
4.2. Bugs in Smart Contracts Used as Contracts Themselves
4.2.1. Bugs in Smart Contracts Concluded by Humans and Used as Contracts Themselves
18. As noted above, it cannot – at least in theory – be ruled out that human beings may choose a programming language as the language of the legal contract and that the smart contract contains the contract itself. In this case, a first question is whether the context of the contract, i.e., circumstances that lie outside of the of the contract, could be taken into consideration for purposes of interpretation. It is common ground in the contract law of many jurisdictions, such as the German,103
the French104 one – the situation might seem somehow, though not entirely,105
different in common law systems106 – in the non-binding codifications of European Principles of Contract Law107 and even in international contract law legislation, such as the UN Convention on Contracts for the International Sale of Goods (CISG),108 that a contract is not to be interpreted on the sole ground of
103 §§ 133, 157 of the German Civil Code. See also K. LARENZ & M. WOLF, Allgemeiner Teil, § 33 no. 8. 104 Article 1188 of the French Civil Code. See also M. CANNARSA, 6. ERPL 2018, pp 779–780. 105 L. SPAGNOLO, ‘Chapter 23: Contract Interpretation’, in L.A. DIMATTEO, A. JANSSEN, U. MAGNUS & R.
SCHULZE (eds), International Sales Law. Contract, Principles and Practice (C.H. Beck, Hart, Nomos, Baden–Baden 2016), nos. 31 and 59. For the adoption of a contextualist approach in the inter- pretation of contracts see Investors Compensation Scheme v. West Bromwich Building Society [1997] UKHL 28; E. MCKENDRICK, Contract Law: Text, Cases and Materials, pp 374–381; C. MITCHELL, ‘Interpreting Commercial Contracts: The Policing Role of Context in English Law’, in L.A. DIMATTEO & M. HOGG (eds), Comparative Contract Law: British and American Perspectives (Oxford: Oxford University Press, Oxford 2015), pp 231–247.
106 See K. LEWISON, The Interpretation of Contracts (London: Sweet & Maxwell, 3rd edn 2004), pp 249 ff.; Y. GOH, ‘From context to text in contractual interpretation: Is there really a problem with the plain meaning rule?’, 45. CLWR (Common Law World Review) 2016, pp 298–318; G. VOS, ‘Contractual Interpretation: Do Judges sometimes say one thing and do another?’, 23. Cant LR (Canterbury Law Review) 2017, pp 1–13; L. SPAGNOLO, in International Sales Law, no. 30. See also O. MEYER, 9. EuCML 2020, p 19.
107 See The Commission of European Contract Law – O. LANDO & H. BEALE (eds), Principles of European Contract Law (London & Boston: Kluwer Law International, The Hague 2000), vol. 5, p 101; Study Group on a European Civil Code & the Research Group on the Existing EC Private Law (Acquis Group) – C. VON BAR, E. CLIVE & H. SCHULTE-NÖLKE & H. BEALE, J. HERRE, J. HUET, M. STORME, S. SWANN, P. VARUL, A. VENEZIANO & F. ZOLL (eds), Principles, Definitions and Model Rules of European Private Law, Draft Common Frame of Reference (DCFR) (Munich: Sellier – European Law Publishers 2009), vol. II-8, p 101.
108 Article 8 of the CISG. On the issue of the application of the CISG on smart contracts see A. DUKE, ‘What Does the CISG Have to Say about Smart Contracts: A Legal Analysis’, 20. CJIL (Chicago
793
its text, but context is necessary, as it could be drawn from both subjective and objective standards. Elements as the known or discernible intention of the parties and standards as the good faith,109 the ‘reasonable person’110 or ‘com- mercial common sense’111 are most likely taken into consideration for inter- pretational purposes.112 This means that even if the code is indeed the text of the contract, an interpretation that takes into consideration the known or discernible intentions of the parties and objective standards, as the meaning that a ‘reasonable person’ would give to the contractual text, cannot be ruled out113 if one takes into account that coding flaws are rather inevitable and coding flaws might lead to an unexpected ‘comprehension’ of the code by the machine.114 Thus, despite the fact that a programming language is not ambig- uous in the same way as a natural language,115 it could be ambiguous in a somehow similar sense, namely that the code could lead to some outcome other than the one predicted,116 while a similar communication failure can be the result of ambiguity even in interhuman communication.117 Therefore, ambi- guity, as an interpretational prerequisite118 is not to be ruled out, even when the code serves as the contractual text.119 Thus, even when smart contracts are used
Journal of International Law) 2019, pp 141–177; A. JANSSEN & N.G. AHUJA, ‘The Imperfect International Sales Law: Revamp, Supplement or Leave it Alone?’, 20. IHR (Internationales Handelsrecht) 2020, p 5.
109 § 157 of the German Civil Code; Art. 1366 of the Italian Civil Code. See also L. SPAGNOLO, in International Sales Law, no. 81 for the role of good faith in interpretation according to CISG.
110 Article 1188 para. 2 of the French Civil Code. See also L. SPAGNOLO, in International Sales Law, no. 44.
111 See Rainy Sky S.A. v. Kookmin Bank [2011] UKSC 50; Arnold v. Britton [2015] UKSC 36; L. HODGE, ‘Can Judges Use Business Common Sense in Interpreting Contracts?’, in L.A. DIMATTEO & M. HOGG (eds), Comparative Contract Law: British and American Perspectives (Oxford: Oxford University Press 2015), pp 272–283; N. ANDREWS, ‘Interpretation of Contracts and “Commercial Common Sense”: Do not overplay this useful criterion’, 76. CLJ (Cambridge Law Journal) 2017, pp 36–62.
112 See D.J. SMYTHE, ‘Reasonable Standards for Contract Interpretations under the CISG’, 25. CJICL (Cardozo Journal of International and Comparative Law) 2016, pp 10–12.
113 A.J. KOLBER, 21. STLR 2018, p 224. See also M. CANNARSA, 6. ERPL 2018, p 778. 114 See M. RASKIN, 1. GLTR 2017, p 326. 115 A. SAVELYEV, 26. I&CTL 2017, p 125; M. RASKIN, 1. GLTR 2017, p 325; J.M. SKLAROFF, 166. U.Pa.L.
Rev. 2017, p 291; O. BORGOGNO, 26. ERPL 2018, p 891. 116 See also J.G. ALLEN, 14. ERCL 2018, p 337. 117 For an analysis of the types of ambiguity see K. LEWISON, The Interpretation of Contracts, pp 242 ff. 118 See L. SPAGNOLO, International Sales Law, no. 124; K. LARENZ & M. WOLF, Allgemeiner Teil, § 28
no. 3; J.G. ALLEN, 14. ERCL 2018, p 339. See also M. CANNARSA, 6. ERPL 2018, p 782; M. DUROVIC
& F. LECH, 5. ItaLJ 2019, p 503. 119 See A. SAVELYEV, 26. I&CTL 2017, p 125; M. RASKIN, 1. GLTR 2017, p 324; M. DUROVIC & F. LECH,
5. ItaLJ 2019, p 501 where it is argued that programming languages are not entirely free from ambiguity, albeit in a smaller scale comparing to natural languages. See also M. VERSTRAETE, 50. Loy. U. Chi. L.J. 2019, p 789.
794
literally as legal contracts, the interpretational instruments can also be used to shape precisely the contractual rights and obligations, besides the mere con- tractual text.120 Put otherwise, the exact meaning of the agreement is not to be found in the words – in this case the orders of the programming language – of the contract alone.121
19. That being said, a bug in this case may potentially lead to an outcome which deviates from the expected contractual outcome, as this expected outcome is shaped with the use of interpretational tools. This deviation could happen either on the ground of printing errors (‘typos’) or on the ground of a non-expected function of the code.
The first case (‘typos’) should be evaluated under the perspective of the mistake in a declaration of intent since there is an expressional mistake122 or perhaps under the perspective of the rectification doctrine in common law sys- tems in cases of false written recording of a previous agreement.123 Of course, printing errors do not necessarily mean that the contract is void or voidable (more precisely, the legal contract contained in the smart contract, as a computer code itself cannot be legally void124). An expressional mistake could be approached first by means of interpretation (for example, if the actual intention of the mistaken party was indeed known to the other party), so that the contract stands with its corrected meaning.125 In this case, the flawed performance should be perceived as a breach of contract or as a case of unfair enrichment, as analysed above. However, if such a correction of the mistake is not possible, then it is a matter of the rules that govern the mistakes in declaration whether the contract is valid or not. It seems that in common law systems, a unilateral mistake might result harder to some sort of invalidity of the contract,126 comparing to civil law
120 L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 811; M. CLEMENT, in The Cambridge Handbook of Smart Contracts, p 284. Contra A. SAVELYEV, 26. I&CTL 2017, p 125; M. KAULARTZ & J. HECKMANN, 32. CR 2016, p 623.
121 See DCFR, vol. II 8, p 102. See also A.J. KOLBER, 21. STLR 2018, p 220. 122 See however also A. SAVELYEV, 26. I&CTL 2017, p 131 who argues that there can be no invalidity
whatsoever of a smart contract due to mistake. 123 See Amp (UK) Plc & Amp; Anor v. Barker & Amp; Ors [2000] EWHC Ch. 42; Chartbrook Ltd v
Persimmon Homes Ltd & Ors [2009] UKHL 38; FSHC Group Holdings Ltd v. Glas Trust Corporation Ltd (Rev 1) [2019] EWCA Civ 1361; M.P. FURMSTON, Cheshire, Fifoot and Furmston’s Law of Contract, p 313; E. MCKENDRICK, Contract Law: Text, Cases and Materials, p 554.
124 O. MEYER, 9. EuCML 2020, p 19; D.K. KIPKER, P. BIRRECK, M. NIEWÖHNER & T. SCHNORR, 23. MMR 2020, p 511.
125 See e.g., East v. Pantiles (Plant Hire) Ltd [1981] 263 EG 61; Chartbrook Ltd v. Persimmon Homes Ltd & Ors [2009] UKHL 38; The Commission on European Contract Law, Principles of European Contract Law, vol. 4, p 103; K. LEWISON, The Interpretation of Contracts, p 279; K. LARENZ & M. WOLF, Allgemeiner Teil, § 36 no. 30.
126 See e.g.,Hartog v.Colin& Shields [1939] 3All ER566;Riverlate Properties Ltd v.Paul and others [1974] 2 AII ER 656; Great Peace Shipping Ltd. v. Tsavliris (International) Ltd [2002] EWCA Civ 1407.
795
systems,127 while it is generally acknowledged that mistakes of minor importance have no significance.128
20. There is also the case where the code does not function as expected or desired. First, this may be the case of some semantic misunderstanding, i.e., one or both parties do not understand properly the correct meaning of the orders given to the machine. An analogy could be made with the case that the parties use some foreign language (with no translation involved), without proper under- standing of the words used.129 This is indeed an expressional mistake, since there is no match between the meaning of the declaration as it stands and the meaning of the declaration as it was intended.130 Nonetheless, whether such mistakes mean that the contract could be void, voidable or invalid whatsoever depend on the specific rules of each jurisdiction that govern the doctrine of mistake, since they may not fall into the scope of the doctrine of mistake in some jurisdictions.131
Second, there is the case where the parties expressed themselves as they wanted, but the code does not function as planned or desired, due to incomplete coding, which seem to be the most frequent case of bugs. This is a case which could be described as ‘coding ambiguity’ or ‘coding imperfection’. As it has been already indicated, programming languages and software codes are not free from ambiguities, as is the case where the programmer did not predict that the machine could execute the orders in another way than planned (e.g., when the conditions triggering the machine actions were ambiguously described) or where not every possible machine action was predicted (this is what happens e.g., in security bugs). What is of importance, nonetheless, for the contractual content is not the way the machine has ‘comprehended’ the orders, but the content of the agreement of the parties, namely what the parties have actually agreed to.132 If the parties have agreed that the coding language used in a smart contract has a certain meaning, but the machine perceives the coding language in some other way due to some ambiguity or imperfection in the code, there is no mistake in the declarations of intent, but a failure of proper contractual
127 See e.g., § 119 para. 1 of the German Civil Code. 128 The Commission on European Contract Law, Principles of European Contract Law, vol. 4, p 103;
Great Peace Shipping Ltd. v. Tsavliris (International) Ltd [2002] EWCA Civ 1407; K. LARENZ & M. WOLF, Allgemeiner Teil, § 36 no. 32.
129 M. KAULARTZ, in IT -Recht, Recht, Wirtschaft und Technik, no. 28. See also M. DUROVIC & F. LECH, 5. ItaLJ 2019, p 502.
130 See K. LARENZ & M. WOLF, Allgemeiner Teil, § 36 no. 12; M. KAULARTZ & J. HECKMANN, 32.CR 2016, p 622.
131 See K. LEWISON, The Interpretation of Contracts, pp 282 ff. 132 C. BUCHLEITNER & T. RABL, Ecolex 2017, p 9. See also M. KÕLVART, M. POOLA & A. RULL, ‘Smart
Contracts’, in T. KARIKMÄE & A. RULL (eds), The Future of Law and eTechnologies (Heidelberg, New York, Dordrecht & London: Springer, Cham 2016), p 140.
796
performance. Of course, whether there was an agreement and what its content might be is a matter of interpretation (potentially subject to limitations con- cerning the kind of admissible evidence133), as is the case of ambiguities that occur in natural language contractual terms, while it should be pointed out that ambiguity does not normally mean that there was a (mutual or unilateral) mistake leading to some invalidity of the contract.134 Interpretation is also necessary where there appear to be gaps in the contract.135 Therefore, inter- pretation cannot be ruled out in smart contracts, even when a formal program- ming language is indeed the language of the contract. The fact that the contract may have been already executed might raise some serious practical issues,136 but it should not preclude in principle the use of contract law tools and remedies,137
as already mentioned.
21. The famous ‘DAO Hack’ case can serve as a proof that context of the smart contract cannot be ruled out for purposes of interpretation.138 In the case of ‘DAO Hack’, the purpose of the smart contract was the collection of capital in a crowd- funding scheme, operating in a manner comparable to a public company, while each participant could have as many votes, with respect to the investment of the capital, as the ratio of their participation to the collected capital.139 Nevertheless, a bug in the code allowed participants to withdraw their funds limitlessly. A partici- pant took indeed advantage of this bug and withdrew a very large sum of the capital (tokens of approximate value of 50 million USD of a total capital of 140 million USD). Despite the fact that the initial intention was that ‘code is law’ and an interpretation of the smart contract with respect to any elements outside of the
133 See L. SPAGNOLO, in International Sales Law, nos. 89 ff., 101 ff. 134 See G. VOS, 23. Cant LR 2017, p 12; K. LEWISON, The Interpretation of Contracts, p 248. See also
E. MCKENDRICK, Contract Law: Text, Cases and Materials, p 520. 135 L. SPAGNOLO, in International Sales Law, no. 124; K. LARENZ & M. WOLF, Allgemeiner Teil, § 33 no.
9; C. BUCHLEITNER & T. RABL, Ecolex 2017, p 9. 136 On the technical issues that arise due to the rescission of a smart contract see B. MARINO & A. JUELS,
‘Setting Standards for Altering and Undoing Smart Contracts’, in J.J. ALFERES, L. BERTOSSI, G. GOVERNATORI, P. FODOR & D. ROMAN (eds), Rule Technologies – Research, Tools, and Applications. 10th International Symposium, RuleML 2016 Stony Brook, NY, USA, July 6–9, 2016, Proceedings (Switzerland: Springer 2016), pp 151–166. See also U. BERTRAM, 72. MDR 2018, p 1420.
137 See C. PONCIBÒ & L.A. DIMATTEO, ‘Smart Contracts. Contractual and Noncontractual Remedies’, in L.A. DIMATTEO, M. CANNARSA & C. PONCIBÒ (eds), The Cambridge Handbook of Smart Contracts, Blockchain Technology and Digital Platforms (Cambridge: Cambridge University Press 2019), p 121; R. DE CARIA, in The Cambridge Handbook of Smart Contracts, p 33; M. HECKELMANN, 71. NJW 2018, p 507. See however also B. PASA & L.A. DIMATTEO, in The Cambridge Handbook of Smart Contracts, p 341.
138 J.G. ALLEN, 14. ERCL 2018, p 340; M. CLEMENT, in The Cambridge Handbook of Smart Contracts, p 274.
139 See M. RASKIN, 1. GLTR 2017, p 336; A.J. KOLBER, 21. STLR 2018, pp 210–213.
797
code was agreed to be ruled out,140 after a long discussion the majority of the participants in this fund decided to reverse the payments (‘hard fork’141) consid- ered as opposed to the purposes of the fund.142 Therefore, circumstances or interpretational criteria lying outside of the smart contract were indeed taken into account, despite the fact that this was initially ruled out.143
22. In conclusion, even when smart contracts are used by humans as the text of a legal contract themselves, the doctrine of mistake could still play a role. Nonetheless, the doctrine of mistake cannot be used in cases where both parties have comprehended the coding language in the same manner and have agreed thereupon, but due to coding imperfections the machine executes the orders in an unwanted manner, or where are gaps in the contract, namely issues that have not been predicted and regulated by the parties. In these cases, the interpretation of the contract shall clarify the actual content of the agreement and shall fill the possible gaps. Thereafter it can be found out whether the execution of the contract was indeed proper, comparing to the contractual agreement.
4.2.2. Bugs in Smart Contracts Concluded by AI
23. There is still the case where AI programs ‘read’ and ‘comprehend’ the code of a smart contract and ‘decide’ to proceed with its conclusion according to the terms contained in the smart contract. The room for interpretation here is significantly smaller.144 The intentions of the parties are mutually unknown, since there are no negotiations whatsoever145; there is only the code, written in some programming language, while the AI software that agreed to the code (the offer to the contract) simply followed some guidelines provided to it. Whether these guidelines were followed correctly is not a matter of contractual interpreta- tion or even a matter of mistake concerning the declaration of intent. The AI commits no mistake concerning its declaration of intent by misinterpreting the guidelines provided to it.146 An analogy could be drawn from the agency princi- ples here. Even though there could be some doubt on the issue whether AI is
140 See K. WERBACH & N. CORNELL, 67. DLJ 2017, p 351. 141 For the evaluation of ‘hard-forking’ as a potential smart-contract law remedy see L.A. DIMATTEO &
C. PONCIBÒ, 26. ERPL 2018, p 821. 142 On the political dimension of this decision see M. VERSTRAETE, 50. Loy. U. Chi. L.J. 2019, pp 777–
778. 143 See also J.G. ROHR, 67. Clev. St. L. Rev. 2019, p 90. 144 M. CANNARSA, 6. ERPL 2018, p 781. 145 See O. MEYER, 9. EuCML 2020, p 19. 146 See also R. HERIAN, 30. I&CTL 2021, p 28; F. GHODOOSI, 96. Wash. L. Rev. 2021, p 82; T. SÖBBING;
‘Smart Contracts und Blockchain-Technologie: Definition, Arbeitsweise, Rechtsfragen’, ITBR (IT- Rechtsberater) 2018, p 45.
798
literally an agent with respect to the legal significance of the term (something doubtful147), it acts in a way resembling the actions of an agent in this case,148 as it searches for suitable contracts regarding certain criteria provided to it, and ‘decides at will’ for the conclusion of a contract binding for a human or a legal person.149 It is generally of no relevance whether this contract is indeed desired by the principal if the agent acts within the sphere of the provided power, unless of course the rules of the applicable law contain different provisions.150
Therefore, in these cases there seems to be no room either for contract inter- pretation or for the application of the rules governing mistakes in a declaration of intent151 and in principle any deviation from the expected or wanted outcome may not be perceived as a bug having some legal relevance.
24. Nonetheless, there could be an exception here in cases where the legislation to be applied permits the interpretation by means of objective standards, such as the ‘reasonable person’, and the result of the contract is obviously unreasonable by these standards. An example could be drawn by the ‘DAO Hack’ case, where obviously it would not have been possibly expected by any reasonable person that any member of the fund would have the capability to withdraw the whole capital. In these cases, there is obviously a (legally relevant) bug, and the contractual content may be shaped with the use of these objective standards.152 Therefore, multiple payments, unjustified by the standard of the ‘reasonable person’, would not be contractually justified and, thus, they can be ruled with respect to the doctrine of unfair enrichment or any other relevant doctrine which governs payments that were not backed up by the contractual agreement.
5. The Question of Contributory Negligence
25. As indicated above, a lot of cases, where legally relevant smart contract bugs occur, should be evaluated as cases of a breach of contract. A common remedy in cases of breach of contract is the claim for damages and a common defence against
147 See A. BÖRDING, T. JÜLICHER, C. RÖTTGEN & M.V. SCHÖNFELD; ‘Neue Herausforderungen der Digitalisierung für das deutsche Zivilrecht. Praxis und Rechtsdogmatik’, 33. CR (Computer und Recht) 2017, p 139.
148 L.H. SCHOLZ, 20. STLR 2017, pp 164–169; P. CUCCURU, 25. Int. J. Law Inf. Technol. 2017, p 185. See also M.K. WOEBBEKING, 10. JIPITEC 2019, p 109; F. GHODOOSI, 96. Wash. L. Rev. 2021, p 69.
149 L.H. SCHOLZ, 20. STLR 2017, p 165. See also A. SAVELYEV, 26. I&CTL 2017, p 123; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 761; L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 810.
150 See L.H. SCHOLZ, 20. STLR 2017, p 155. 151 See R. HERIAN, 30. I&CTL 2021, p 27. 152 See J. MAIER & B. SCHUPPLI, ‘The DAO Hack and the living law of Blockchain’, APARIUZ
(Digitalisierung–Gesellschaft–Recht: Analysen und Perspektiven von Assistierenden des Rechtswissenschaftlichen Instituts der Universität Zürich) 2019, p 37. See however also L.H. SCHOLZ, 20. STLR 2017, p 168.
799
a claim for damages is the defence of contributory negligence,153 albeit in many jurisdictions this defence may be used only against claims for damages due to tort.154 Provided that this defence is permissible, either because it is permissible against claims for damages due to a breach of contract or because a tort can indeed be established,155 a question that arises in relation to a potential claim for damages due to bugs in a smart contract156 is whether the defendant may use the contributory negligence defence, provided that the claimant failed also to detect the bug. Of course, standards and prerequisites for this defence may vary in each legal order. Nonetheless, successfully estab- lishing this defence on the mere ground of a detection failure of the bug would seem a hard task, if the defendant is the person who submitted the offer or took care of the composition of the code, directly or indirectly. The person accepting such an offer (usually in the form of some natural language, as mentioned above) should not carry the burden of examining in detail the code of the smart contract, because such a task would make the conclusion of the contract difficult and would significantly increase the transaction costs.157
On the contrary, this defence could be used if the claimant is the person who submitted the offer for the conclusion of the contract,158 provided of course that a claim for damages is indeed established.
6. Concluding Remarks
26. Smart contracts may be legally relevant, but in most cases they are not legal contracts themselves, but a tool for the performance of the contract. In these cases, bugs in the smart contract should not be perceived as reasons for the potential invalidity of the contract, but as causes of the breach of contract and/or of unfair enrichment. This is not to be ruled out even in the rare cases where the smart contract could be seen as the legal contract per se, but there is room for its interpretation, especially by objective standards, such as these of ‘good faith’ and ‘reasonable person’. Nonetheless, there are however some conceivable, albeit rather unlikely, cases where the bugs in smart contracts could be judged from the
153 See e.g., § 254 of the German Civil Code. 154 See e.g., Art. 4 of the Law Reform (Contributory Negligence) 1945 Act applying in England, Wales
and Scotland. 155 See M. RASKIN, 1. GLTR 2017, p 328 who argues that ‘torts could emerge for negligent coding’. 156 See J.J. SZCZERBOWSKI, Place of Smart Contracts, p 335. See also F. GHODOOSI, 96. Wash. L. Rev.
2021, p 76 who argues that reliance losses are the most suitable remedy in cases of poor coding in smart contracts. See however also B. PASA & L.A. DIMATTEO, in The Cambridge Handbook of Smart Contracts, p 342.
157 See also O. BORGOGNO, 26. ERPL 2018, p 900. 158 Compare A. SAVELYEV, 26. I&CTL 2017, p 126.
800
perspective of the conclusion of the contract and potentially lead to their evalua- tion as mistakes in a declaration, according to the respective rules of the law applicable.
Finally, it should be added that it is commonly pointed out that traditional contract law ex post juridical remedies seem to be rather inefficient in the case of smart contracts.159 This does not mean that contract law is irrelevant at all. Besides, it is also pointed out that contract law and its remedies shall continue to play an important part even in the field of smart contracts, since contract law provides principally the means for the material solution of problems that occur in case of unwanted or unexpected outcomes in the (short or long) life of the contract.160 Issues that occur due to the pathology of a contract executed by means of a smart contract (bugs in the code are a typical example of this pathology) may appear different comparing to similar issues arising due to the pathology of ordinary contracts in view of practicalities, due to the function of blockchain161 or the anonymity of the parties.162 Nevertheless, they are not categorically or con- ceptually different.163 For example, payment delays, payments of larger sums than contractually owed, impossibility to perform or expressional mistakes are problems which may occur in all kinds of contracts, and there seems to be no particular differentiation with respect to their essence or their conceptual core in the case of smart contracts. Therefore, the principles of contract law retain their significance and these principles can be used for both the present legal treatment of smart contracts and the future regulation with the aim of more practical contract law remedies in cases of smart contracts’ pathology.
159 P. PAECH, 80. MLR 2017, p 1097; L.A. DIMATTEO & C. PONCIBÒ, 26. ERPL 2018, p 817. See also C.M. CHRISTOPHER, 69. U. Kan. L. Rev. 2021, p 524; T. CUTTS, 122. WVLR 2019, p 436; H. EENMAA-DIMITRIEVA & M.J. SCHMIDT-KESSEN, 35. CLSR 2019, p 83; M. KAULARTZ & J. HECKMANN, 32. CR 2016, p 620. See also N. KUPKA, 43. ZIP 2021, p 842.
160 See K. WERBACH & N. CORNELL, 67. DLJ 2017, p 364; M. DUROVIC & A. JANSSEN, 26. ERPL 2018, p 767; J. JIANG, 15. UCLR 2018, p. 141; J.G. ROHR, 67. Clev. St. L. Rev. 2019, p 77; A. LUESLEY, 19. Asper Rev. Int’l Bus. And Trade L. 2019, pp 164–169; R. HERIAN, 30. I&CTL 2021, p 29; C. BUCHLEITNER & T. RABL, Ecolex 2017, p 10; M. HECKELMANN, 71. NJW 2018, p 508.
161 See A. GUADAMUZ, 35. CLSR 2019, p 12. 162 See also M. DUROVIC & F. LECH, 5. ItaLJ 2019, p 505 on the issue of anonymity considering the
validity of the contract. 163 See R. DE CARIA, 6. ItaLJ 2020, p 368; A. JANSSEN & N.G. AHUJA, 20. IHR 2020, p 5. See however
A. GUADAMUZ, 35. CLSR 2019, p 11; C. BUCHLEITNER & T. RABL, Ecolex 2017, p 10.
801
Reproduced with permission of copyright owner. Further reproduction prohibited without permission.