When it comes to Blockchain, most users immediately think of cryptocurrencies and therefore of Bitcoins. However, the technology which created Bitcoins has far more extensive applications than cryptocurrencies. Smart Contracts are among those with the highest potential.
Distributed, public, open ledger
As is known, Blockchain creates a data ledger (with any data and of any type) updated by all the people who wish to use it, without the need for a central authority to check the update. A distributed ledger, i.e. created in many copies, all equally “true”, provided they comply with the protocols and preserve the integrity guaranteed by the continuity of the blocks linked to each other by the series of fingerprints or “hashes”. A public and transparent data ledger, therefore, created in a manner that any person can access it to check all the data written inside. A ledger which cannot be altered, because due to the nature of the ledger itself a technical effort would be required that would make the operation absolutely uneconomical. And last (but not least), a ledger based on open source applications, of which it is possible to verify the rules that these implement and their compliance, as well as to manage their change over time according to shared rules, without having to request a specific permission from the copyright holder.
A ledger is a ledger, a collection of data. But is that all? No, because someone has taken an additional step and has revolutionized the world of Blockchain, giving the possibility to “program” certain types of transactions by entering the Turing complete code (complete according to the definition by Alan Turing, the father of computer science). Vitalik Buterin is the one who has taken this step: interpreting a concept by Nick Szabo, he has in fact implemented Smart Contracts on his Blockchain Ethereum.
Smart Contracts, therefore, are nothing more than non-external applications added to the Blockchain, which, through an “if” environment, can self-execute and perform the operations permitted by its code with the limitations of the programming language. After being entered in the Blockchain, a Smart contract remains on the Blockchain itself, and once the conditions for which it is programmed occur it will self-execute, allowing the program to make the programmed/defined events it contains happen. All this takes place in a transparent way, as the Smart contract source code is available for anyone who knows its address, and as it cannot be modified, i.e. the Smart contract code itself is inserted in the Blockchain which, by advancing with its own “chain of blocks” will make the block containing it unalterable. Although at a first glance they appear to be applications that do not bring any benefit to everyday life, smart contracts are potentially revolutionary as they mathematically define what happens when a given event occurs, thereby automatically executing the contract, or part of it, as well as providing proof of execution.
Smart contracts can make everyday operations easier and, at the same time, increase the trust of users who decide to use them thanks to their transparency and to the fact they cannot be modified.
Some examples of potential applications
Let’s think of a few examples where you can create a smart contract:
- Cash on delivery: the seller delivers the package to the carrier, who requests payment of the amount from the buyer when delivering the package, with the latter then receiving the package by paying. The carrier then pays the amount to the seller
- Currency exchange: the foreign exchange agent buys the currency directly from the supplier, keeps it in his/her office or deposit location, and the end user buys it with his/her own currency, paying a price for the service
- Purchasing securities on the stock exchange: the user must open a portfolio of securities with a stock exchange operator, immobilize a sum with the stock exchange operator, and communicate to the operator (including electronically) the condition at which to buy or sell the stock exchange security. When this condition occurs, the stockbroker performs the transaction, entering the security into the user’s portfolio (or selling the security and transferring the amounts to the user’s portfolio).
- Bill or bank draft: the debtor fills in a document according to which the creditor will be able to collect the value on a given date. On that date the creditor must go to the bank and collect the amount, provided the debtor is not insolvent.
How could smart contracts solve and help with these procedures?
As regards the cash on delivery, simply by creating a smart contract which appropriates the sums of the good sold, and by continuously tracking the status of the package (perhaps on another blockchain with unchangeable data that contains the shipment data), automatically transfers the sum to the seller when it appears as “Delivered”, thus excluding the custody of the sum by the carrier.
As regards the currency exchange, simply by creating a smart contract to automatically convert the currency into another currency upon receipt of a certain sum, or to trade it with another currency of another portfolio to which it has access.
For the purchase of securities, all that is needed is a very simple smart contract which is allowed to analyze the trend of a security, and which purchases or sells the security when it reaches the amount set, transferring it to the portfolio to which it has access.
The bill or bank draft on smart contract is conceptually even easier: the smart contract must simply be set to freeze a transferred amount (in the case of the bank draft), and to release it at a certain future date set in the code, thereby also avoiding the risk of non-payment for the creditor; or be set up to transfer the established amount on the due date of the bill.
And the validity of the contracts?
Smart contracts are regulated in Italy through the Simplification Decree, which provides a clear definition, ascribing to them “the requirement of written form subject to the IT identification of the interested parties, through a process having the requirements set by the Agency for Digital Italy”. Even without such express recognition, therefore whilst awaiting technical regulations, it should be considered that, pursuant to the current legislation on electronic documents, registration in the Blockchain would provide a guarantee of non-modifiability to the registrations such as to constitute one of the requirements for the judge to recognize its written form, leaving to the context or to other forms of proof the necessary verification of non-repudiation and identification of the parties.
Even in the absence of recognition of the written form, however, in contract law a Smart contract would still be recognized as a verbal contract supported by proof of contractual “statements” and therefore of the obligations assumed, inter alia suffering a lot less in this case in relation to the uncertainties concerning the interpretation of the natural language, as it uses a more analytical, indeed, self-executing, language.
It is clear that Smart Contracts create an absolutely new ecosystem, and that governments are preparing a fertile ground for operators to develop even more systems based on them.
Smart Contract for all uses?
Criticisms concerning the use of Blockchain and the solutions based on these technologies are diverse, but we can summarize them in a few points. Blockchain has a maintenance cost and registering a transaction also has a cost. Therefore, it can be uneconomical to use a smart contract for “micro-transactions” with little margin. Furthermore, a Blockchain has a latency: there is an interval between inserting the transaction into the pool of candidates to be entered in the next block to its actual insertion. The higher the fee paid to those who enter the transaction into the block, the greater the chance that the latency time is low. Therefore, it is not possible to have both features, that is a low fee and at the same time a quick transaction. This feature makes Smart Contracts unsuitable for transactions with low margins and that require low latency times or that the smart contract should be implemented within a certain period of time.
A very important criticism which has been raised also concerns the enormous and increasing cost that maintaining the Blockchain has on energy consumption and therefore on its environmental impact.
However, this disadvantage is very pronounced for Bitcoins, given their value, less so for other Blockchains, such as Ethereum. Both these examples are based on “proof of work” (I need to show that I have contributed a significant amount of CPU, and therefore of energy), but others are based on less energy-intensive elements, such as “proof of stake”.
Finally, the lack of privacy. Transactions are all public, in the sense that everyone can examine which transactions someone has entered and with whom, making it possible in certain cases to determine the real identity of the identifier, even if this, de facto, would not lead to the natural or legal person who holds it (semi-anonymous). This can irreversibly disseminate personal data, preventing the right to be forgotten, among other things. The inclusion of cryptography can at least partially solve this problem.
It is precisely because of these critical issues that there are those who argue that private Blockchains would be preferable, i.e. those in which only a few, selected operators are legitimized to insert and add new blocks to the Blockchain, while customers would have only one interface to and for the Blockchain, of which however they would not own the copy. However, this solution thwarts one of the features of this technology: being distributed (and therefore inspected by anyone who is interested), replicable, as well as fed by anyone. Nor should we overlook the fact that the limited number of operators authorized to create the Blockchain, at least from a theoretical point of view, encourages collusion between operators in order to alter the competitive game between multiple operators who compete for transaction fees. An intermediate path could be that of a membership Blockchain, such as Linux Foundation’s Hyperledger fabric, i.e. a Blockchain where only those who meet certain objective requirements can participate in the creation of the Blockchain and become a node in its creation.
Finally, as mentioned, the smart contract is a “Turing complete” machine, but the logic behind such a machine cannot be easily implemented in contracts beyond a certain complexity, but only in those that can be described by a certain number of atomic transactions or events. Which of course is true only for a very limited (but not irrelevant) set of cases.
Blockchain is a technology with applications whose potential has not yet been fully understood, but one with some not inconsiderable strengths, on which there are significant investments in many sectors. Given that they are at the crossroads between computer technology and programming on the one hand and law on the other, they connect worlds which are usually in separate universes. They therefore require skills and the ability to understand the profound implications and the related logics in both fields, and few possess these.
However, we believe applications that in some cases have probably not even been conceived yet will be indispensable in many areas.
Giorgio Alessandro Donà Danioni e Carlo Piana