Smart contracts, and blockchain technology in general, hold great potential for the automation of business relations — reducing the need for paperwork, expenses and the involvement of lawyers and court services to facilitate trust. However, to date, smart contract technology is almost impossible to implement as the basis of real-world agreements due to its obfuscated nature and lack of legal viability. Agrello utilizes state of the art AI technology to bridge this gap between the blockchain, the legal world and the non-coding end user and seeks to make smart contracts worthy of their name — making them both — legally binding contracts and smart.

The origin of smart contracts and their limitations

The term “Smart Contract” was first coined in 1994 by cryptography researcher Nick Szabo as he theorized on the future of electronic commerce in the light of the then newly born Internet. Szabo argued that since contracts, and legal agreements in general, tend to follow a logical if-this-then-that format, just like code (“if side a fulfills such and such conditions, side b is obliged to this and that”), paper contracts could be replaced with computer programs which automatically execute the terms of an agreement.

Code, so was argued, is precise and freed from fallible human interpretation, in contrast to traditional contracts which often have to be brought in front of a judge to be elucidated. Furthermore, contracts and agreements are mere words on paper; without an authority willing to enforce them, they’re rendered useless. Code, on the other hand, makes our modern world go round. Pre-programmed instructions can move money around, lock doors, and forfeiture payments in escrow, without one single policeman or bureaucrat signing an order or threaten with violence.

The problem with code, however, is that it can be hacked. If we would like to have a self-enforcing code contract to govern funds and property, this code would have to be stored on a computing platform, exclusively controlling these assets. Not only would the owner of such a platform enjoy tyrannic authority of feudal proportions, these contracts could also never be trusted to be free from unauthorized alteration or attacks.

For this reason, as time progressed and e-commerce became a commonplace practice, Szabo’s smart contracts remained an interesting but infeasible concept, reserved for future generations to iterate on.

Enter the Blockchain

As it often happens, the foretold future generation arrived earlier than expected. In 2009, an anonymous computer scientist going under the pseudonym of Satoshi Nakamoto, published a Whitepaper titled A Peer-to-Peer Electronic Cash System. In the nine pages short document, Nakamoto presented a distributed ledger system, able to record data in a decentralized network of computers, without one single party being able to compromise information stored in it. Bitcoin was born and with it the concept of the blockchain as a single source of truth.

The blockchain, in principle at least, solved the problem raised by Nick Szabo and his peers some 15 years earlier. Code stored in a blockchain system is freed from the need to physically reside in one single location, and hence is not under the influence of the owner of said location. Furthermore, thanks to the public nature of blockchains and their consensus mechanisms, unauthorized alteration of such code is close to impossible.

The young blockchain community was quick to understand what this means and the term “Smart Contract” was retrieved from its decade and a half long cold storage, to serve as the cornerstone of the Ethereum project, lead by 19 years old prodigy Vitalik Buterin.

Buterin and his associates demonstrated that it is possible to store code on the blockchain and trigger monetary transactions according to immutably pre-detriment conditions. The code governing these automated transaction was called “smart contracts”, and is ever since being presented as the future of decentralized commerce.

Smart, but not a contract

The term “smart contract” as it is used in the context of Ethereum, Qtum, and other turing-complete blockchain platforms is acceptable but slightly misleading.

Ethereum’s smart contracts are essentially code, not dissimilar from other programming languages. While it is true that smart contract code mainly deals with transactions between agents in a blockchain system, and hence is able to describe and execute some terms of an agreement between such agents, smart contracts themselves are not actual contracts.

A contract, as Wikipedia describes it, is “a voluntary arrangement between two or more parties that is enforceable by law as a binding legal agreement. […] Formation of a contract generally requires an offer, acceptance, consideration, and a mutual intent to be bound.“

Smart contract code doesn’t meet most of these criteria, especially the requirement to clearly state an offer, nor does it express acceptance and willingness to be bound by law — and hence it is not enforceable in any legal context.

In the early days of the blockchain industry, the statement “not legally binding” was often considered a feature rather than a bug. Many activists and enthusiasts flocked to the young cryptoverse to obviate traditional forms of ‘The Law’, and to replace them with code based voluntary associations. If this endeavour will ever bear fruit remains to be shown; in any case, even for less ambitious ends, such as making trade faster, cheaper, and more accessible for all, contemporary smart contracting technology is not sufficient.

Two parties interested in formalizing an actual agreement, using solely smart contracts, would very soon find out that they don’t have any means to do so, neither in practice nor in theory. At best, these two parties could, with great effort, set up an array of smart contracts, taking care of automatic payments, which, for example, could trigger doors to unlock automatically in the case of a rental agreement.

The result would look somewhat like the above.

A smart contract could with ease ensure that payments are steadily and irrevocably transferred from the Lessee to the Lessor’s account, which would trigger an additional smart contract, unlocking the apartment door for example, making it so that both parties wouldn’t need to know nor trust each other.

However, in order to entrust their funds and property to such a program, both parties would have to heavily rely on developers whom they trust blindly. Given the immutable and irrevocable nature of smart contracts, these developers would enjoy a privileged position no lawyer could have ever dreamed of.

To ensure that the above code is trustworthy, debugged and extremely well documented, the development costs for a single contract of such proportions would probably exceed the round A budget of a medium sized start up, and would entail several QA iterations by trusted third parties, rendering the whole operation meaningless to begin with. Skipping such precautions is of course possible, but could land you deep inside TheDao territory.

And even after all this hassle, with all securities in place — the code itself would be devoid of essential elements of a genuine contract, such as terms, conditions, instructions for future dispute resolution, and proof of mutual intent and acceptance. And maybe most importantly — the resulting code structure would be rigid and set in stone and would not allow for the flexibility that the reality of actual business relations demands.

A genuine “automatic contract”, or Smart Agreement, would need constant user input, allowing side A to confirm that side by B has met their obligations. This immediately raises the question what happens if side B does in fact meet their obligations but side A refuses to acknowledge this for whatever reasons. Third parties, escrow services, oracles and sensors could of course be brought into the picture, but those would have to be orchestrated in a way that allows users to easily interact with them while understanding what they’re doing. At the moment smart contracts alone, as they are introduced with real-existing blockchain platforms, hardly meet these requirements.

Making contracts smart with AI

Despite the relative crudity of the technology, smart contracts are by all means a groundbreaking innovation and will most probably serve as the cornerstone of future digitized commerce.

With the advent of turing-complete blockchains and the IoT, smart contracts can safely and swiftly move assets around, interact with physical objects, and lead to the automation of many business-related processes that currently demand vast human resources and time. But in order to serve as a substitute for traditional paper-contracts and the legal relations they dictate, these automated processes have to be orchestrated intelligently and flexibly, and be embedded in an interface that allows humans to make sense of them.

Furthermore, legal formality can’t be disregarded. The need to use some sort of court system to provide dispute resolution services might be mitigated by efficient smart contract based agreements, but most probably not done away with. In the context of the above mentioned rent agreement, it is good to know that your front door will unlock after your payment was verified on the blockchain, but it’s even better to know that you have the legal right to occupy your flat and can rely on legal assistance if this right happens to be compromised in any way.

In the light of the above, we can conclude that in order for digital smart agreements to effectively replace traditional forms of paper-contracts, they will have to meet the following requirements:

Human accessibility :

Traditional legal documents are complicated enough and often require trained professionals to be understood correctly. Smart Agreements should remedy this situation and not make it worse by replacing natural language with obfuscated code. The UX/UI of a Smart Agreement should be as easy to use and understand as a well developed software application.

: Traditional legal documents are complicated enough and often require trained professionals to be understood correctly. Smart Agreements should remedy this situation and not make it worse by replacing natural language with obfuscated code. The UX/UI of a Smart Agreement should be as easy to use and understand as a well developed software application. Legal viability :

In order to be used as a legal instrument, Smart Agreements have to be structured in such a way that they serve as proof of acceptance of certain conditions and include the description of an offer, its acceptance, and the mutual intent to be bound by its terms. This also entails the management of digital identities and signatures in an officially acknowledged and immutable fashion.

: In order to be used as a legal instrument, Smart Agreements have to be structured in such a way that they serve as proof of acceptance of certain conditions and include the description of an offer, its acceptance, and the mutual intent to be bound by its terms. This also entails the management of digital identities and signatures in an officially acknowledged and immutable fashion. Flexibility and control :

To accommodate for the realities of the business world, Smart Agreements have to be open for management, adaptation and renegotiation. A party to a Smart Agreement should have the option to waive the other side’s obligations at will, or to refrain from their own obligations, if the ever-evolving circumstances dictate so.

: To accommodate for the realities of the business world, Smart Agreements have to be open for management, adaptation and renegotiation. A party to a Smart Agreement should have the option to waive the other side’s obligations at will, or to refrain from their own obligations, if the ever-evolving circumstances dictate so. Interactivity

A Smart Agreement has to encompass the entirety of a contract’s life-cycle, allowing its course of action to branch into different scenarios according to user input. A Smart Agreement has to allow users to confirm that the other side has or hasn’t met their obligations, and/or serve as undeniable proof that said obligations have been satisfied.

A Smart Agreement has to encompass the entirety of a contract’s life-cycle, allowing its course of action to branch into different scenarios according to user input. A Smart Agreement has to allow users to confirm that the other side has or hasn’t met their obligations, and/or serve as undeniable proof that said obligations have been satisfied. Oversight and analysis

In order for Smart Agreements to outcompete their analog counterparts they’ll have to thoroughly exploit the advantages of code over paper-based text. Smart Agreements could and should be analyzable by an AI agent, bettering users insights regarding their best course of action, the same way a human counselor would do.

To accommodate for these requirements, agrello utilizes state of the art Belief–desire–intention models (or BDIs), to build an AI engine that is capable of translating user input into complex smart contract code structures, which execute the terms of an agreement, created by the parties to a contracts.

The agreement itself is created with the help of a Graphical User Interface, templates and wizards, allowing for intuitive use and high customizability.

In addition to the smart contract code, a legal document is created by the AI agent, written in natural language, which can be presented in court if this becomes necessary.

Having an AI agent translate human-readable agreements into code, which can be managed and augmented throughout the contract’s life-cycle is not a trivial task and worthy of a post in its own right. The workings of our BDI models will be elaborated in future posts in this blog and fully described in our Whitepaper.

We invite you to stay in touch and join the conversation on Slack or Telegram. Also subscribe to our newsletter.

If you’re interested in participating in Agrello’s upcoming Token Sale, please visit us here.

The Agrello Team.