AndPlus acquired by expert technology adviser and managed service provider, Ensono. Read the full announcement

What are Blockchain’s Smart Contracts?

Aug 7, 2019 9:05:00 AM

 

shutterstock_1100777855 3 X 2 med

Cryptocurrencies, especially bitcoin, are making headlines these days. When speculators run-up cryptocurrency value vs. the dollar, euro, and other government currencies, a speculative bubble results that can eventually burst. The resulting price crash causes significant financial losses to those became players late in the game.

You’d think after a couple of cycles, people would stop playing the game. After all, wild price swings aren’t good for any currency; crypto or otherwise. It needs to be a stable store of value in order for it to be used as a medium of exchange. “There’s a sucker born every minute,” and that’s how some speculators earn their living.

What gets less press is the technology behind cryptocurrencies. Whatever you think about bitcoin and other cryptocurrencies or cryptocoin mining, the blockchain technology that makes it work is sound.

Blockchain: Not Just for Crypto Anymore

The fact is, blockchain isn’t just about crypto, although that’s the application for which it was originally designed. Blockchain technology has applications beyond cryptocurrencies, such as smart credentials (professional licensing, educational certifications, etc.), supply chain tracking and verification, and more.

One of the most compelling non-crypto blockchain applications attracting the attention of large corporations and governments around the world is “smart contracts.” We’ve previously analyzed smart contracts. Today, we’ll explore the concept, its potential uses, how it works, and its shortcomings.

Review of Blockchain

A blockchain is an implementation of a distributed, digital ledger system for recording transactions. When two parties enter into a transaction, such as the exchange of bitcoin for products or services, the details of that transaction (how much bitcoin changed hands, who sent it, and who received it) is verified by all (or substantially all) the participating nodes or keepers of the data in the system.

You can’t create bitcoin for yourself out of thin air, and you can’t spend bitcoin you don’t own, because the verification process checks through the chain of transactions. Defrauding the system is essentially impossible because you would have to update encrypted records housed on hundreds or thousands of servers in exactly the same way at the exact same time.

It’s this decentralization that makes the system secure and reliable. Unlike a credit card company’s data center in which determined hackers can infiltrate for weeks, making off with valuable data without a trace, an attempt to hack a blockchain system would be detected and contained immediately.

Cryptocurrency, or the peer-to-peer transfer of digital tokens representing a store of value, is the simplest application of blockchain. Other applications such as smart contracts are a bit more complex.

How Smart Contracts Work

A crypto transaction is a chunk of data recorded in the blockchain, but a smart contract is a chunk of executable program code that represents and enforces the terms of the contract. Once stored in the blockchain, it can’t be unilaterally modified—any attempt to modify the smart contract automatically alerts all parties involved.

The smart contract program code is a series of “if/then” statements. When an “if” clause or clauses are satisfied, the action encoded in “then” executes. The program code can range from extremely simple to extraordinarily complex and can represent nearly any traditional contract. Here’s an example:

Suppose CPA Alice strikes an agreement with Bob, a small business owner, to complete and file annual tax returns for Bob’s business. The two parties create a smart contract with the following terms:

  1. Alice starts work when Bob delivers his bookkeeping data to Alice plus deposits half of the agreed-upon fee in an escrow account (also maintained in the blockchain).
  2. When Alice delivers the tax returns to Bob, the money in escrow is released to Alice. If Alice fails to deliver by an agreed-on date, the money goes back to Bob.
  3. When Bob approves the tax returns and deposits the other half of the fee, Alice then files the tax returns on Bob’s behalf.
  4. Once the tax returns are received by the appropriate agencies, the remaining escrow money is released to Alice. If the agencies don’t get the tax returns, the money goes back to Bob, and he can access the approved returns and file them himself.

Obviously, to be fully automatic, the system would have to “know” when Bob delivers his bookkeeping data and approves the tax return documents, so this smart contract blockchain would have to be integrated with electronic tax preparation and filing system.

In this scenario, no human intermediary is required. The escrow in the blockchain can’t be hacked. Bob has to put the money in for Alice to start work and file his taxes. Alice can’t get the money before fulfilling her obligations under the contract. Because a neutral, virtual third party is keeping everyone honest, Bob and Alice need only trust the system and not each other.

Smart Contracts in Real Life

Specialized blockchain smart contract systems can be designed for different industries. Most straightforward, standard contracts won’t require either party to do any coding. The systems will provide standard templates in which the parties can fill in the blanks. When the parties agree (by electronic signature), the contract goes into effect.

However, smart contracts have shortcomings. Highly (or even moderately) complex, nonstandard contracts will require the aid of a programmer. And how will you know the programmer is doing it right, without bugs, and that the program actually reflects the terms for which the parties have agreed?

There needs to be some reliable, “human-readable” way to represent the code in the program. Because the programs can be arbitrarily complex, that can be a tall order, especially if multiple languages are involved.

Another potential shortcoming involves unforeseen circumstances. By definition, it’s impossible to anticipate “unforeseen circumstances” and account for them in a smart contract.

In the tax-filing example above, what if Bob’s bookkeeping data turns out to be incomplete or corrupted, through no fault of Bob’s? What if the tax authorities’ e-filing systems go down and Alice’s submission is never received? How would the system know about these external events and trigger an escape clause?

So, there are kinks to be worked out, but in the long run—given the interest and R&D effort going into the technology—smart contracts are going to be a new reality.

Lots of companies are starting to offer blockchain-based smart contracting. The best known of them is Etherium. Its blockchain technology supports both its own cryptocurrency (known as “ether”) and smart contracts through its Etherium Virtual Machine using a specialized programming language.

Other startups are challenging Etherium’s lead, so look for a good deal of churn in the market over the next few years.

Given its advantages of speed, security, efficiency, and low cost, you can expect to see smart contract technology used in your industry. Someday, smart contracts will be like the internet itself: We’ll wonder what we ever did without them.

Learn More!

Topics: Blockchain

Abdul Dremali

Written by Abdul Dremali

Abdul Dremali is a key content author at AndPlus and a driving force in AndPlus marketing. He was also instrumental in creating the AndPlus Innovation Lab which paved the way for the company’s leadership in Artificial Intelligence, Machine Learning, and Augmented Reality application development.

Get in touch

LET’S BUILD SOMETHING AWESOME. TOGETHER.