Smart Contracts in Insurance. A Law and Futurology Perspective

Smart contracts are innovative contracts that differ from traditional ones in that they are self-executing, as they entail the possibility of representing contract terms in programming code that gets automatically executed on a blockchain or other distributed ledgers. Following the latest developments in blockchain technology, smart contracts have been the focus of growing attention and are currently among the major innovations that are taking place in financial services. This paper investigates the scope for their application in insurance both in the near and longer term, exploring the legal challenges that they pose.<br><br>The analysis shows that in the near term smart contracts will be mainly exploited to automate underwriting, claims handling and payouts. It considers how the automation of these processes will operate at law and emphasizes the impact that smart contracts can have especially on the reduction of transaction costs and on the very essence of the insurance contract – the insurer’s promise to pay.<br><br>Building on current technological developments, the paper then turns to the role that smart contracts can play in insurance in the longer term, advancing the prospect of the automation of the entire insurance contract. In particular, it argues that the interaction between smart contracts and artificial intelligence and machine learning can challenge traditional frameworks of thought such as incomplete contracting and, in the farther-distant future, will culminate in contracts that will both self-interpret and self-enforce their terms – what can be called the true smart contracts. The analysis identifies and addresses the main legal issues that can arise in this context, exploring how to strike a balance between the goal of fostering innovation and the need to ensure policyholder and investor protection.


Introduction
The interlinkage between technology and insurance, commonly referred to as "InsurTech", has clearly gained momentum, in the wake of a trend that has spread, more generally, throughout the entire financial services sector. The number of venture capitalists investing in InsurTech has made a fourfold increase from 53 in 2012 to 217 in 2017. 1 In 2015, investments into technology-enabled insurance solutions came to $2.7 billion, registering a significant year-over-year growth since 2011. 2 After a slowdown in 2016, 3 the total value of funding reached $2.32 billion in 2017, which is a 32 percent increase on the previous year, 4 and the amount invested is expected to increase ever more as technology has the potential to bring innovation benefits in insurance. 5 Smart contracts are undoubtedly among the major innovations that are taking place in the insurance sector. From a legal perspective, the term "smart contract" refers to the possibility of representing a legal contract in programming code that gets automatically executed on a blockchain or other distributed ledgers.
In principle, the contract becomes self-executing, since once a pre-programmed condition is met, the relevant action is performed.
The connection between automationwhich is the hallmark of smart contractsand insurance is intriguing for its possible impact particularly in terms of operational efficiencies and certainty in the implementation of transactions, but also as regards the legal issues that it poses, as smart contracts have the potential to transform how insurance transactions are carried out. This paper investigates the scope for the application of smart contracts in insurance both in the near and longer term, exploring the legal challenges that they raise. In particular, after identifying potential applications of smart contracts in the near-term and examining how they may operate at law, the paper discusses the prospect of the automation of the entire insurance contract in the fartherdistant future. To this end, it adopts what might be broadly regarded as a futurology perspective, building on current technological developments to consider possible future advances in the use of smart contracts and explore how smart contract automation will interact with law.
The study rests on both practical and theoretical grounds. From a practical point of view, to investigate the innovation potential inherent in the use of smart contracts in insurance is clearly relevant. Smart contracts along with the underlying blockchain technology are viewed, in fact, as among the most important innovations since the Internet and they may have a significant impact on insurance by automating several processes, such as the underwriting of policies, claims handling and payouts.
The paper, however, is also grounded on a theoretical and more systematic perspective. The very idea of smart contracts and the resulting prospect of automating the entire insurance contract need to be confronted with the theory of incomplete contract. As complete contracts, that specify the obligations of the Electronic copy available at: https://ssrn.com/abstract=3318883 parties in each possible state of the world, are not feasible, standards are generally needed to take into account the specific circumstances of a case. Automation, however, typically hinges on rules, especially rules that can be expressed in a conditional logic, while standards for their inherent nature are flexible and can hardly be coded, thus being crucial to consider in the first place to what extent the insurance contract can be automated and the conditions for the possible automation of the entire contract.
Moreover, to suggest another theoretical and systematic implication, it is worth noting that smart contracts bear on the essence of an insurance contractthe insurer's promise to pay. By automating processes and ensuring the payment of claims once the relevant conditions are triggered, smart contracts can reinforce the insuring agreement and transform the relationship between the insurer and the insured.
The paper proceeds as follows. After this introduction, Section 2 discusses the phenomenon of smart contracts by exploring their basic technical functioning, as any study of the legal implications of smart contracts needs to build on an understanding of their nature from a technical point of view. Section 3 addresses the role that smart contracts are likely to play in insurance in the near-term, also by discussing some of the projects that are currently being implemented in the industry. Section 4 expands on this, discussing the prospect of the extension of the role of smart contracts to potentially automate the entire insurance contract.

The technical functioning of smart contracts
Computer scientist Nick Szabo was the first, in 1996, to refer to smart contracts as innovative contracts that are "smart" 6 since they are "far more functional than their inanimate paper-based ancestors." According to Szabo a smart contract is "a set of promises, specified in digital form, including protocols within which the parties perform on these promises." 7 Although there is no settled definition of the term, a smart contract can be considered as a contract that can be automatically enforced in accordance with pre-defined conditions. 8 The typical and basic example is a vending machine: once a person has satisfied the conditions of the contract by inserting money into the machine, the machine automatically performs its obligation and delivers the product. 9 Smart contracts have the potential to go beyond vending machines and apply to all sorts of contracts that are capable to be coded. In this perspective, a distinction can be drawn between smart contracts stricto sensu (aka "smart contract code")in computer science, basically, computer code executed on a blockchainand smart contracts in law (aka "smart legal contracts")contract terms represented in programming code, capable of being self-executing. 10 This distinction is relevant to point out possible translation issues from the natural and legal language into the code operational semantic, and possible consequent limits on representing a legal contract in programming code. To the extent that all or 6 The Oxford English Dictionary defines the word "smart", in relation to a device, as "programmed so as to be capable of some independent action." 7 Szabo 1996. 8 See Clack et al. 2017, p. 2. 9 Szabo 1996 See Clack et al. 2017, p. 2. part of a traditional legal contract can be expressed into code, the contract may become self-executing, i.e. a smart contract.
The growing attention that smart contracts have recently got follows the wake of the latest developments in blockchain, as smart contracts are built on top of this technology and their potential clearly depends on the blockchain infrastructure. 11 The computer code, in fact, is digitally recorded on a blockchain or other distributed ledgers and runs on the computers connected to the network through the Internet (the so-called blockchain nodes), 12 thus implementing the contract. 13 Although the type of code may vary depending on the blockchain protocol on which it has to be executed, suffice it to say that there are protocols such as Ethereum that have turing-complete programming capabilities, thereby supporting programming languages that have no limitations in terms of the logic that can be implemented and that can serve virtually any smart contracts (socalled "general purpose programming languages"). 14 In principle, the functioning of smart contracts is straightforward and fits into the scheme "if A, then B", that is if a certain predetermined event or condition occurs, a consequence automatically follows. Somehow simplifying, for 11 See generally Gatteschi 2018, p. 1;WillisTowersWatson 2016. 12 Each node keeps a complete history of the transactions executed on the blockchain. Transactions are grouped together in data structures called blocks, and each block incorporates a unique reference to the prior block, thereby making it exceptionally difficult to alter an entry in the blockchain. See Amuial et al. 2016, § 1.2. 13 Once the smart contract code has been programmed, the execution of the smart contract cannot be prevented, unless provided for in the code: Wright and De Filippi 2015, p. 35. 14 Amuial et al. 2016, § § 2.3, 2.20 (explaining that often "object-oriented" languages are used, which follow a design pattern that is built with objects like, for example, a digital representation of a car or of a human being. Objects can store relevant attributes such as the car model, the manufacturer, the production year, etc.); Cuccuru 2017, p. 186. See also Wright and De Filippi 2015, p. 12 (noting that some open source projects aim at developing programming languages for ever more sophisticated smart contracts). example, in the case of automobile insurance an insurance company may create a smart contract providing that the policyholder has to be indemnified whenever a damage covered under the policy occurs. If a claim is filed and the insurance company approves it, the smart contract automatically credits the policyholder's account with the amount due under the policy. Every single step outlined above might be automated so that also the claim can be both automatically filed through black boxes or other devices that are incorporated in the car, registering the accident and notifying the insurer, and potentially even automatically assessed.
Recent news, for instance, is that Liberty Mutual is engaged in developing automotive apps that should allow to assess car damages in real-time using the camera of a smartphone. The app uses anonymized claims photos to make a comparative analysis of the user's damage and provide a specific repair cost estimate. In the longer term this might result in a reduction of the costs of claim adjustments and possibly in more efficient claim processes. 15 Compared with existing reality, in this scenario all processes would be automated since if the preprogrammed conditions are met (e.g. the claim is approved and the damage quantified) the smart contract automatically performs the relevant action (i.e. the indemnification of the policyholder). Nuances might be added to this example and a more sophisticated smart contract might be structured, envisioning a future where, with the advent of driverless cars, the smart contract might even direct the car itself to an accredited garage for its repairment. 15 Sennaar 2017. Obviously, the potentials of smart contracts can be maximized if they interact with external information provided by trusted third-party oracles or Internet of Things (IoT) devices that connect to the Internet through incorporated sensors, enabling information gathering. 16 The best known examples are data collected from devices embedded into motor vehicles (so-called "telematics insurance") or sensors placed in private homes or business premises. 17 The need, however, to ensure the reliability of the data gathered is clear as the smart contract automatically performs based on the inputs it receives and corrupted information would negatively affect the desired outcome. 18 Increased functionality, however, generally requires more programming code to be executed on the blockchain, and this may result in a higher likelihood of code errors and possible incidents that may pose threats to the security and reliability of the smart contract innovation. The implosion of The DAO, one of the earliest decentralized autonomous organizations, provides a good example of this risk, as in that case a flaw in the smart contract code led to a multimillion-dollar loss. 19 As the analysis below will show, the automation inherent in smart contracts can bring several possible benefits to insurance in terms, for example, of higher efficiency, reduction in costs and human errors, fraud detection, but the need to 16 U.S. Federal Trade Commission 2015, p. 5 (noting that IoT devices can be defined as the connection of physical objects to the Internet and to each other through embedded sensors and wireless technologies, creating "an ecosystem of ubiquitous computing"); O'Brien 2016, p. 12 (noting that the key IoT areas are: wearables (e.g. smart wrist bands), connected cars, connected homes, connected cities, and industrial sectors such as transportation, oil and gas, and healthcare). 17 OECD 2017, p. 27. 18 See Amuial et al. 2016, § 2.5 (emphasizing that oracles must be trusted entities that submit the information relevant to the smart contract through cryptographically signed messages). 19 Coppola 2016;Amuial et al. 2016, § 2.3. continue developing adequate operational standards remains strong, 20 since any further advance in the smart contract innovation will necessarily come from enhancements to the security of the underlying technology and coding system. In this perspective, initiatives such as the B3i consortium that brings together (re)insurers and brokers from all over the world to develop common operational standards for the application of blockchain and smart contracts to the (re)insurance industry 21 are undoubtedly worthy of attention as they can enable further advances in the use of this technology and promote convergence in the insurance industry. Regulatory sandboxes can also play an important role, allowing innovators to test their products in a controlled environment under the supervision of the competent authorities.

Near-term applications of smart contracts to insurance
Traditionally the insurance industry has not been quickly responsive to recognizing and exploiting the value of technological innovations, but that tendency seems now moving in the opposite direction and the increasing traction recently gained by smart contracts and the underlying blockchain technology raises the question of what applications smart contracts can actually have.
To begin with, the most typical and immediate application seems to lie in the automation of claims handling and payouts, as these processes rest on the 20 See generally IAIS 2017, p. 7. 21 The Blockchain Insurance Industry Initiative (B3i) was formed in 2016 by 15 global (re)insurance companies mainly to explore and test the potential of blockchain in insurance. In 2018 the founders of B3i incorporated B3i Services AG in Zurich, to commercialize blockchain solutions for the (re)insurance industry. same conditional logic that smart contracts use, and therefore they can be easily automated in line with the "if/then" scheme outlined above, so that if the risk covered under the policy occurs, then the smart contract automatically indemnifies the insured. Current pilot projects are mainly focused on property and casualty insurance, but the prospect of smart contracts in life insurance is also relevant as the insured event is capable of being represented into a binary data form. In general, the examples of possible use cases can be many, and virtually every insurance payout might be automated, although automation is truly appreciated where the insured event can be easily ascertained as the advantage is likely to be lower if more complex assessments are required and third parties need to be involved in the process. In addition to the insurance company and the insured, in fact, other parties, such as assessors, mechanics, technicians, may interact with the smart contract and add relevant transactions to the blockchain ledger, according to the terms of the insurance contract. For example, it is possible to involve a certified mechanic in order to provide for automatic indemnity to the policyholder only if the vehicle is repaired at that mechanic, with the mechanic itself confirming this by sending a transaction to the smart contract. 22 Or, to make another example, the smart contract may be programmed to trigger different deductibles depending on whether or not the repairs are carried out by certain repair shops, with the repair shops that have to add the transaction to the blockchain ledger. Obviously, especially where the transactions have to be manually sent to the ledger, the more the transactions are the less instantaneous the execution of the smart contract is going to be, so that the result would be more what might be called a 'mechanized contract' based on manual inputs rather than a real automated contract.
When the payment is triggered by inputs deriving from trusted oracles or IoT devices, however, the results can be truly surprising. For instance, this is the case of the "smart" flight insurance products developed by the start-up InsurETH or by AXA that created smart contracts capable of automating claims and refunds for flight delays or cancellations, relying on flight status information provided by oracles. The impact of this innovation is significant as data shows that only a very minor percentage of policyholders actually file flight insurance claims, while by using parameters to trigger the performance of the contract all policyholders would be automatically compensated as soon as a cancellation or a delay is reported. 23 The connection of smart contracts with the IoT is also interesting, all the more so since in the near future virtually all physical objects in the world are expected to be connected to the Internet. 24 Devices placed in private homes, automobiles and other vehicles, or business premises can transmit real-time information about, for example, water or gas leaks, fires, thefts and other accidents triggering automating claim processing, but also allowing for immediate intervention and assistance, 25  costs. 26 An illustrative example is given by the UK startup Neos that provides a connected home insurance service, offering continuous assistance through smart sensors that can alert homeowners to problems via a smartphone app in order to prevent possible damages. Incidentally, it is worth noting that this can affect the insured's duty to mitigate the damage as traditionally understood since, to the extent that insurance companies will be responsible to provide the IoT devices to the insured and ensure their proper functioning and continuous monitoring, it is reasonable to conclude that the above-mentioned duty will become larger in scope as not only the insured but also the insurer would be in the position to take reasonable measures to avoid the loss and mitigate damages. 27 Micro-insurance products that typically allow low-income people in developing countries to have access to insurance services are also likely going to benefit from the use of smart contracts, as these products, for their very nature, call for low transaction costs and simplicity in claim processing. Payouts triggered by publicly available weather data are already a reality in the case of cropinsurance or weather-based insurance more generally. 28 Also, index-based agricultural insurance permits to determine payouts using indexes that are correlated with losses caused by insured risks such as floods or pests, taking into account different variables such as precipitation, vegetation levels, woodland management, and it has emerged as a way to increase availability of coverage for 26 WillisTowersWatson 2016, p. 3. 27 The slogan on the website of Neos, the home insurance start-up mentioned above in the text, is quite telling on this point as it states "[n]o matter where you are in the world, you're connected to home, giving you the confidence and comfort that Neos is looking after the place that matters most.". See Neos 2018. 28 WillisTowersWatson 2016, p. 2. smallholders. By relying on these indexes, in fact, insurers can issue compensation payments without having to assess the loss at the single farm level, and once the relevant data are transmitted to a smart contract, the entire process would be automated. 29 The advantages deriving from the use of smart contracts in these cases are self-evident, considering the benefits that automation would bring in terms of making claim processing faster and cheaper, and enhancing trust between the insurance providers and the micro-insurance clients. Moreover, the use of smart contracts on digital platforms may foster direct sales channels particularly for less complex coverages such as auto insurance and for mass insurance and micro-insurance products, with possible reduction in their costs. 30 In addition, the potentials of smart contracts can also extend beyond claims handling and payouts to include the automation of underwriting. In particular, smart contracts can play an important role in setting rates, by relying on big data analytics and access, for example, to usage and demographic data. In the autoinsurance industry, GPS data might be used to collect premiums based on the kilometers driven. Devices placed in the vehicles might also gather information on how fast, or when a person drives, or about her braking patterns to determine and charge personalized, and possibly lower, premiums. Also, it is interesting to note that some dental insurance contracts might adjust premiums automatically depending on the brushing habits of the insured. 31 This is the case of the smart toothbrush developed by the dental insurer Beam, that tracks all the oral hygiene 29  of a person and uses that information to charge rates for dental insurance plans. 32 In all these cases a smart contract would read the data and automatically compute the premium or apply discounts or extra charges, by performing a risk assessment according to the programmed code. 33 The same might be true for smart wearable devices that may transmit data to the smart contract about, for example, health and fitness conditions. More accurate rates thus might be set and, in principle, there could be the possibility of real-time pricing that would clear the way for pay-asyou-go types of coverage.
It is also possible to assume that in a less-near future insurance companies would be interconnected with several accredited third parties, institutions and authorities that would record relevant information on a blockchain ledger, so that premiums might be automatically calculated by smart contracts receiving inputs, for example, from hospitals and other medical centers that would transmit official records of treatments, other insurance companies that may send data about previous claims of the applicant, police departments sending information about criminal records. 34 Privacy concerns and data protection are clearly among the main obstacles to this scenario, other obstacles being the need to ensure the quality of the data and to systematically involve as many different actors as possible to gather enough data and make this scenario feasible.
Moreover, the very decision on whether or not to underwrite a certain risk might be automated. In the context of peer-to-peer insurance where typically 32 Farr 2018. 33 See Gatteschi 2018, p. 8. 34 Gatteschi 2018, p. 8. insureds self-organize to pool funds and administer their own coverage, votebased oracles connected to smart contracts can determine whether to assume a certain risk based on the majority decision of the group participants. 35 Even data from social networks might be used to this end, as in the case of Dynamis, a U.S. company that has implemented a smart contract for peer-to-peer insurance that provides supplementary unemployment insurance by using data from LinkedIn in order to verify a person's identity and employment status, and automate underwriting and claims handling. 36 More generally, a major impact on the automation of both underwriting and claim processing is likely to result from the application of artificial intelligence to smart contracts. As it is well-known, "artificial intelligence" generally refers to the capacity for a machine to have human-like abilities such as reasoning, learning, decision-making, and the fact that today machines are able to perform ever more tasks that normally require human intelligence is undisputed. 37 This holds true in insurance as well, where artificial intelligence is applied ever more to predict premiums and claims and to permit fast settlements and targeted investigations, since it may allow to go through a large number of claims and select those that require further investigation before being paid or settled, thereby contributing to curb fraud 38which is notoriously a severe problem for insurance 35 WillisTowersWatson 2016, pp. 2 f. 36 Huckstep 2016. 37 The examples can be many: automatic translation services, face recognition systems to unlock smartphones or for criminal investigations, medical diagnosis, self-driving vehicles, machines playing games, machines that are able to create paintings or musical compositions. See Reillon 2018, pp. 2 ff. 38 See Borselli 2018, p. 41. companies. 39 In this scenario, to the extent that artificially intelligent algorithmic systems can make underwriting and claims handling decisions, a smart contract would receive the relevant input and execute the decisions, thus automating these processes.
As the discussion above shows, in the near-term, most probably in the next five years or so, smart contracts will be mainly exploited to start automating underwriting, claims handling and payouts, and their impact on these processes can be significant, especially when they are used in conjunction with third-party oracles, IoT devices and artificial intelligence. In particular, automation will clearly lead to higher efficiency as the speed of claims handling would increase, while the costs and possible human errors associated with manual processing are likely to reduce. From a more theoretical and systematic perspective, it should be noted that smart contracts can reinforce the insuring agreement, as they act on the essence of an insurance contract -the insurer's promise to pay. By automating payouts and ensuring that claims are actually paid in accordance with the terms of the contract, smart contracts enhance the trust between the parties since, on the one hand, valid claims would be automatically processed and paid while, on the other hand, the technology interconnected with the smart contract can facilitate targeted investigation and this would permit to detect and deny fraudulent claims more easily. It is clear that the effect will be a reduction in transaction costs, namely in the costs of policing and monitoring the other party to make sure that 39 In 2016, for example, insurance companies in the U.S. lost more than $50 billion due to fraud: Sengupta, 2017. his obligations are carried out as provided by the contract 40 and, more generally, the costs of ascertaining and proving the existence of relevant facts, 41 most notably the occurrence of the insured event.
To the extent that the use of smart contracts is limited to the automation of underwriting and claims management, the question whether a smart contract can be a substitute for a traditional legal contract written in natural, human language seems not relevant. In this case, in fact, there would be no reason to assume that the parties would not execute a traditional contract as they still need to agree on the terms that will govern their relationship such as the scope of coverage, definitions, extensions, exclusions, conditions and general provisions. Irrespective of whether the contract is concluded in person, online or more generally at distance, a traditional legal contract will be in place, and the possible automation of underwriting and claims management would only represent a modality of execution of that contract.
That is to say, the smart contract and its underlying programming code would provide a mechanism for the automatic execution of some aspects of a traditional legal contracti.e. those aspects that are capable of being represented in conditional logic.
Considering that the programming code cannot serve as a regulatory instrument unless recognized as such, it follows that contracting parties have to assent to the adoption of a smart contract to automate underwriting and claims management, while no enabling laws seem needed as the consent of the parties to the contract would suffice to this end. Enabling laws, nonetheless, might prove valuable to foster the use 40 See Coase 1937, pp. 386 ff.;Coase 1960, 15;Dahlman 1979, p. 148. 41 See Scott and Triantis 2005, p. 190. of this technology, by removing any uncertainty about its legitimacy. 42 The legal contract does not need to incorporate the smart contract's code as normally the policyholder cannot be supposed to understand the code and to assent to it.
Anticipating arguments that will be developed in the following section, it is reasonable to expect that, especially in adhesion contractswhere the policyholder, typically a consumer, adheres to the contract with little or no choice about its termsthe policyholder would simply consent to a provision stating that certain contact clauses (e.g. those regulating rate setting or payouts) are automatically executed through a smart contract, while the insurance company would be responsible to use the appropriate computer code, so that the smart contract would function in accordance with the relevant terms set out in the legal contract. 43

The prospect of truly smart contracts
Stanford University's scientist Roy Amara supposedly warned that "[w]e tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run." 44 Bearing in mind the "Amara's law", the discussion above clarified that the potentials of smart contracts in insurance in the near-term mainly lies in the automation of underwriting, claims handling and payouts, and this appears to be a quite realistic perspective as the projects that are currently 42 Consider, for example, the Delaware Blockchain Initiative promoted in 2016 by then-Governor Jack Markell to foster the use of the blockchain and smart contract technology in Delaware, and that resulted in the enactment of Senate Bill n. 69 in 2017 which provides an enabling regulatory framework for the use of this technology by corporations incorporated in that State. See Tinianow and Long 2017. See also Parker 2017 (reporting similar initiatives in other U.S. states). 43 But see Levi and Lipton 2018 (arguing, with respect to smart contracts in general, that the text of the legal contract should include a representation by each party that they have examined the smart contract's code and that it matches the text of the legal contract); 44 Ratcliffe 2016. being implemented in the industry demonstrate. 45 In order not to underestimate, if not ignore, the effects of smart contracts in the long run, however, a fundamental question to be considered is whether their role can extend beyond the scenario discussed above to include in the future the automation of the entire insurance contract.
In addition to underwriting and claims management, several insurance contract clauses might be automated, since they meet the binary logic criterion, as in the case, for example, of the provisions regulating the maximum amount that can be paid under the indemnity principle, underinsurance and overinsurance, or also the aggravation or reduction of the risk. 46 In these instances, in fact, a smart contract can be programmed so as to trigger the relevant legal consequences, thereby ensuring that, according to the indemnity principle, the amount to be paid case of a reduction of risk and also allowing the automatic exercise of the possible withdrawal right of the insurer 47 if the reduction in the premium is lower than a predetermined amount. In some instances, technology would also innovate insurance contract rules. For example, still with respect to the aggravation or reduction of risk, the duty of the insured to inform the insurer about changes in the risk will lose relevance since it is reasonable to assume that in most situations IoT devices and, more generally, monitoring technologies provided by the insurer will be responsible to detect and signal changes in the risk, so that the focus will very likely shift on the responsibility of the insurer to make sure that the devices function properlysimilarly to what has been argued above regarding the possible remodeling of the insured's duty to mitigate the damage. 48 It should be noted, however, that certain features of legal rules can hardly be captured in binary logic. 49 Just to make one example, take the case of overinsurance mentioned above, where the insurer typically has the right to avoid the contract if the policyholder acted with fraud to obtain insurance for an amount higher than the value of the insured property and, if in good faith, can also keep the premium. 50 The question arises as to whether concepts like fraud or good faith can be expressed in conditional logic. More generally, the very idea of automating 47 See Article 1897 of the Italian Insurance Code (providing for the right of the insurer to withdraw from the contract within two months after receiving notice from the insured). 48 See above Section 3. 49 See Surden 2012, p. 636 (stating that "some-but not all-contractual terms or conditions can be meaningfully represented in terms of data and rules for the purpose of automated assessment"); Clack et al 2017, pp. 5 ff. (distinguishing between operational and non-operational aspects of a legal contract, the latter being the parts of a contract that cannot be automated); De Filippi and Wright 2018, pp. 76 ff. (noting that some contract clauses and terms are not suitable for being represented into programming code). 50 See Article 1909 of the Italian Civil Code, which is a rule common to several other European jurisdictions, as Articles 2:101 and 8:103 of the Principles of European Insurance Contract Law demonstrate. the entire insurance contract, and not just selected clauses needs to be confronted with the theory of incomplete contracts. Although there is no widely accepted paradigm of incomplete contracting, 51 somehow simplifying for our purposes, this theory generally posits that complete contingent contractsthose that specify the obligations of the parties for each possible state of the worldare not feasible since, particularly where the future contingencies are complex and uncertain, the parties would incur transaction costs and difficulties in foreseeing all the possible contingencies and comprehensively regulating them in a contract. The contract, moreover, would be too costly to enforce, as courts or arbitral panels would have to distinguish among innumerable and complex contingencies. 52 It follows that standards are normally used to fill in gaps in the contract, as they are flexible, thereby allowing the parties to take into account the specific circumstances of a case. Terms such as "good faith", "reasonableness", "best efforts", "diligence", "materiality" are thus common in virtually all contracts, the insurance contract included. Automation, however, rests on rules, especially rules that can be expressed in a conditional logic. 53 Thus, when it comes to the automation of the entire insurance contract, this can represent an important obstacle to making it a reality. 54 51 Maskin and Tirole 1999, p. 83. 52 See Hart and Moore 1999;Maskin and Tirole 1999;Scott and Triantis 2005. 53 As no contract can incorporate rules for every single state of the world, drafting rules that are not tailored to specific contingencies is not a viable course of action as they can prove to be either too broad or narrow in scope, unlike standards. See Casey and Niblett 2017, p. 1402 f. 54 See e.g. Cuccuru 2017, pp. 189 f. (stating that "code lines are not able to render 'grey areas', everything is either 1 or 0" and thus agreements that require a certain degree of flexibility cannot be converted to smart contracts).
It is nevertheless possible to predict a world where smart contracts, combined with future developments in artificial intelligence and machine learning, might challenge traditional views and change contracting practices, automating the entire contractual relationship of the parties. The algorithms behind artificial intelligence identify statistical correlation in the data they analyze, thereby enabling machines to perform tasks that would require human intelligence. 55 Due to the ever larger quantity of data available and improvements in algorithms, 56 the applications of artificial intelligence today have increased, and together with machine learningthat is algorithms that allow machines to selflearn from data and make predictionsartificial intelligence has the potential to transform large sectors of the economy. 57 Data-driven automation already plays a major role in legal practice and scholarship. E-discovery clearly demonstrates the potentials of data analytics in the law, as it changed how law firms execute discovery processes, replacing activities once performed by legal practitioners. 58 Also, algorithms have been developed to summarize and classify the law. In a recent law review articleto mention one notable example -Professors Eric Talley and Gabriel Rauterberg conducted an empirical research using machine learning techniques to develop a data set of "corporate opportunity waivers"i.e. contractual modifications, permitted by some U.S. state statutes, of the duty of corporate fiduciaries not to 55  usurp business opportunities that belong to the corporation, a subset of the general duty of loyaltyin U.S. public companies' filings with the Securities and Exchange Commission. While no systematic research was made before in this field also due to the impossibility to manually collect the relevant data in an efficient way, the authors trained a machine learning algorithm to automatically classify the selected documents, thereby revealing important empirical findings. 59 The potentials of this approach can clearly extend to other areas of law.
Advances in cognitive computing and natural language processing will allow machines to process unstructured data such as contract clauses, statutes and rules or court opinions, and this will be instrumental in fully automating legal contracts. Several initiatives are in place to this end. An open source package, for instance, allows to turn real legal materials into structured data objects thus facilitating, among other things, the conversion of legal contracts into smart contracts. 60 Another project attempts to draft legal contracts through the use of a domain-specific programming language designed to capture the features of law and its semantics and logic, its credo being "software is eating law." 61 Aside from the promotional teasers of these and similar projects, it seems unquestionable that 59 Rauterberg and Talley 2017;Rauterberg and Talley 2016. 60 Reference is made in the text to the product LexNLP by LexPredict. See https://contraxsuite.com/lexnlp/; Bommarito et al 2018. 61 This is the case of the product called Legalese, provided by Legalese Pte. Ltd. See https://legalese.com. Similarly, other projects aim at developing coding platforms to create legal contracts in the form of code-based principles and permitting the integration of the contract code with the blockchain: see e.g. https://openlaw.io, or https://contractCode.io. See also Dewey 2017. several efforts are tending toward the reduction of contracts and, more generally, legal documents to computer code. 62 The turning point, however, will come when artificial intelligence and machine learning will be used to predict legal outcomes. Predictive technology is still in its infancy, but some advances have already been made and further improvements can be expected. Data may be collected from statutes and rules, case law, regulators' decisions, expert reports and other legal materials, and analyzed through algorithms in order to determine the possible legal outcome of a specific case, 63 even potentially considering how possible ideologies of judges or arbitrators may influence their decision-making. 64 Several academic studies found that algorithms can actually be used to predict court decisions with a quite high degree of accuracy, 65 showing that they may do even better than legal experts. 66 Decision-making can become more accurate and consistent. 67 Thus, it should not be surprising that software exploiting artificial intelligence and machine learning to predict how courts will decide a case, taking into account the specific factual 62 For a relevant example, see  Allen and Widdison 1996, p. 29. patterns, is already commercially available. 68 Obviously, the more legal data of good quality are available, the smarter artificially intelligent machines can become, and initiatives such as that launched by the Harvard Law School Library, the world's largest academic library, that aims to digitize its entire collection of U.S. case law and make it freely accessible online 69 certainly point in that direction.
In this scenario, parties to the contract would rely on artificial intelligence and machine learning technologies to interpret the contract terms and apply those terms to the specific facts and circumstances of a case. 70 From this perspective, "automation of the entire insurance contract" should be taken in its broadest sense, so as to imply that the contract itself would self-interpret its own terms and be completely self-executing. To put it another way, both the interpretation and the enforcement of the contract terms would be automatedwhat can be called the true smart contract.
In order to make this discussion more concrete and appreciate the potential for full contract automation in insurance, it is worth considering some possible 68 Tax Foresight, for example, is a product developed by the companies Blue J Legal and Thomson Reuters that allows to predict legal outcomes in tax cases. See http://www.bluejlegal.com/taxforesight; Alarie et al 2017 (reporting that in out-of-sample testing the software got more than 90% of predictions correct). For several other interesting examples see Rayo 2018. From a more general perspective, it is worth noting that algorithms have been used in criminal sentencing as a tool to predict recidivism risk. See e.g. State v. Loomis, 881 N.W.2d 749 (Wisc. 2016) (holding that proper consideration of risk assessment algorithms at sentencing does not violate a defendant's right to due process). 69 See Harvard Law 2015 (stating that the Harvard Law School Library's collection comprises over 42,000 volumes accounting for a total of approximately forty million pages of court decisions, and that this so-called "Caselaw Access Project" is carried out with the support of Ravel Law, a legal research and analytics company). 70 See Casey and Niblett 2017b, pp. 101 ff. (arguing, however, that not only the interpretation but also the very creation of the contract terms can be automated since, with advances in predictive technology, so-called "self-driving contracts" will proliferate, where the parties agree to broad ex ante objectives and let automated analytics translate these objectives into specific terms at the time of performance, based on information gathered after the execution of the agreement). applications of predictive technology to the insurance contract. Take, for instance, the duty of disclosure, a subset of the general duty of good faith, which is ubiquitous in all insurance contracts. In virtually all jurisdictions the prospective policyholder must disclose to the insurer material facts affecting the risk and, based on this information, the insurer determines whether to accept the risk and what premium to charge. In the event of material misrepresentations or nondisclosures, different remedies are available to the insurer, typically ranging from avoidance of the contract to the right of withdrawal, depending on whether the applicant acted with gross negligence or fraudulent intent, or simply with negligence. 71 Needless to say, this issue is highly litigated, as the policyholder may find herself in a situation where either coverage is denied or the amount to be paid under the policy is reduced, and it is clear that several legal standards are at stake to decide a possible disputemateriality, negligence, gross negligence, good faith, just to mention some of them. An artificially intelligent algorithm might process all relevant data, such as applicable statutes and case law, and make an autonomous decision like avoidance of contract or not to pursue any remedy at all if the inaccuracy is considered as not material. A smart contract, as soon as a possible misrepresentation or nondisclosure is detected as a result, for example, of data sent to the blockchain by an assessor or information deriving from IoT devices.
Another prominent example of the potential room for automated analytics in insurance concerns the duty to settle, typically regarded as a U.S. legal doctrine, but recognized also in some European jurisdictions 72 , which in the context of liability insurance requires the insurer to settle reasonable claims within the policy limits. Although the standard of review may vary depending on the relevant jurisdiction, for our purposes suffice it to say that an insurer who refuses a reasonable settlement proposal and take unsound litigation decisions resulting in an excess judgment normally bear the full loss, that is it is liable for the entire judgment entered against the insured, including extra damages, in excess of the policy limits. It is no surprise that there has been a considerable amount of litigation over whether the insurer's decision not to settle in a particular case is reasonable or not, as this issue determines if the insurer or the insured bears the loss for the judgment in excess of the policy limits entered in favor of the thirdparty plaintiff. The focus becomes one of reasonableness, and the conduct of the insurer is also reviewed under the general duty of good faith and "based upon those principles of fair dealing which enter into every contract." 73 Also, several courts in the U.S. have held that the "test is whether a prudent insurer without 72 See Borselli 2016, pp. 156 ff. 73 See e.g. Hilker v. Western Automobile Ins. Co., 231 N.W. 257, 258 (Wis. 1930, one of the first duty to settle cases decided in the U.S. See also, for Italy, Cass. 5 February 2004, n. 2195Cass. 13 May 2008, n. 11908;Cass. 3 April 2014, n. 7768. policy limits would have accepted the settlement offer." 74 Predictive technology would collect and analyze data from the relevant statues and case law to understand how these standards operate in practice and, by applying the law to the peculiar elements of the case at issue, it would make the settlement decision. Once the smart contract receives the relevant input, the consequent action would follow, thus either accepting or denying the settlement proposal. There can obviously be other examples, but these two, also for the complexity of the laws involved, can be considered paradigmatic of the role that smart contracts, in combination with artificial intelligence and machine learning, may play in the future in automating the entire insurance contract. Besides being capable of transforming contract performance and enforcement, this smart contracting model will be accompanied by a substantially new approach to contract formation. The growth of online insurance exchanges and robo-advisors that can provide automated investment services is already a reality. 75 Especially in contracts that include a consumer as a party, it is realistic to expect that friendly interfaces will interact even more effectively with the prospective policyholder so as to allow her to choose the appropriate coverage, even with the support of images and other graphic representations that would display differences in the scope of coveragenot to mention the possible assistance of robot advisors, that can automatically match prospective policyholders to insurance products on a personalized basis, understanding the 74 Crisci v. Sec. Ins. Co., 66 Cal. 2d 425, 431 (1967). 75 Baker 2018, pp. 714 ff. client needs and proposing the appropriate coverage. 76 Similarly, the prospective policyholder will be able, in principle, to subscribe a larger or narrower policy by selecting exclusions and extensions from among predetermined lists, and possible inconsistencies between the coverage sought and the one selected as well as changes in the premium might be signaled in real time, not differently from what happens today when purchasing a railway or plane ticket, with computers signaling changes in the cost depending on the class of the ticket or on the seat that the passenger selects or proposing options on priority check-in or excess baggage. Pop-up windows and other dialogue boxes may also provide clear and basic explanations of the policy terms and send warning messages, so as to improve the intelligibility of insurance contracts. 77 Customer engagement in insurance will thus markedly increasea break with the past, as insurance, traditionally, has not been particularly sensitive to this issue. In a truly interconnected world the prospective policyholder may also find an application pre-completed with the relevant data received from accredited parties participating in the blockchain network, such as hospitals, police departments, regulatory agencies, or other insurance companies and, as long as the data are considered reliable, this is likely to deprive the duty to disclose of its meaning.
It is reasonable to assume that the natural language version of the insurance contract will continue to be available and coexist with the smart contract code and importance to master technology in today's society, and offerings of computer coding courses and the like in universities, law schools and other academic institutions are growing, a future where partiesconsumers in particularcan be supposed to understand and consent to contracts written exclusively in computer code now seems unrealistic. The fact that consumers notoriously tend not to read nor understand natural language contracts either, 78 only to pull them out should a dispute arise, is a different and broader matter that should generally lead to a higher degree of simplification and clarity in standard form contracts, 79 but cannot be an argument for the idea of contracts written only in programming code. Smart contracts combined with artificial intelligence and machine learning will be able to self-interpret and self-enforce their terms but contracting parties will still have to agree on the terms themselves in the first placenot differently from what happens today. 80 Even when the contract is concluded entirely through the support of user-friendly interfaces as illustrated above, the computer program will always generate the corresponding natural language version. 81 As in the case of the automation of underwriting and claims management discussed above, also for the automation of the entire insurance contract no enabling legislation seems strictly needed since it should be within the power of 78 See Ben-Shahar 2009, pp. 1 ff.; Bakos et al 2014, pp. 1 ff. 79 See e.g. the so-called "Letter to the Market" issued by the Italian Insurance Supervisory Authority on March 14, 2018, that urges insurers to simplify insurance contracts according to guidelines promoted by the Italian National Association of Insurance Companies (ANIA) in conjunction with major consumer and intermediary associations, in order to make the contracts more intelligible to the policyholders: IVASS 2018, pp. 2 f. 80 But see Casey and Niblett 2017, pp. 100 ff., envisioning a world where the contract itself will self-create its own terms, while the parties only set general ex ante objectives and let algorithms translate these objectives into ex post specific terms accounting for real-time contingenciesa future, this, which is truly fascinating but that appears too far-distant. 81 See Clack et al. 2017, p. 11. the parties to consent to contracts that would perform automatically. 82 Contracting parties, and the insured in adhesion contracts, will have to give their explicit assent to the automation of the interpretation and enforcement of the contract terms, in line with the principle established by the European General Data Protection Regulation that grants individuals the right not to be subject to a decision based solely on automated processing, including profiling, 83 unless the data subject gave her explicit consent. 84 As the discussion below will clarify, a regulatory framework, however, will be necessary to address the issues that true smart contracts might pose.
An important point to emphasize is that, although the contract would selfinterpret and self-enforce its terms, parties do retain their right to file suits in court or seek arbitration, should they disagree with the determinations executed by the smart contractexactly as when contract performance is based on human judgment. Even if smart contracts, by definition, aim at avoiding the need for enforcement proceedings, automatic performance might still turn out to be wrongful and parties should be entitled to contest it. 85 The judicial or arbitrator 82 As discussed in Section 3 above, enabling laws, however, might remove any possible uncertainty about the legitimacy of contract automation, thereby furthering the use of smart contracts. 83  , and includes "any form of automated processing of personal data consisting of the use of personal data to evaluate certain personal aspects relating to a natural person" to analyze or predict, among other things, aspects concerning that person's economic situation, health, personal preferences, reliability, behavior. 84 Article 22, European General Data Protection Regulation (providing also for other exceptions, such as when the decision is authorized by European Union or national laws that also lay down appropriate measures to protect the data subject's rights and freedoms and legitimate interests). 85 See Werbach and Cornell 2017, p. 376 (arguing that there will be a shift in litigation from claimants seeking fulfillment of promissory obligations to claimants seeking to reverse transactions already completed). review will clearly be on the merits of the automated decision and not on the underlying programming code and algorithms, as any automated decision will always be assessed against the relevant set of legal rules and doctrines. It might be the case, however, that contracting parties refer to the very decision of the algorithm to support their claims. For example, in the duty to settle context, where, as discussed above, it could be difficult to determine, in hindsight, if the insurer's decision not to settle was reasonable, the algorithm's determination, where properly documented, might turn out to be conclusive proof in cases that are on the borderline between a reasonable and a not-so-reasonable refusal to settle.
Over time, judicial and arbitrator review of automated decisions will align more and more the algorithms with the law. The more the algorithms are accurate, the less likely their decisions will be overturned by courts or arbitral panels, and the higher the trust that contracting parties in turn will place in the algorithms. A virtuous circle will ensue, where the number of cases litigated or arbitrated will reduce, and the newly rendered judgments or arbitral awards will contribute to refine the algorithms ever more.
Contracting patterns thus will evolve. Changes will be incremental, and this process will probably take decades to be completed. Smart contract codes and artificially intelligent algorithms will progress over time, as humans will continue improving them. To this end, there is no doubt that lawyers and legal scholars will be central to addressing and fostering the technology developments. Automation in law is not, and never can be, the exclusive realm of data scientists, computer engineers, mathematicians or statisticians. To make smart contracts and any other technological innovation a reality in the legal field, it should go without saying that technological knowledge and skills have to be complemented by a high degree of legal expertise to adequately recognize and navigate the complexity of legal systems.
As contracts will be able to make autonomous decisions and automatically execute them, the pressing issue is not whether computers can be granted legal personality since, 86 to the extent that parties give their assent to contract automation, it seems far more sensible to argue that the autonomous decision should be attributed to the relevant contracting party. Rather, law should focus on who the providers of smart contracts and artificially intelligent algorithm systems are and on how these technologies operate. 87 Specialized private companies are likely to enter this market 88 and, considering the resource commitments and expertise needed to provide effective services, most probably a few firms will end up dominating it, as in the case of the proxy advisory industry where the global players are in the order of two or so. 89 For the large quantity of data that they collect, insurance companies are also well placed to stand out as providers, 90 although it can be expected that in the initial stage they will engage the services of third-party vendors, to then follow a trend similar to the one that is developing in the market for e-discovery, where 86 For a discussion of the idea of computer's personhood, see Solum 1992Solum , pp. 1231  insourcing is more and more common. For obvious reasons, these new technologies will be targeted first at the largest insurance markets, such as the United States, Europe and China. Providers will have to differentiate smart contract codes and algorithms by jurisdictions as products will have to be calibrated against the relevant legal and regulatory framework. Although the sources of insurance regulation generally can be traced more and more at the international level, 91 insurance contracts are still largely regulated at the state level, and this is true both for the U.S., where insurance regulation traditionally has been the responsibility of the individual states, and for the European Union, where harmonization of insurance contract law among the Member States is overall limited. 92 It should be noted, nonetheless, that technology operational needs and reasons of economies of scale might lead to an increase in the standardization of insurance products across companies and countries, and be also a factor in determining further convergence of national insurance laws and regulations in the future.
As true smart contracts will mature and their potentials will become manifest, regulation should be established to address the issues that this risks without undermining innovation, only then to consider possible adjustments to the regulatory framework.
As a threshold matter, there will clearly be the need to ensure the security and reliability of the underlying technology and coding system, as the risk of flaws in smart contract codes and artificially intelligent algorithms is high, 93 and any realistic prospect of implementing contract automation in insurance will be rooted in the operational adequacy of the technology used.
Moreover, there might be room for abuse to the extent that the smart contract code and algorithms do not faithfully reflect the terms actually consented to by the policyholder and the applicable laws or, to put it another way, to the extent that the actual functionality of the smart contract is not adequately disclosed. 94 Although policyholders would have the right to file suit in court or seek arbitration as discussed above, it seems far from uncommon that a number of them, especially where consumers are involved, will decide not to do so either because they may find it not convenient to pursue the claim or because they would simply rely on the smart contract. In this case the need arises to protect the policyholder and promote transparency of automated decision-making. 95 In principle, regulation should be more robust where the policyholder is a consumer, while it might be lighter for contracts concluded between the insurance company and another business party that might be capable to protect itself. 96 This 93 See above, Section 2. 94  distinction, however, might be blurred in practice since not all business parties are likely to be so sophisticated that can be expected to understand the programming code and the relevant algorithms. Probably a scenario where private third parties would provide the smart contract might give more assurance of the faithful match between the code and the legal terms than the case where the contract itself is coded by the insurance company. Nonetheless, considering that insurance companies, as "repeat players", would most probably be the sole buyers of the smart contracts sold by third-party providers, conflicts of interests might arise and need to be addressed. In this perspective, the imposition of independence requirements on third-party vendors appears to be the most realistic prophylactic measure. In addition, joint and several liability should be imposed on insurance companies and third-party providers for damages due to flaws and discrepancies in the smart contract code and algorithms. The system should be backed by adequate monetary sanctions to deter fraudulent practices, and regulators should be given the power to access the programming code and the relevant algorithms to investigate alleged malfunctions and anomalies of the smart contracts, thus fostering the safety and reliability of the relevant technology. Over time, the need for third-party vendors and, even more, for insurance companies to preserve their reputation in their respective markets is likely to play a role in aligning the computer code and algorithms with the legal terms and ensuring the proper functioning of smart contracts.
Considering the global nature of the smart contract phenomenon and of technological innovation more generally, there is clearly a need for uniform standards of regulation, oversight and enforcement, also to avoid possible risks of regulatory arbitrage. To this end, supranational authorities and organizations, especially the International Association of Insurance Supervisors, can play an important role in developing common regulatory standards, so that regulators across the world can share a clear set of principles and objectives, thereby promoting a harmonized approach to the regulation of smart contracts in insurance.

Conclusion
The potential for contract automation in insurance appears significant. In the near-term, smart contracts can have a substantial impact on underwriting, claims handling and payouts, while in the farther-distant future there are grounds to assume that the entire insurance contract will be automated. For this scenario to occur, however, technological advances alone will not suffice. The ability to navigate the complexity of the relevant legal framework and ultimately integrate technology and law will be crucial to make contract automation in insurance a reality.
One might wonder, however, why contracting parties, in particular insurance companies, should embrace this path-breaking innovation. The obvious answer is that the scenario examined above, overall, will be superior to the current one, and in fact, as discussed, smart contracts can provide substantial advantages in terms of operational efficiencies and streamlined underwriting and claims management processes, fraud detection, more accurate rate setting resulting in personalized and possibly lower premiums, enhancement of trust between the insurer and the insured, customer engagement. The truth, nevertheless, is that technology will become more and more pervasive in insurance and society at large. It will permeate law and transform existing contracting patterns and, more generally, traditional paradigms. Yet, as technological innovation never takes place in a legal vacuum, law will play a central role in marking out a line of equilibrium between the objective of fostering automation and innovation in insurance and the need to ensure policyholder and investor protection.