Smart contracts: how they work and why they are needed

Smart contracts: how they work and why they are needed

While some companies are forming another daddy for paper contracts, others rent cars and refuel planes in a few clicks – using smart contracts. It is not only fashionable and technologically advanced, but also fast, secure, confidential. Nevertheless, most lawyers are wary of smart contracts.

Smart contract principles

A smart contract ("smart contract") is a computer program that monitors and ensures the fulfillment of obligations. The parties prescribe in it the terms of the transaction and sanctions for their non-fulfillment, put digital signatures. A smart contract independently determines whether everything has been executed and makes a decision: to complete the transaction and issue the required (money, shares, real estate), impose a fine or penalty on the participants, close access to assets.  

To simplify it as much as possible, a smart contract works on the principle of a vending machine. I deposited the money, pressed the button, and a can of Coca-Cola fell out to you," says Anton Vashkevich, managing partner of the Simpler yurtech company. If a smart contract needs to interact with the outside world (banks, registries, etc.), oracles are used – services that are responsible for connecting to a data source. With the help of the oracle, a smart contract gets access to information online and can find out the current exchange rate, price changes, payment status. "The oracles inform the smart contract about the occurrence of an event that affects the execution of the program algorithm. Therefore, there is a certain dependence of the contract on external data sources and there is a possibility of abuse on their part.

You can register all stages of the transaction or a separate part in a smart contract. Depending on this, it can be:

  • fully automated, without paper media;
  • partially automated, with a copy on paper (in this case, you need to agree in advance who has priority in case of inconsistency – the code or text);
  • partially automated, mainly on paper (for example, if a smart contract regulates only calculations, and the procedure for resolving disputes, assurances about circumstances, etc. is contained in the contract in natural language. By the way, this is the most popular model).

The programming language of a smart contract depends on the technology. If you plan to use distributed ledger technology (blockchain), it makes sense to choose Solidity (used in Ethereum), Go (used in Hyperledger fabric), Java, Kotlin (Corda R3).

The programming language of a smart contract


Experts say that you can automate anything, but it will be expensive and pointless. Smart contracts are reasonable to use for typical, repetitive transactions (supply, lease, securing tenders, letters of credit, guarantees, royalties), the execution of which is easy to track. If the information for making such transactions has already been digitized or the transaction is based on open data, it is even easier to draw up and execute a smart contract. 

Smart contracts interacting with the Internet of Things have great potential. A similar example is car–sharing companies: the application opens the car after making a payment, and the GPS sensor tracks it. A rental smart contract can work in a similar way: a monthly payment will be credited to the landlord's account during the entire term of the contract, but if the money is not paid in time, an automatic remote lock will block the tenant's access to the rented premises. The use of smart contracts for voting will exclude any falsifications and ensure maximum transparency of the process, and when lending, it will automatically block the debtor's account in case of late payment and will not allow him to get into debt. When making a will through a smart contract, you will not need a notary – though a smart contracts audit is strictly recommended.