# Blockchain and Smart Contracts for Insurance: Is the Technology Nature Enough?
## 2 How Blockchain Works
Since smart contracts' conditions are based on data stored in the blockchain, they need to rely on external services, which take data from the \"real\" world (e.g., from death records) and push them to the blockchain (or vice versa). These services are referred to as \"oracles\" [28]. By considering the testator's example, an oracle could inspect death records to identify whether the person passedaway. If so, it could write this information on the blockchain (e.g., by changing the value of a Boolean variable indicating whether the person is alive or not). The smart contract, then, would trigger a conditional statement (based on the value of the variable), and execute the block of code initiating the money transfer. Based on the type of information collected and on the interaction with the external world, oracles have been grouped into \"software\"/\"hardware\" oracles, and \"inbound\"/\"outbound\" oracles [29]. Software oracles are in charge of extracting information mainly from Web sources, whereas hardware oracles are meant to extract information from the physical world (e.g., through sensors). Inbound oracles insert information in the blockchain, whereas outbound oracles allow smart contracts to send information to the external world (e.g., letting hotels' intelligent lockers unlock themselves as soon as a person pays for a night). Oracles have a huge responsibility in the correct execution of smart contracts, as the insertion of wrong information could trigger a money transfer without possibility of refund. Thus, there are companies that have developed oracles that certify the authenticity of extracted data for a small cost [28]. In some cases, it could be worth relying on more than one oracle, e.g., by considering a situation as \"happened\" if 3 out of 5 oracles confirm it [30]. Recently, an even more complex application of smart contracts and oracles was proposed, which is associated to the concept of Decentralized Autonomous Organization, or DAOs [31]. In this context, smart contracts are used to encode rules to govern an organization, e.g., how decisions are taken, the weight of each member's vote, etc. The advantage is that no external party is required to verify that the organization is properly managed, and underlying rules can be verified by the wider public, ensuring transparency and trust. From the architectural point of view, it is worth remarking that there exist different types of blockchains, which differ in terms of read/write permissions. \"Public blockchains\" (such as the Bitcoin blockchain) are blockchains that could be readable and potentially writable by everyone. \"Private blockchains\" are blockchains that could be written only by organization members. Read permissions can be either restricted to the organization, or made public. In \"consortium blockchains\", a set of selected nodes belonging to different institutions control validation, and the blockchain is used to share information among participant institutions. Public blockchains are particularly useful when no central entity is available to verify a transaction, and full decentralization is needed. Private and consortium blockchains provide some advantages, such as lower validation costs and shorter validation times (given the fact that, because of the smaller number of nodes, the mathematical problem can be simplified), reduced risk of attacks (since nodes that validate transactions are known) and increased privacy (as read permissions could be granted only to selected nodes). Furthermore, in case of errors or bugs in smart contracts, private and consortium blockchains could extraordinarily modify or revert previous transactions. The choice of the type of blockchain to adopt should be based on the amount of decentralization required, and on time/cost constraints [8; 32].