Smart Contracts: Trust and Faces in Simple Terms

Business is always built on trust, fixed in a contract: who, to whom, when, how much, and under what conditions should happen. There is an option to make this process more reliable and cheaper using digital technologies. Meet – the smart contract.

The first mentions of documents confirming that parties will perform certain actions (now called “contracts”) date back to Ancient Egypt. There, too, appeared people who verified the identities of the parties involved in the contract and its fulfillment. In modern terminology — “trusted” persons. Over the course of human society’s development, nothing has changed since the time of the pharaohs — contracts are multiplying, as well as people who have no actual relation to them.

The results are disappointing — all these notaries, lawyers, attorneys, and proxies do not guarantee 100% reliability, regardless of the number of papers and the amount of fees. The problem is solved by “smart” or smart-contracts.

Smart contract: what it is, for whom, and why

The first company to create a convenient software tool for working with smart contracts was Ethereum, but the idea was developed much earlier. The first projects for automatic execution of a set of conditions for achieving a result, agreed upon in advance, were described in the works of Nick Szabo, one of the theorists of digital currencies, quite a long time ago — as early as 1977.

A smart contract (theoretically) allows to eliminate or minimize the need for trust in third parties for executing a documentary deal (bank, payment system, notary, government registries). All data is stored in a decentralized and — most importantly! — immutable database (in the blockchain). The database is open — all participants in the deal can audit the contract at any time.

smart contract

In this process, any organization, not just business companies, can significantly reduce costs, optimize document turnover, improve data accuracy, and increase database security.

Ethereum smart contracts made it possible to create an alternative model for ICO investment (initial coin offering). Project tokens are similar to securities and can be traded on exchanges using the same principles and strategies as cryptocurrencies.

How does a Smart Contract work

To clearly explain to beginners how a “smart contract” works, let’s consider examples from real life:

Example 1: Goods and services via an online store.

How it usually works:

  • After selecting a product or list (cart), the buyer sends a purchase consent.
  • The seller confirms availability, then sets payment conditions — full or partial prepayment.
  • Once payment is made, the goods are shipped or services rendered.

The problem is immediately visible — it requires maximum trust from both parties. The buyer waits for fulfillment since they paid, and the seller risks that the product will not be fully paid or not paid at all. If you have commercial experience, you can easily recall examples of deals where everything proceeds on prepayment and subsequent “reminder” of debts.

The trust issue in crypto relationships arose long before smart contracts. Lacking alternatives, the “trusted confirmation” technology (Escrow) was used, where a specific person or mediator (intermediary) was added to execute the contract, overseeing the fulfillment of all digital contract conditions. From a commercial perspective, this process does not differ from usual business practice, where a third party — usually a bank or insurance company — monitors contract execution.

how a deal works

The illustration shows how a “classic” deal works, using external confirmation (guarantee). As we see, the mediator can start a “game” against both sides, convincing participants that all conditions are fulfilled.

Example 2: Group purchases

Students living on the same floor decided to buy a washing machine for shared use. But they didn’t know each other long enough, so full trust is not yet established. Just like in the previous example, they can seek an independent mediator or, simply put, a respected person trusted by all (or many!) to resolve all financial and organizational issues.

group purchases

In a week, the holidays start, so there is no certainty that all contributions will be made simultaneously. Therefore, the mediator must fulfill a series of additional conditions — this is similar to ICO tokens representing the same smart contracts.

Approximate list:

  • Each contributor must deposit the required amount in cash or cryptocurrency at the current rate no later than 5 days after the start of the holidays, otherwise the mediator stops the deal and refunds the funds.
  • The list of washing machine models is predetermined, and deviations are not allowed.
  • The price cannot be more than 10% above the budget.
  • If the product can be purchased at a discount but fully meets the requirements, the difference in price will be additional profit for the mediator.

Classification of Smart Contracts

All “smart” contracts can be divided into the following groups:

  • By method of execution: centralized and decentralized

Using centralized contracts has become commonplace — we deal with them every day, for example, utility bills or online banking. The result of such deals is often known in advance: regular payments are deducted from the bank account, statements are generated automatically, service requests and confirmations go via SMS, etc. In this case, the service provider’s server acts as a mediator, and if a failure occurs, everything stops or works incorrectly.

types of smart contracts

When the network is decentralized, like Ethereum, any node can be a mediator, chosen either randomly or by mutual agreement. Using an open blockchain database allows verifying the contract execution. Disabling one or several nodes does not affect the overall platform operation.

  • By task type and sequence of conditions execution: pre-installed (typed), limited, and arbitrary

Examples of pre-installed contracts are Waves and Bitshares platforms. The first allows launching ICOs quickly without programming knowledge, the second provides tools for creating, supporting, and recording standard trading operations in the blockchain with minimal setup and the possibility of creating custom extensions.

Arbitrary or “Turing-complete” contracts can have any execution logic: branching, loops, multi-signature (multisig), use of statistical and mathematical functions for internal calculations.

There are also limited (non-Turing-complete) contracts. Bitcoin and Litecoin scripts belong here — transactions are executed in any sequence but without the ability to add new functions or modify existing ones.

  • By launch method (initiation): manual and automatic (self-executing)

Contracts automatically launch when certain conditions are met, such as time or date. It’s important to carefully define the deal logic and conditions; otherwise, the result can be unpredictable, especially when several deals are executed sequentially or simultaneously.

Manual contracts are initiated by users (arbitrary ones only work this way). Each stage of execution creates a separate transaction, which can be used later to identify possible programming errors: incorrect input data, calculation mistakes, etc.

  • By confidentiality level: fully open, partially open, and closed.

Closed contract data are visible only to its participants; partially open data are not fully visible. Example: legal case databases where personal data are hidden.

Problems of Smart Contracts

Once, the platform The DAO was the first real project providing external mediator services for smart contracts. But after a hack and theft of millions of dollars from accounts, it seemed that such technology would be forgotten forever. That did not happen, but for “smart” deals to become truly widespread, they need to overcome two main obstacles:

  • Software failures and errors.

Since the advent of paper, traditional document turnover has been criticized for slowness and excessive bureaucracy. It was considered an advantage over digital registries for a long time until society fully realized: recording any changes in writing or with certified electronic signatures can significantly reduce the likelihood of errors or abuse.

Whether a digital platform or network is safe depends solely on the qualification of the people developing transmission protocols and data processing centers. Their complexity makes errors inevitable, which over time accumulate and are not solved — creating so-called “technical debt.” Returning to The DAO, hackers gained access to client wallets using errors in Solidity, Ethereum’s programming language. The company denies any responsibility for financial losses: in their view, they only provide a “development tool,” and how it will be used is not their concern.

Similarly, programmers creating smart contract code can think in this way. Their “technical” mindset often does not realize the scale of possible coding errors. For them, a browser crash and money loss from incorrect transfer are perceived at the same level — technical and moral.

  • Scalability

If deals are conducted within corporate applications, adding computing power is not a problem, unlike in the global Ethereum network and similar networks. As the number of nodes and deals increases, delays in execution also grow, especially for arbitrary contracts with multisig. Developers report some progress in performance, but an optimal balance between speed and security has not yet been achieved.

And what is the result?

We have examined what smart contracts are in simple words, and despite the listed problems, the overall situation with the development of this technology is actively positive. Over the last 2-3 years, several major technical and software updates have increased network speed and transaction security. There is no doubt that this is one of the most promising technologies, giving business and government structures a chance to work more efficiently. Moreover, profitable ICO contracts can be a good source of income, which we also plan to engage in.

Cryptoexpert
Rate author
( 2 assessment, average 5 from 5 )
All about investing in cryptocurrency
Add a comment