089photoshootings / Pixabay

Of all blockchain’s potential applications, smart contracts may have the most potential to change the way companies and organizations do business. In our overview of blockchain, we detailed some of the advantages to having a distributed, authoritative ledger of transactions. Today, we’re going to explore how that same technology can be used to create self-executing smart contracts and what hurdles remain to be overcome before the technology is ready for general use.

What Is a Smart Contract Exactly?

It’s not always clear what people are talking about when they talk about smart contracts. According to the most restrictive definition, they’re a specific type of contract created and stored on a blockchain, designed to facilitate legally binding, self-executing transactions between parties. At the other end, they simply represent any agreement between parties that is stored on and executed by a blockchain. For our purposes, we’re going to use the looser understanding.

Though blockchain is a relatively recent innovation, the idea of a self-executing contract stored on a distributed ledger has been around since at least 1994. The concept itself is pretty simple: rather than relying on a middleman (ie, a lawyer, notary, or broker) to facilitate the performance of a contract, two parties can create a self-executing digital contract that’s stored on a shared network.

The key distinction here between a smart contract and any other kind of agreement is that a smart contract doesn’t just record the terms of an deal, it also makes sure that deal is carried out. In a typical contract, a seller’s asset is held by an agent (the lawyer, broker, escrow agent, etc.) until the seller is paid by the buyer and the agent can verify the transaction. Only then is the asset released. This verification process can take months in certain scenarios.

With smart contracts, verification happens in real time. As the terms of the contract are met, the contract automatically transfers assets between parties, whether money, stocks, or anything else of value. A better way to think of smart contracts might be as a kind of digital broker, since it does much more than simply record the terms of an agreement. In fact, the originator of the concept likened smart contracts to a digital vending machine that holds assets (ie, candy bars) which are dispensed once you’ve fulfilled the terms of the agreement (ie, inserted your money).

What’s So Exciting About Smart Contracts?

The above example is pretty simple, but the real promise of smart contracts lies in more complex arrangements, like the kind of highly structured trades that take place between financial service firms, or elaborate and highly contingent supply chains that tie together dozens of suppliers and buyers. These are situations that involve lots of money, lots of people, and lots of time. Smart contracts have the potential to make these complex transactions more efficient while also increasing transparency and trustworthiness among all parties. Here’s how:

  • Efficiency. Transactions take place as soon as the terms of the contract are fulfilled. Currently, it can take months for assets to be moved after a contract is signed. There’s no lengthy verification process. At a minimum, this means larger and more complex agreements will take less time to execute, allowing companies to move more quickly.
  • Trustworthiness. Smart contracts are encrypted and stored on a shared blockchain that’s controlled by the parties themselves. There’s no need to trust a third party to hold assets or ensure the terms of the agreement are executed. Furthermore, it’s practically impossible for information to be lost, since the ledger is replicated in full across many different machines.
  • Transparency. When the terms of a contract are expressed in computer code rather than natural language, there’s no room for ambiguity. It’s even possible to test an agreement with any number of variables so that all parties involved can know exactly what will happen under any given circumstances. This makes the process more fair and should reduce or eliminate disputes that arise under unusual circumstances.
  • Privacy. Smart contracts can have variable permission structures, meaning that regulators may be able to see the terms of the contract while protecting the identities of the parties themselves. This allows regulatory authorities to monitor for fraud and suspicious activity without violating the privacy of individuals.

Futuristic Applications

We’ve laid out some pretty straightforward problems that smart contracts may be well suited to solving, but much of the excitement around them involves more futuristic scenarios that we’re just now beginning to dream up.

One particularly exciting (theoretical) application for smart contracts is in internet-connected devices. IBM, which is developing its own blockchain technology, has outlined a system built on a combination of smart contracts, peer-to-peer messaging, and file sharing (a la BitTorrent) that could create distributed ecosystems of IoT connected devices. Imagine all internet-connected appliances on a single power grid negotiating to share electricity most efficiently without requiring a central controller to assign and balance loads. It’s also possible to imagine networks of self-driving cars that know when to buy their own fuel based on mileage and fuel prices, or schedule their own maintenance with the local auto shop.

The exciting promise here is that these ecosystems can grow and manage themselves without requiring humans to develop and manage a centralized control system. To be clear, we’re still a ways from such a scenario (and there are very real obstacles to its implementation), but it represents one of the ways smart contracts can do more than just automate stock trading between people.

Let’s Not Get Ahead of Ourselves

A few words of caution: Blockchain is still in its very early days, and there are some very good reasons to be skeptical of it right now. For starters, blockchain and smart contracts are still in their infancy, technologically speaking. Most of the applications we’ve looked at are hypothetical or still in the proof-of-concept stage. Even the developers behind Ethereum acknowledge that their platform is experimental and thus unsuitable for mission critical services. That isn’t to say that the tech won’t get there someday, but for the moment you probably shouldn’t be restructuring your supply chain to rely on blockchain.

Another consideration is less technological than legal or political. For starters, blockchain or related technologies are unlikely to replace contract lawyers anytime soon. In large contracts especially, lawyers are still likely to be play a critical role at the negotiations stage.

Furthermore, it always takes governments and courts some time to catch up to the latest technological developments. Smart contracts have the potential to transform the way legal contracts are structured, implemented, and litigated about, but they’re only valuable to the extent that they’re recognized by either legislation or court rulings.

We’ve spent some time looking at what blockchain can do, but it’s also worth considering what it’s not suited to. Blockchain has the potential to really shine when it comes to complex transactions involving quantifiable assets. These are frequently the kinds of transactions that really benefit from automation. But there are plenty of scenarios where you can’t (or wouldn’t want to) automate the process. For example, a smart contract can’t gauge whether a job was done to the buyer’s satisfaction unless the buyer explicitly tells it so, in which case, the smart contract really hasn’t simplified anything.

Furthermore, a smart contract is only as good as the code it’s written in. Poorly written contracts can lead to all kinds of unexpected and undesirable consequences, and the same properties that make it difficult to tamper with or alter a blockchain also make it very difficult to stop or rewrite a faulty contract. In this scenario, developers play a role that isn’t so different from the one lawyers play when drawing up physical contracts.

Want to Learn More About Smart Contracts?

As we’ve said before, it’s still very early days for smart contracts and blockchain more generally. The technology is immature, and there are no universal standards or widely acknowledged best practices yet. Again, you probably shouldn’t be actively looking to blockchain technology to replace core functionality yet.

That said, there are a number of blockchain and smart contract-related projects right now, with more springing up by the day. Two of the most exciting blockchain technologies are Ethereum and Hyperledger.

Ethereum is an open source, public blockchain based on the original Bitcoin blockchain. Unlike Bitcoin, however, Ethereum is meant to serve as a platform for any number of different decentralized applications. It also offers some scripting functionality for creating smart contracts.

Hyperledger is a cross-industry effort with contributors from IBM, SAP, Airbus, Deutsche Bank, and other major companies to both encourage the adoption of blockchain while advocating for a common set of standards. The Hyperledger project includes a number of open source implementations of the blockchain framework geared toward different use cases, of which Fabric is currently the major blockchain-for-business implementation.

Get more work done, faster with freelance help. Post a job today and get started!