Author Archives: Roma Maheshwari

Home »  Author: Roma Maheshwari

Make your smart contracts really smart – A look at building intelligent smart contracts

On July 2, 2019, Posted by ,

Smart ContractSmart Contracts are one of the most popular applications of Blockchain technology. As Wikipedia says, a smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract digitally. Smart contracts allow the performance of credible transactions without third parties. These transactions are trackable and irreversible.

Smart Contracts are nothing sort of Smart as they are just pieces of code incorporating business logic and rule-engine to execute them. In this article we will explore what are the limitations in adoption of Smart Contracts and how AI can bridge the gap to make the adoption faster.

Before moving further, let us have a common understanding on how Smart Contracts work?

How Smart Contracts work

Let’s take an example of implementing Smart Contracts for the supply chain. Logistics and freight solutions involve a lot of paper-based contracts–there are high chances of stealing and losing them. The smart contracts can avoid this by providing secure, transparent digital version to all the parties involved–sender, receiver, intermediaries, customers, logistics partners, etc. Smart Contracts store business legalities and terms & conditions as codes.

  1. Transactions – Two parties (X-seller and Y-buyer) separated geographically want to trade some goods with each other. They involved a third party as a logistics partner to deliver the good under certain conditions of date of dispatch, date of receiving, damage/theft, if any. All these legal conditions go as the code in the Smart Contracts. The code executes the terms in pre-defined ways and doesn’t have the nuances of human languages. In simple words, If Y receives an order on the date, then initiate the transaction of XXX amount to the account XXX.
  2. Block – Once Y receives the order under the decided conditions, he triggers the transactions through Smart Contracts instead purchase orders or invoices, etc. Blockchain receives this code in an encrypted way via distributed network of ledgers.
  3. Verification – Once all the computers verify the transactions with an agreed consensus mechanism and on achieving more than 50% consensus, contract verifies the transactions.
  4. Hash – Each of this block is time stamped with a cryptographic hash and reference to previous hash, removing the chance of any manipulation or tampering.
  5. Execution – The agreed amount moves from Y’s account to X’s account.

While the process looks simple, Smart Contracts are tough to implement and still in an infancy state. As they are still maturing, they come with potential disadvantages of security breaches, execution flaws, immature coding practices and language. The lack of international regulations on smart contracts further leave the parties at a possibility of running into legal disputes.

Smart Contracts Adoption

Are they ready for adoption in highly distributed and large-scale organizations?

While some theories suggest that they are ready for enterprise-wide adoption and will achieve maturity with more organized efforts towards it, some negate adopting them. The very first challenge of adopting Smart Contracts for enterprise level is limited manpower available for coding and managing them. Enterprises need all-inclusive engineering capabilities to code, manage, secure and test Smart Contracts for developing secure solution. This requires heavy investment in hiring engineers with right skills and proficient in languages like Solidity (one of the widely used Smart Contracts language).

The second area of concern is security in form of end-point vulnerabilities, public and private key security and vendor risks associated with Blockchain. Experts believe that Smart Contracts are the most vulnerable points for security breaches, cyberattacks and technology failures. Organizations have to implement adequate testing measures to prepare for these risks before implementing Smart Contracts.

In 2016 a hacker stole $50 million from the so-called Decentralized Autonomous Organization, which was based on the Ethereum blockchain. And in November around $150 million suddenly became inaccessible to users of the wallet service Parity, which is also rooted in Ethereum. [Source – A $50 MILLION HACK JUST SHOWED THAT THE DAO WAS ALL TOO HUMAN]
The global blockchain technology and smart contract market is projected to grow from $210 million in 2016 to $2.3 billion by 2021 (61.5% CAGR) [Source – MarketsandMarkets].

Making Smart Contracts really ‘Smart’

AI Generated Smart Contracts–AI can generate Smart Contracts with the use of Natural Language Processing (NLP). The enterprise-wide adoption of Smart Contracts has some challenges of–extensive coding expertise, managing Smart Contracts and recruiting right manpower. Using NLP, AI can generate Smart Contracts based on requirements, SMEs can then review the contracts generated and execute them on business consensus.

AI-enabled Smart Contracts require minimal human intervention to write and interpret the information and convert them in legal contracts. AI-generated smart contracts can be used for various ways such as stock exchanges, supply chain contracts, property and land records. These cognitive contracts can learn by themselves over the time about various legalities and generate codes to update the terms if the business logic changes.

Engineering Smart Contracts lie outside the expertise of businesses, AI offers the potential to create an algorithm-based trust model to implement Smart Contracts free from human errors and bias.

AI Tested Smart Contracts – Smart Contracts are the most vulnerable points in Blockchain applications. AI can help in building security products or solutions that can scan Smart Contracts to expose potential code vulnerabilities and recommend fixes to improve them before deploying them. AI based testing gives more confidence to organizations for adopting Smart Contracts.

In this context, there are several start-ups working to design solutions and certify Smart Contracts platform based on their security auditing services. They provide extensive report on an overall assessment of the Smart Contracts. Their assessment involves reviewing best practices used in building these contracts, code review (manual and automated testing) and provide a detailed description of issues identified and actionable insights.

AI will help in building more such models where algorithms can be trained to test Smart Contracts and make sure they work as required. AI will identify potential vulnerabilities beforehand and provide solutions based on the Smart Contracts, their formation and ensuring their security throughout the lifecycle. This is an immediate scenario where we will see new security protocols developed for Smart Contracts and other Blockchain applications.

Tapping into Knowledge and Experience

Smart Contracts and Blockchain technology are already creating a lot of noise about the deeper transformations they will bring in the digital era. Implementing smart contracts is really beneficial but very complex. Smart Contracts are business logic in form of code and any deviations can create catastrophic effect. With Smart Contracts implementation, businesses have to manage processes, identify lifecycles, integrate existing infrastructure and processes with complete understanding of legal implications.

This requires enterprises need to adopt a wise approach–could do versus should do in implementing Smart Contracts. In this context, organizations have to start with implementing first generation of Smart Contracts to successfully onboard AI-Smart Contracts later. There are a lot of companies who are already building the first-generation Smart Contracts. Companies can use this data to produce the second generation of Smart Contracts authored and tested using AI.

Engaging an experienced and technically competent partner is crucial for success. Are you exploring Smart Contracts for your business? Qentelli can help.