Are Smart (Blockchain) Contracts Really Smart?

December 19, 2018

If you’ve ever been through an automatic car wash, you can appreciate the benefits of a smart contract.

You drive to the payment station, select the kind of car wash you want, and make the payment. You are then prompted to pull up to the washing dock. At this point, you make sure all the windows are rolled up, put your car in neutral, and sit back sipping your coffee. The machine goes through the steps involved in washing your car, and you come out on the other end with a sparkling clean car.

What happens if your payment doesn’t go through? You don’t get a car wash, and you will probably get honked out of the line.

What happens if the car wash malfunctions? Hopefully, you call the on-site maintenance to get a refund.

This transaction, mundane as it seems, involved legally binding contracts that you probably never thought about.

You and the operator of the automated car wash entered into a legally binding contract when you made a payment after selecting a car wash package.

If you do not get the service you paid for, you ask for your money back. If you get the service you paid for, the contract is deemed to have been executed successfully and both parties are made good.

Although the contract is between you and the operator of the car washing facility, the trust between you is established by the payment processor, probably a credit card company.

This simple transaction works well in the physical world. But what happens when you want to enter into a contract with someone who is not physically present?

For hundreds of years, we’ve relied on a third party, such as a bank, credit card company, underwriter or government to fulfill the necessary “trust” role. This heavy reliance on a third party for “trust” purposes has made commerce an expensive and time-consuming process.

For instance, the average patent application in the United States takes 2 years or more to complete — even longer for someone with limited financial means. This puts brakes on innovation and speed to execution.

 “What If”

What if we did not have to rely on a third party for “trust?”

What if we are able to claim ownership of an idea without waiting years?

Smart contracts could be the answer to these and many other “what if” questions.

Smart contracts are like traditional contracts except they are executed by a computer program that acts as the intermediary.

Funds are held by the program while the action is carried out as per the contract. If the action is carried out, funds are released. If the action is incomplete or fails to take place, funds are returned to the owners. What makes this process “smart” is the fact that all of these actions are carried out by the consensus protocol of the blockchain. Once it is established, everything takes place automatically.

When smart contract-based commerce is realized on a mass scale, we may see transactions settled on a global scale unconfined by boundaries, at a fraction of cost and without an intermediary.

You could buy or sell property in Thailand while enjoying a cold beverage on Miami Beach, never having to set foot outside the U.S.

You may be able to claim ownership of your patent in a much shorter time frame and enforce it globally with the advent of blockchain technology.

Comparison of Traditional and Smart Contracts

Traditional Contract Smart Contract
Presence of third party acting as trust Blockchain consensus protocol acts as ‘trustless’ mediator
Settlement with help of third party Settlement via consensus protocol once conditions are met
Time-consuming Instant
Mostly restricted by geographic boundaries Not restricted by geographic boundaries
Cross-border transactions and multiple currency issue is not addressed  
Human intervention required to execute and confirm  
Does not support IoT and smart device settlements  

Evolution of Smart Contracts on Blockchain

Bitcoin was the first to introduce blockchain-based consensus protocol, and thus, they were first to introduce smart contracts on the blockchain. However, Bitcoin’s smart contract was not customizable (although MIT’s Media Lab is working on launching customizable smart contracts on Bitcoin blockchain).

Ethereum was one of the first public blockchains to introduce customizable smart contracts. In fact, it defines itself as “a platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference.”

A plethora of platforms followed Ethereum, offering easy-to-launch customizable smart contracts, some even offering do-it-yourself smart contract models on their platforms. This trend of making smart contracts easy to launch is likely to continue.

Types of Smart Contracts

Smart Contracts can be executed on-chain or off-chain.

On-Chain Smart Contracts: Any transaction that runs live on a main blockchain platform, which can be viewed by everyone on the blockchain. Transactions that take place on Ethereum and Bitcoin platforms are on-chain. They provide excellent transparency, but are slower because confirmations (at least 51 percent) take a while, and they may be expensive, as well.

Off-Chain Smart Contracts: A transaction that occurs between two parties directly outside of a main blockchain platform is an off-chain transaction. This is particularly useful when a transaction of large value or transactions in massive frequency are to take place. In these situations, a transaction can take a long time and may rack up significant transaction fees if run directly on the main blockchain.  The off-chain transaction detail is later committed to the main blockchain ledger, thus retaining the immutability aspect while being easier to scale.

Depending on the way they’re being used, different types of smart contracts come into play.

  • Legal Smart Contract: A smart contract that is launched either on a public blockchain or private blockchain.
  • Decentralized Autonomous Organization (DAO): DAO, in essence, is a business run on an initial set of rules and goals carried out completely by smart contracts. We could think of it as a transactional business on autopilot.

Imagine a world where machines are able to interact, contract, execute and settle contracts. Except for the initial programming and deployment, all the actions are carried out by the program and the machines that are connected to the program. For instance, in the future, we may have driverless cab services interacting with operator-less electric charging ports conducting auto-payments for re-charging cars, built on DAOs.

  • Distributed Applications (DApps): Most businesses operate on a centralized business model where the data is stored in a centralized server(s). If someone hacks into this centralized server the business operation can be compromised. A decentralized application, on the other hand, operates on the blockchain and by its very nature is distributed on peer-to-peer computers connected to the blockchain. Even when one or two computers on the network are hacked, the system will still continue to run because all other computers will have an entire copy of the database. Any change in the database can only be affected by a 51 percent majority consensus.

Bitcoin, Ethereum, and many similar projects bring the massive strength of their blockchain network to any application that is launched on their respective protocols. Privacy, however, is a shortfall on the public blockchain.

  • Smart Contracts on Devices (IoT): Internet of Things (IoT) describes interactions between smart devices connected to the internet. For instance, in the near future, a smart storage facility can maintain a temperature status, embed this information onto the blockchain so that no one can change it and help companies pinpoint the exact unit that failed to maintain the appropriate temperature. This not only helps find the responsible vendor, but also fixes the issue immediately. Currently, the role of IoT is explored heavily in the supply chain management blockchain space.

What Are The Vulnerabilities and Shortcomings?

While smart contracts are incredibly promising, they are not perfect, especially since they are relatively new. Vulnerabilities and shortcomings of smart contracts include:

  • Human error: As smart as smart contracts can be, they are still launched and maintained by humans. This vulnerability is even more prominent in an open source platform where anyone can try to effect change. For instance, about $300 million was “destroyed” when a developer accidentally deleted a code on Ethereum platform.
  • No execution without computing (hash) power: Whether an organization is using or considering a public or private blockchain platform, does the platform have the computing power to support the business transactions and scale on demand? Business decision makers need to understand the capacity and limitations of off-chain and/or sidechain nodes before bringing business onto blockchain.
  • Cost and speed: When you are competing for the computing power to process transactions, you may end up paying more in cost (gas) which may result in unplanned expenses and delays in execution.
  • Known issues: There are 10 critical known vulnerabilities that developers must consider when developing new smart contracts.

How Can You Make Smart Contracts Smarter?

Companies thinking about using blockchain and smart contract technology should make these steps part of their due diligence process:

  • Know the risks: As discussed above, smart contracts have some known vulnerabilities. Companies should check for these before going live with their project.
  • TestNet: Most blockchain platforms require applications to make use of their native cryptocurrency — for instance, Bitcoin and Ethereum. Any mistake could result in financial damage. To avoid this, companies can launch, test and debug their applications on TestNet before bringing it onto the mainnet.
  • Select the right blockchain protocol: It is critical to choose the right blockchain platform to support specific business needs, especially considering cost and speed. Most popular public blockchains are notoriously slow and expensive. However, an off-chain model attached to a public blockchain can be a good solution.

Stay informed with Aprio.
Get industry news and leading insights delivered straight to your inbox.

Recent Articles