Smart contracts with the blockchain

What is a smart contract?

A smart contract is a computer program that defines the terms and conditions of a contract as program code and automatically executes it on the Web. The term was coined by the lawyer and computer scientist Nick Szabo in 1994.

Smart contracts enable a significant acceleration in the execution of contracts and could lead to significant cost reductions in almost all economic and private areas.  

The blockchain technology was originally developed for the cryptocurrency Bitcoin. It provides an excellent basis to implement smart contracts in the coming years.

Which problems can be solved with smart contracts?

In contracts, two or more parties specify how they regulate matters among themselves. This includes long-term and short-term relationships as well as complex or simple matters.

Without really being aware, we conclude purchase contracts in the supermarket at checkout. Marriages are contracts. And of course, companies often make complex arrangements in written contracts to regulate, for example, service and delivery relationships.

Most contracts regulate what happens when certain conditions occur. For example, once a service X has been performed, an amount Y has to be paid to the service provider.  

The execution of contracts may lead to several typical problems. For example, a contractor may delay to check a condition that obliges him to pay, so that the supplier has to wait for his money. Or there is disagreement between the parties on how to interpret certain terms of a contract. And in almost all cases where money is transferred, banks and other middlemen branch off a portion of the payment in the form of fees.

If contractors cannot resolve a conflict  among themselves and therefore go to court, the efforts and the costs for  lawyers and courts are often out of proportion to the value of the original matter. In many cases, this leads to the economically weaker party not being able to afford enforcing their claims.

Smart contracts avoid many of the problems described above. They are mathematically defined contracts that are stored in a blockchain and run automatically on the Internet. Soon, they could be used in almost any situation where conventional contracts are used today.

How do smart contracts work?

Smart contracts are defined and executed along the following pattern:

  1. First, the content of an agreement between two or more parties is defined mathematically as program code. Special programming languages such as “Solidity” are used for this task. All common programming concepts, such as if-then relationships, loops and repetitions, or time-dependent events can be defined in smart contracts.
  2. Then, all parties sign the smart contract with their respective digital keys. If the signature of a contract party is missing, then that party cannot be taken advantage of by the program code in the future.
  3. After the smart contract has been signed by all parties, they  publish it in an appropriate network. There, the code is distributed and stored in a blockchain decentrally on hundreds or thousands of computers. The most famous and largest platform for smart contracts is Ethereum.
  4. For a small fee, the smart contract platform then constantly checks whether the conditions specified in the code are met. It then executes the related events such as payments. Ethereum has its own blockchain-based currency Ether, so that transactions can simply be executed within the network.
  5. Finally, the life of a smart contract ends when the respective conditions occur as specified in the program’s code.

Smart contracts have many advantages

Advantages of the blockchain technology

Smart contracts are stored and executed in a blockchain-based network. Therefore, they offer the advantages of the blockchain technology:

  • Decentralized: All computers in the network have a copy of the program code of a smart contract. Whether a contract is accessible or may be executed does not depend on the fact that a certain party or a central decision-making body is available. All contracts are known  throughout the network. There is no “single point of failure”.
  • Autonomous: Once they are published, smart contracts “live” completely independently on the net. The program code remains available and functional without any human intervention.
  • Automatic: The respective smart contract platform, for example the Ethereum network, constantly checks whether predefined conditions in a smart contract occur and, if needed, triggers further actions. The contract parties do not have to worry about the execution of the contract. All  conditions are automatically checked and resulting actions are instantly implemented.
  • Non manipulable: Distributed storage and the tamper-proof cryptographic signatures of the parties ensure that unilateral changes to a smart contract are not possible. In addition, a smart contract platform cannot be bribed or intimidated because of its transparent and decentralized organization and the strict mathematical processing of contracts. Thus, a party can not prevent the execution of a smart contract. Further, it is impossible to ‘interpret’ a contract in favour of one or the other party.

Specific benefits of smart contracts

In addition to those just described general positive aspects of the blockchain technology, smart contracts have specific advantages over conventional contracts:

  • Unambiguous: The program code of a smart contract sets conditions mathematically. In the evaluation of the code, there are only ones or zeros, only true or false. Only those circumstances are considered that are specified. And the smart contract platform performs exactly those actions that are defined in the program code. There is no room for interpretation. Therefore, parties can not argue about who meant what exactly by a particular clause. Because of this feature smart contracts are also …
  • Culture independent: The universal language of mathematics defines the contents of a contract. No party has to trust a foreign legal system, or deal with foreign courts and regional customs. This will make it easier and cheaper to conclude international agreements and execute them in a fair manner.  
  • Integrated: Simple cases can be fully implemented in the blockchain with smart contracts. Payments, certifications, conflict resolution are all done in one system. There is no need to trust and pay any additional parties, such as banks, notaries and courts.
  • Fast: The smart contract platform constantly checks if certain conditions in a smart contract occur and executes the resulting actions automatically and within seconds. It does not have to wait for people to perform certain operations. For example, due payments can no longer be delayed.  
  • Cost-effective: After a smart contract has been created and published, it ‘lives’ autonomously in the network. It is not necessary that humans regularly check it. And as mentioned above, smart contracts save a lot of costs for the usual middlemen.

The blockchain and smart contracts therefore solve many of the problems of conventional contracts.

Examples for the use of smart contracts

Smart contracts are particularly suitable when many small transactions can be performed entirely digitally.

Smart contracts for digital rights management (DRM)

Smart contracts could be used by the music industry for the automatic handling of royalty payments.

An audio file could be provided with a program code that automatically transfers a small amount of money to the rights holders when it is played in a browser or music player.  For the various stakeholders such as composer, lyricist, singer, etc., a title-specific breakdown could occur. Middlemen for publishing and billing could be eliminated. This technology can also be applied to image and video rights on the Internet or to software licensing.

The musician Imogen Heap is already testing blockchain-based DRM with her songs.

Smart contracts on the Internet-of-Things

Soon, many everyday objects will be connected to the Web in the so-called Internet-of-Things. Smart contracts could play a major role in controlling how objects can be used and in settling respective usage fees.  

For example, a car could be programmed to only start its engine if all  lease payments have been made and it is properly insured. Or even an AirBnB replacement in the blockchain is conceivable: Offering rooms, booking, payment and access control at the door by smartphone could be fully realized with smart contracts in the blockchain.

Smart contracts in the energy sector

With smart meters, all accounting procedures for decentralized energy production and storage could be handled on the blockchain completely and very efficiently.

Smart contracts for voting

Decision processes in democracies or in companies (e.g. general meeting) could be carried out quickly, cost-effectively and securely with the blockchain and smart contracts.

The outcome of such a ‘smart’ election could be that the winner automatically gets access to a “Master Key” for the state for a certain period. Decision-making processes in so-called Distributed Autonomous Organizations (DAO), for example, are fully realized in the blockchain.

These are just a few examples of possible fields of application for smart contracts. The possibilities are almost unlimited.

Limitations and problems of smart contracts

Of course, a new technology such as smart contracts must overcome some hurdles. Today, three main problem areas are foreseeable:

  • Analogue/digital barrier: With smart contracts only those contract conditions can be handled automatically, which are machine-verifiable and enforceable in the digital space. For example, in case of defects of products and the corresponding warranty claims, smart contracts probably  reach their limits. Of course, these rights can be foreseen while programming a smart contract, but human intervention will likely be necessary for the full execution of the contract.
  • Legal compliance: Much legal work is still to be done before  smart contracts are compatible and suitable for everyday use in the many different legal systems of the world. On the one hand, real world use will show how smart contracts must be designed and communicated to be in line with the law, e.g. consumer protection laws.  And on the other hand, legislators and courts must take action to adapt existing law for smart contracts or create new rules for them.
  • Software bugs: Smart contracts are computer programs. So they are prone to programming errors. In one prominent example, a software bug led to the bankruptcy of the first major Distributed Autonomous Organization, the DAO. The development of smart contracts will require close cooperation between lawyers and programmers. It might also be helpful if some ‘good practices’ from software development and software quality management were transferred to the legal work around smart contracts.


Smart contracts provide a great opportunity to get rid of many weaknesses of current legal agreements. Thus, they could accelerate the execution of contracts and save costs. Prior to large-scale use, however, some legal questions have yet to be clarified. In addition, know-how about smart contracts must be built in the legal as well as the computer science fields. And last not least, it needs compelling products to make digital contracts attractive for consumers.

Author: Collin Müller
Online professional for over 20 years, more than 10 years in the communications and media industry.