With the spread of distributed ledger technology (blockchain) in society and the cryptosphere, there is a growing interest in smart contracts and the opportunities they provide. In this article, I will answer what “smart contracts” are, why they should be shown and what impact they can have on our lives.
What are smart contracts
A smart contract is a computer algorithm designed to implement and maintain self-executing contracts on the blockchain. It is so because after a smart contract is written and placed on the blockchain, it is self-executing. In other words, a smart contract is a means of exchanging value without intermediaries.
Suppose that a smart contract is programmed so that it waits for condition A. As soon as this condition is met, action B is automatically performed, and after condition A is met and action B, the contract is closed, placed on the blockchain and no longer accepts incoming conditions A. No one can prevent a smart contract from performing action B when condition A is fulfilled, and no one can force a smart contract to perform action B without fulfilling condition A. In this case, we repeat, the contract is executed automatically.
All contracts and the results of their work are stored in the blockchain and remain there forever.
History of smart contracts
For the first time, programmer Nick Sub wrote about smart contracts back in 1994. He described this phenomenon as a computer protocol that independently conducts transactions with full control over their execution.
Smart contracts have become widespread with the development of the Ethereum network. In 2013, the future founder of the project, Vitalik Buterin, became interested in Bitcoin and came to the conclusion that the Bitcoin blockchain is poorly suited as a protocol for smart contracts, since the original purpose of Bitcoin was different. Then Buterin decided from scratch to create the most suitable protocol for this task.
Today, it is the Ethereum network that is the basis for services and applications based on smart contracts. Numerous projects have been created on Ethereum: these are DeFi, exchanges, utility tokens and blockchains, accounting systems for transactions and supply chains, NFTs, social tokens, crypto collection games, and much more. It should be noted, that Ethereum is not the only environment for smart contract development today. There are others, including Hyperledger Fabric, EOS, and Stellar.
Distinctive feature
Smart contracts allow you to carry out reliable and confidential transactions without the involvement of intermediaries and regulatory authorities. In addition, all transactions are easily tracked on the blockchain (without specifying the participants in the transaction). They are easy to trace and impossible to reverse. The last state of the smart contract is also in the blockchain, a copy of which is contained on many network nodes, so the smart contract cannot be tampered with or deleted.
How it works
A smart contract is written into the blockchain, where all its code is placed in a software container – a block. This block combines all messages related to the smart contract. Messages are inputs and outputs of a smart contract (conditions that a smart contract “waits for” and actions that it performs). Using messages, the contract is connected to the digital or real world outside the blockchain.
Smart contracts have required attributes:
- electronic signature based on public and private keys held by two or more parties to the contract;
- a private decentralized environment (the same Ethereum, for example), in which smart contracts are written and which supports the inputs and outputs for oracles. We will talk about the latter separately; for now, let’s just say that oracles are a kind of bridges between the blockchain and the outside world;
- the subject of the contract itself and all the tools necessary for it (current accounts, oracle programs, etc.);
- precisely defined conditions for the execution of the contract, which the parties to the contract confirm with their signatures, and also confirm the reliability of the source of digital data.
Scope of smart contracts
It seems that everything related to human life can be built on smart contracts. Three main characteristics – full accounting of all data, eternal storage in the blockchain and reliability (no need for an intermediary) – make them an excellent tool for many sectors of the economy and in general aspects of human life.
The most famous use of smart contracts is, of course, cryptocurrencies and transactions with them. However, the matter is not limited to crypto only, and the scope of application of smart contracts is, in fact, very extensive.
Here are just some of the areas of activity where you can use smart contracts: control of goods sold in stores and their accounting, registration of cars and storage of data about their owners, real estate transactions and storage of owner data in the blockchain, smart voting, reception and accounting decisions on inventions, organization of work of decentralized exchanges and protection against double sale and others.
An example of how smart contracts work
To clearly explain how smart contracts can be used in everyday life, we will give a small example.
Imagine a situation that we have an electronic car registration system, in which all data on car owners and all transactions are entered. This system is built on the basis of Ethereum, and one type of smart contract operates in it (in fact, there can be many smart contracts, but for simplicity, we will consider only one type). The smart contract contains data about the current owner, data about the car, the date of the last sale and, accordingly, the transfer of ownership of the car, the data of the past seller and the price of the transaction.
So, let’s also assume that we have a car that Jack currently owns, and he wants to sell his car. He enters into the electronic system data on his car and the price for which he is ready to sell the car. Anyone who wants to transfer money to this smart contract can buy a car. After such actions, the smart contract will wait for any person who transfers money for the car, and only after that the contract will be executed.
Suppose that a customer named Nick came to Jack, examined the car and expressed his willingness to buy it. He transfers money to the address of this smart contract, the contract is executed, the money is transferred to Vasily’s address, and the ownership of the car goes to Nick. Note that until Ivan transfers the money, the smart contract is not executed, and no one can claim Vasily’s car. And immediately after the transfer of money, the car becomes the property of Nick, and no one, including Jack, has the right to claim his rights to it.
Thus, we get a system in which no intermediaries are needed at all. There is no need for registration and regulatory authorities, no information or paperwork is needed, there is no need to go anywhere and complete a transaction. The data on the last state of the smart contract (and therefore on the current owner) is located in the nodes of the blockchain, and no one is able to hack it. At the same time, anyone can view the data on the owner of any car (let it be anonymized data) and view the entire history of buying / selling a car without leaving home and without asking for any information! Everything is transparent, everything is “clean”.
But on the basis of the blockchain, it is possible to create a system for accounting for oil changes in cars, accounting for repairs and replacement of consumables, accidents in which the car was involved, and even data on the driving style of all drivers of a given car and mileage. Thus, a potential buyer has complete information on the car, and no one has the ability to falsify this data.
Conclusion
Smart contracts are a very promising technology and tool for creating new solutions. There is no doubt that these decisions will greatly affect our lives, and some in a few years will be taken for granted by us.
At the same time, cryptocurrencies are the weakest link in smart contracts, because all settlements under contracts are made in crypto. In Russia, however, a confident course has been taken to prohibit all settlements in cryptocurrencies, and the possession of them and tax evasion are equated to tax crimes. Therefore, we can only hope that Russia will not stand aside from progress and will begin to implement blockchain and smart contracts in daily activities. Otherwise, we risk being left on the sidelines of new technologies and regretting it in the future.
Disclaimer: This article is not investment advice. Assess the risks yourself before making any investment decisions.
For a quick communication with me, write to the telegram.
All crypto articles are here.
Reviews: