Smart Contracts – Coded Computer Programs in the Blockchain Environment


Blockchain image by Davidstankiewicz is licensed under CC SA 4.0
Blockchain image by Davidstankiewicz is licensed under CC SA 4.0
 / 25. July. 2017

Leider ist der Eintrag nur auf Amerikanisches Englisch verfügbar. Der Inhalt wird unten in einer verfügbaren Sprache angezeigt. Klicken Sie auf den Link, um die aktuelle Sprache zu ändern.

When we take a look at today’s conventional contracts: Our monthly smartphone billings, working employee contracts, insurances, big trade agreements between companies… there is one instant keyword on our mind: Complexity.

Contracts are a pattern of profound legal language, rising numbers of paragraphs, covered eventualities and overall lengthy documents. All of this oftentimes makes them difficult to understand for wider audiences and even some more professional user groups. But even more, today’s conventional contracts are a core foundation of our modern society. They build a backbone for agreements on intentions between parties, applying existing laws in practice and are being enforced by supervising institutions.

Our whole life circles around the idea of rights and duties acquired by contractual practices.We expect our banking services to be available since we pay a monthly fee for them. We expect our insurances to address our issues because we have a contract which acquired these rights for paying a regulated yearly insurance fee. The list goes on and on. Conventional contracts, in short, are a last century concept, most times still based on physical paperwork, which was subsequently tried to be updated and improved for the digital age of the 21st century with mixed success so far.

Smart Contracts: Blockchain-executed computer programs

A smart contract is, compared to a conventional contract, at its lowest level: A computer program. It is coded by a developer and stored and deployed on a computational system. The big advantage of smart contracts is that these computational code programs are now stored on a blockchain, utilizing the possibility to be activated or triggered by the blockchain itself or activated from an external call, executing the capability to read and write data in the blockchain database or to interact with the blockchain state in general.

The code itself is not bound to the blockchain. It could be anything from object-oriented programming languages like Java, functional programming languages like Haskell or complex languages like Python, C++ or Pascal. Storing the information database-wise is often achieved by subsidiaries of SQL. Smart contract programs are therefore able to provide novel programming paradigm approaches to conventional contracts while simultaneously utilizing all the core benefits of the blockchain technology like advanced security, anti-fraud mechanisms and public data integrity as well as autonomy.

Ethereum, the leading smart contract blockchain framework as of today, utilizes the smart contract approach by having each user-deployed program being delivered with its own minimized version of a database connected to it. This database can only be modified by the smart contract program that owns it, thus meaning that if a user wants to change the program-connected database and subsequent data that it holds and processes, the user needs to access the program by a digitally signed message that needs to use one of the smart contract’s provided functions.

As an example for a simple smart contract execution to transfer money to another account, and since digital currency is still on of the most important blockchain and payment-related topics, an Ethereum blockchain user now wants to send 2 Ether coins to a another friend’s wallet.

Therefore, he sends a request to his deployed smart contract on the blockchain demanding to send 2 Ether tokens to another smart contract on the blockchain. He would call his smart contract at the blockchain address ‚0x1a2b3c4e5f6g7h‘ and its function ’send2EtherTokensTo(MyFriend)‘. The smart contract would register the request by the user, and since he digitally signed the request with his identifying account, the smart contract knows that he is eligible to use the contract. The smart contract function would now check its database for sufficient funds and triggers the next smart contract on the blockchain located at the address ‚MyFriend‘ with the send funds.

So in theory, the creation and deployment of a contract has never been this simplified, usable by a wider audience and immediate in its execution on a distributed and fraud-secure ledger architecture.

Strict If-Then Principles barely cover all Contractual Scenarios so far

In reality however, the general use cases for smart contracts, which are ultimately the conventional contracts of today’s world, are not that simply mappable to computer program code. Smart contracts generally gain advantages in logic-based scenarios. If ‚A‘ is called with parameter ‚B‘, execute ‚C‘.

Our understanding of smart contract implementation as of today, which is a Touring-complete high level scripting language executed and validated on a virtual machine and stored and saved on top of a blockchain implementation, creates its own technological and logical limitations and dependencies. A smart contract implementation of a conventional contract is not able to contain any form of unenforceable terms, vaguely written paragraphs or non-deterministic outcomes.

The nature of the blockchain is that a smart contract is deployed once and remains valid forever. Non-alterable, non-removable and without the possibility to non-enforce a contract when demanded. A smart contract gets called and executed with no state possible in between. A party cannot decide if they want to enforce only parts of a contract or none together. The smart contract is called or not with everything else being handled by the smart contract program itself without interference from the outside world. These fundamental principles do not only need to be factored into running a smart contract, but need to be a major factor in the planning and creation of smart contracts early on.


So where do we stand with smart contracts?

Smart contracts are an immensely powerful and new incarnation of conventional contract approaches. They are a young and thriving technology, with the state of the art still being on an early ‚alpha level‘ status, developed by an active community improving this future technological implementation.

In theory, the application of smart contracts into real-world scenarios and fields does, per se, not include any boundaries. However, today’s smart contracts are not yet simply applicable to a scenario without potential problems in terms of technological and logical limitations. Planning and special analysis of use-cases are still necessary to yield the benefits of smart contract implementation and blockchain technology in general. But ultimately, smart contracts show immense promise to improve some of the most business-critical components like transaction speed, anti-fraud methods and overall data accessibility and autonomy with the potential to be universally applicable and easy-to-use in future iterations.

Über den Autor / die Autorin:

Martin Kraft is a M.Sc. student in media informatics at the LMU Munich. As a former startup founder himself and holder of the LMU entrepreneurship certificate of excellence, he has worked for the Munich-based startups optile and aboalarm and is especially interested in startup and blockchain-related topics. His focus has always been the creation and management of concept and UX-related topics while working for Vispiron, one of Munich’s leading engineering service providers. As of today, he is a staff researcher for fortiss, the Bavarian research institute for robotics and automated systems.