When people discover idea of smart contracts for the first time, they think that smart contracts can do almost anything: give out a loan, buy or sell some stocks and even book a taxi for you and pay for it. The most fascinating idea is that in future smart contracts will be able to integrate with self driving cars without a driver and the new era of autonomous organizations will begin.

Let’s see if this is true and find out how smart contracts really work as well.

First of all, smart contract is a computer algorithm that manages money of a particular wallet. One contract — one wallet. Smart contract cannot be stopped, altered or cancelled because its execution is carried out by network consensus.

Smart contracts became widespread due to Ethereum blockchain. Vitalik Buterin realized a huge potential of smart contracts application. He created Ethereum which thing was smart contracts that allow to implement algorithm of any complexity. For example, a complex multisig wallet can be implemented by smart contract. As an example, two equal founder of a company can unilaterally spend money of a shared wallet till a certain limit. If the amount is higher than this limit, both signatures will be required. So smart contracts can implement any mechanism of money management that can be described by a clear formalized algorithm.

In general it is true, BUT there are some limitations that one should know:

Smart contracts can not start execution spontaneously. Someone should initiate the process and pay fee for it. Fees are paid for execution of each line of code. The more lines of code are executed, the more fees (gas) you pay. You might never know how much gas you need (especially if algorithm has complicated structure and cycles). These fees can hamper the wider adoption of smart contracts because the complex algorithm execution may cost a lot. It is impossible to modify algorithm of smart contract even if there is a bug in it. This feature has already led to million dollars losses of investors money. By the way, sometimes smart developers of the smart contracts may include the way out (for example, transfer money to a new smart contract) if something goes wrong. But it leads to the risk that developers may get all the money deposited on the smart contract wallet. Smart contracts can not get any information from outside the world, for example, stocks prices or rates. Someone should provide this information to the smart contract. And can we rely on this information? To keep the network decentralized some developers of smart contracts suggest building a distributed network of so called oracles. These oracles should independently provide smart contracts with the information they need from outside the world, so smart contracts could match the data. However, in real life this model is quite expensive. On one hand, oracles should also pay fees. On the other hand, the work of oracles should be get rewarded to make the network of oracles grow. These expenses are paid by clients of smart contracts. So the wider network of oracles is, the more expensive it is to use smart contracts.

In general smart contracts are a big step forward in comparison with bitcoin (which by the way also provides simple script implementation). But smart contracts should not be considered as a way for automation of complex business processes. I see smart contracts more like as an advanced tool of access control to money of a particular wallet.

It’s also worth to mention about smart contracts as a mean for the token issuance. But even in this case smart contracts is a sort of tool for segregating tokens ownership.