What are smart contracts, why are smart contracts needed, how do they work? How to use smart contracts? Practical application of technology


You may not know it, but when you sign any agreement or contract, there remains a very large share of risk. The second party to the contract may not fulfill it: it may not deliver the goods or deliver them on time, the goods may turn out to be defective, or the counterparty may even go bankrupt. An actual signed contract in the real world does not mean that it will be guaranteed to be fulfilled.

Eg in 2017, 1.7 million cases were considered in the arbitration courts of the Russian Federation, most of which were directly or indirectly related to violation of contractual obligations.

But fortunately, blockchain technology has given us not only cryptocurrencies as a cross-border means of payment. Blockchain is about more than money. This is something that can replace the usual contractual relationships with the help of smart contracts (smart-contacts).

What is a smart contract?

A smart contract is computer code, recorded in a distributed registry (blockchain). Unlike a regular paper contract, a smart contract cannot be changed or forged. It also cannot be canceled in unilaterally(if this is not provided for in the smart contract itself). A smart contract allows you to operate with values ​​such as property, services and money.

The term “smart contract” itself is not so new. It was first used in 1994 by Nick Szabo, who is considered the father of blockchain technology. By the way, many believe that Nick Szabo is the creator. Read about him and you will understand everything.

Nick Szabo then proposed a smart contract as a replacement for the usual intermediary in contractual relations between people. Instead of arbitration and a supervisory government agency “guaranteeing” the execution of a regular contract, this will be done by incorruptible, unbiased computer code.

Imagine that all notaries, judges, and all government agencies that are involved in registering property rights will be replaced by a few lines of code that does not take bribes, does not take sides in a dispute, and works 24 hours a day.

The smart contract is recorded in a decentralized registry (blockchain), which cannot be faked or canceled. In order for a smart contract to start working, you do not need to go to the offices of officials and collect signatures. In addition to eliminating unnecessary archaic elements in social relations, the process of creating contracts is also accelerated.

An example of a Samrt contract in real life

Let's say you want to buy a certain product through a bulletin board from a person in another city. It is impossible to check the actual condition of the goods and the honesty of the seller. The seller is ready to send the goods by mail, and you are ready to pay for it, but how to eliminate risks? To do this, a smart contract is created that guarantees that the seller will receive payment only if you receive the product of the declared quality.


Once the smart contract is created and signed by the parties to the transaction, it can be seen on the blockchain. Most smart contracts are published in open access and anyone can see them. In addition, the smart contract has certain condition markers. For example, when a service is provided, the counterparty receives a reward in cryptocurrency. The reward will be paid automatically by the smart contract when the contract condition is met.

Such a deal will be beneficial to everyone, because in this scheme there is no arbiter in the form of an intermediary who monitors the fairness of the contract and receives a commission for this.

Ethereum: a platform for smart contracts

What technology should be used to create a smart contract?


Most smart contracts are written and run in . Ethereum is a blockchain system proposed in 2013 by a Russian-Canadian programmer. In 2015, it was fully implemented and launched.

Each contract is executed on the Turing-complete Ethereum Virtual Machine (EVM). Or in other words, Virtual Turing Machine. This virtual machine is part of the general Ethereum algorithm and is capable of performing a certain range of tasks. In particular, it is designed for processing smart contracts. Such a Turing machine makes decisions based on some variables. If any condition is met, then it performs the specified action.

So this virtual machine the best way suitable for servicing smart contracts.

It is the functionality of contracts that globally distinguishes Ethereum from Bitcoin, which is made only for sending funds from one user to another. Ethereum allows you to implement more complex tasks.

After Ethereum, many platforms appeared on the market that also began to support smart contracts. Among the most famous are such projects as, and.

Advantages of smart contracts

Summarizing this information a little, we can find several obvious advantages which smart contracts provide:

  • Independence. You no longer need intermediaries. Problems such as overpayment for an intermediary, bureaucratic difficulties in signing and obtaining certification of an agreement, as well as the likelihood of dishonest behavior by an intermediary disappear. The smart contract operates on a decentralized blockchain, which removes possible restrictions from national governments and their supervisory authorities.
  • Confidence. It is not necessary to trust the counterparty partner, it is enough to trust the blockchain. In blockchain we trust!
  • Safety. The probability of hacking and theft of funds tends to zero. For example, to steal your money from your account, a hacker needs to hack into your account. But in the case of a blockchain, there is simply nothing for him to hack, because the blockchain is decentralized. It resides on thousands of computers at the same time. To carry out an attack, you need to capture 51% of the entire network, which is almost impossible to do, since such an attack would cost a LOT of money.
  • Speed. Contracts are not just secure and convenient - they are also fast. And not only because you are freed from contacts with bureaucracy in the form of officials and notaries, but because the blockchain works very quickly. The process is fully automated and all operations are freely visible.

All these advantages clearly demonstrate the superiority of smart contract technology over the traditional contractual relationships that we are accustomed to. But that's not all.

Smart contracts can be used not only in trade or finance, but also in management, medicine, education, real estate and insurance. And this is far from full list. Smart contracts can be used in any area where ownership needs to be transferred or ownership verified.

In the future, smart contracts could replace passports and visas. They will greatly simplify the conclusion of international business deals and literally destroy bureaucratic boundaries in many important areas of our lives.

Security issues of smart contracts

Despite such bright prospects, smart contract technology is still very young and far from perfect. First of all, these are safety problems associated with the human factor. When developing a smart contract, an error may be made in the code, or the user may unknowingly transmit private keys to third parties.

For example, the organizers of the ICO KICKICO lost $8 million in July 2017 due to a vulnerability in a smart contract. But the most famous case of a code error is the DAO hack in June 2016, which caused the Ethereum community to split and the emergence of . During this incident, hackers managed to steal 50 million US dollars.


These numbers may seem large, but if you compare them with official statistics on hacking of bank accounts and other digital assets, it turns out that smart contracts are significantly more effective. Here you can add identity theft and so on.

Today there is a whole direction in the development of smart contracts that deals with the security and audit of smart contract code. One of the leading projects in this area is. The Callisto team is engaged in professional auditing of smart contracts for security vulnerabilities and guarantees protection against the actions of attackers.

In addition, blockchain technology is still more reliable and safe system data storage compared to traditional systems. The difference in security is the same as between a huge padlock and a simple bolt.

The future of smart contracts

Smart contract technology is developing rapidly. Following the stunning success of Ethereum, many large companies took notice of the opportunities on the horizon and rushed to explore them. For example, the Enigma and Wanchain projects are developing secret contracts that would not be visible on the public blockchain. Since they are in huge demand, there should be a demand for anonymous smart contracts.

As problems arise in smart contracts, solutions are found. After all, Nick Szabo, Satoshi Nakamoto and Vitalik Buterin created their projects to solve the problems of the existing financial system. And in general, we can say that blockchain is already successfully solving the problems of the entire financial technology industry.

But most big problem smart contracts are not code errors and hackers, but states and governments that still have little or no understanding of the benefits new technology. We are now seeing how the most progressive countries are very cautiously beginning to study and apply smart contracts in practice, at that time.

Many people are seriously talking about the fourth industrial revolution - a revolution of new technologies that will forever widen the gap between technology leaders and laggards. Blockchain and smart contracts are exactly the new technology that leaders will use while living on a feudal level.

I received it just recently. But usually, the blockchain is talked about only as a system through which cryptocurrencies operate. In fact, this technology has more prospects than the cryptocurrencies themselves.

Based on the blockchain, it is possible to create so-called smart contracts, which can be used in many areas of both business and social activity. But to use it, for example, in your business, you first need to understand what it is and how it works. Therefore, in this article we will tell you what a smart contract is in simple words.

What is a smart contract and how was it created?

A smart contract is a virtual protocol written in a programming language. It is used as a tool for exchanging goods or concluding contracts, and ensures the fulfillment of the terms of the parties to this contract.

Smart contract technology was first described by cryptography specialist Nick Szabo. In 1994, he formulated the concept of “self-executing contracts”, which operate on the basis of a decentralized system. Such a system was created only 14 years later and was called “blockchain”. It was after this that the opportunity arose to implement the idea of ​​smart contracts. But they began to use them in practice only after their appearance. Since it was the creators of this project who showed everyone the prospects of this technology.

How does a smart contract work?

To understand how a smart contract works, you need to know the basics of blockchain technology. In this article, we will not delve into all the nuances of the blockchain, since you most likely already know about it.

So, you can compare smart contracts with distributed computing. Let's say that we need to solve some complex problem. To do this using distributed computing, we split this task into several parts and send these parts to different nodes (). After each node solves its part of the problem, we collect the answers, sum them up and get the overall solution.

Solving the same problem using a smart contract will look a little different. We do not divide the problem to be solved into parts, but send it to each node. They perform calculations and give us the result. Ideally, all nodes should produce the same result.

In practice, this system can be used in any agreement in which there are two or more parties. Using a programming language, the parties to the contract write down all the scenarios that will be executed after certain events occur.

Application of smart contracts

The use of smart contracts in practice is not very widespread. In theory, it can be used in almost all areas of financial transactions: lending, insurance, purchase and sale agreements and much more. But for now, most companies prefer to work as usual.

Of course, there are also examples successful implementation this technology. For example, almost everyone uses a smart contract for ICOs. After all, only such a project can gain the trust of investors. If a smart contract is embedded in it, then investors can freeze their previously invested funds at any time. This provides high level investment security. If the project does not raise the required amount for launch, the funds will automatically be returned to investors. And if everything went well and the project has raised enough funds, investors activate the keys given to them and allow it to start working.

Smart contract security

When a person or company needs to conclude a deal, the first thing they have to do is turn to intermediaries: lawyers, notaries, banks. Smart contracts make it possible to exchange goods and receive services without intermediaries. But the security of smart contracts remains questionable.

Many people believe that since ordinary contracts are based on laws, their security will be higher. But they do not take into account that laws can be interpreted in different ways. And if the case comes to court, then in 90% of cases it is not the one who is right who wins, but the one who has the best lawyers. And in smart contracts, the functions of the court are taken over by the system itself. If one of the parties does not fulfill the conditions, then, relying on its algorithm, the system makes its decision.

Should you use smart contracts?

Smart contracts are enough new tool conclusion of an agreement between people. But the few examples of its use show that it is quite promising and has many more advantages than disadvantages. With its help, you can conclude an agreement without intermediaries, and this saves both time and money. In general, if a smart contract is written correctly, then both parties to the contract will get what they want and protect their assets.

Opinion from the network:

Yes, the bureaucratic fuss has become so unbearable that the introduction of smart contracts is simply necessary. We need to start studying this technology now and everywhere.

One of key features blockchain technologies - smart contracts. Many market participants believe that smart contracts can optimize and speed up processes in many areas of the economy. To find out if this is so, Bloomchain and the FinTech Association have prepared a special partnership project dedicated to smart contracts.

About what smart contracts are, how they work, what are their strengths and weak sides, says Ivan Basov, head of the analytics service of the FinTech Association.

1 What are smart contracts?

January 25, 2018 Ministry of Finance of the Russian Federation and Bank of Russia projects federal laws“On digital financial assets.”

Ministry of Finance smart contract as an agreement in electronic form, the fulfillment of rights and obligations under which is carried out by committing automatically digital transactions in a distributed registry of digital transactions in a strictly defined sequence and upon the occurrence of circumstances defined by it.

The position of the Bank of Russia has some differences. According to their approach, a smart contract involves both the execution of rights and obligations and their determination. The Bank of Russia’s opinion also differs regarding the type of exercise of rights and obligations. The Central Bank of the Russian Federation uses the concept of “digital records” in contrast to the “digital transactions” of the Ministry of Finance. The final difference was that the Ministry of Finance focused on the distributed register of digital transactions, while the Central Bank of the Russian Federation does not have this part. Distributed ledgers are often mistakenly identified with blockchain. Blockchain is one of the options for implementing distributed registries.

Option of the Central Bank of the Russian Federation: smart contract - an agreement in electronic form, the determination and execution of rights and obligations under which is carried out by automatically making digital records in a strictly defined sequence and upon the occurrence of circumstances specified by it.

In its applied meaning, a smart contract is a piece of software that is a list of rules (computer operations) that will fulfill the terms of the transaction.

2 How did they appear?

In 1993 programmer Nick Szabo coined the term “smart contract.” In 1996 His publication “Smart Contracts: Building Blocks for Digital Markets” was published, in which he defined smart contracts as a set of “promises”, including protocols, in which the parties fulfill promises.

3 And how does it all work?

In fact, the technology is simple - a set of conditions (in other words, code) is prescribed in a smart contract. According to the formula (code), the rights and obligations of the parties will be automatically fulfilled in accordance with the occurrence of certain events, that is, in accordance with the stages of the contract.

The simplest and clear example smart contract that will be understandable to anyone - these are vending machines. The built-in formula (code) looks like this: you want a sandwich, but you can get it only after depositing a certain amount of money into the machine. This is the condition after which you receive your sandwich. The code also contains a condition to give you change if you insert a bill of a larger denomination.

4 Everyone is talking about smart contracts. What's special about them?

  • Smart contract is a piece of software that includes program codes;
  • Electronic form and use of digital signature;
  • Low costs for contract execution, since no intermediaries are required;
  • Execution of the contract in strict sequence and upon the occurrence of certain events or circumstances.

5 Are smart contracts a breakthrough?

The idea and concept of smart contracts appeared in the nineties, but the approach became more popular with the development of distributed ledger technologies. The advantages of these technologies bring smart contracts to new level safety, reliability, accuracy. Smart contracts were perhaps too breakthrough technology of its time, and it has only now been possible to truly unlock its potential. This is just the beginning; In the future, I believe, this form of relationship will develop and become even more popular. But we must admit that there are still problems in the functioning of the interaction model through smart contracts.

6 How effective are they?

In general, it is difficult to assess the effectiveness of smart contracts, but it is possible to measure the results in individual scenarios. As an example, we can take the use of smart contracts for recording financial information. Accounting systems are prone to errors and fraud. In large firms, maintaining infrastructure is a capital-intensive process. Requires significant human capital and connectivity software to process transactions from systems that do not communicate. In this case, the use of smart contracts helps reduce accounting costs information systems thanks to the distribution of costs among several organizations.

Speaking of even more simple example, then one of the successful areas of application of smart contracts is . Imagine how much easier and faster the transaction will be if it is in a smart contract. You write a code that records all stages of the transaction and makes it secure using blockchain technology electronic signature. In this case, you don’t even need to come to the bank: you can simply download the bank’s application on mobile phone and when you receive a signal from the bank about mortgage approval, click “ok” (put an electronic signature). After this, the money from the bank is transferred to the developer - the transaction is completed.

7 What kind of smart contracts are there?

Smart contracts can be divided:

  • By complexity. From simple transactions to money transfers between two participants to multilateral transactions with a large number of different conditions.
  • According to the degree of automation. Smart contracts can be fully automated or include some of the provisions in the form of a traditional paper contract.

Elements of a smart contract (example of implementation on the blockchain):

  1. Identification agreement. The parties determine the possibilities of cooperation and the desired results. The agreement may include business processes, exchange of assets, transfer of rights and much more.
  2. Specified conditions. A smart contract can be initiated by the parties or executed when specified conditions are met. Conditions can trigger a smart contract on weekends, holidays.
  3. Business logic code. Computer program written in such a way that the agreement is automatically executed when the specified parameters are fulfilled.
  4. Encryption. It provides secure authentication and verification of message exchanges between parties to a smart contract.
  5. Execution and processing. When consensus is reached on authentication and verification, the smart contract is written into a block.
  6. Network updates. Once the smart contract is executed, the registries of all computers on the network are updated to reflect the new state. Once a record has been verified and included in the block chain, it cannot be changed.

8 Pros and cons of smart contracts

Advantages:

  • Transferring trust from a centralized center to distributed system, no intermediaries required;
  • Security, inability to make changes;
  • Low costs;
  • Speed. Execution of smart contracts occurs faster than traditional contracts;
  • The emergence of new operating and business models. An inexpensive way to reliably fulfill conditions contributes to the emergence of new business niches.

Flaws:

  • Errors in the code, accidental or intentional. The cost of the DAO error was over $60 million, – $200 million;
  • The execution of a smart contract depends on computing power the network in which it is located, so there may be execution delays due to overloads;
  • Lack of legislative status;
  • Insufficient understanding of the technology by potential users.

9 Is anyone already using smart contracts?

In global practice, smart contracts are used and piloted in the financial services sector (microinsurance, clearing), telecommunications and media (royalty distribution), in the field of energy and resources, the public sector, cross-sectorally (voting, P2P transfers).

Smart contracts can be used in the areas of digital identity, securities, financial trading, derivatives, mortgage lending, insurance, supply chain, clinical trials, notary. Practical use smart contracts are not yet very widespread, since regulation is not yet legislative in nature. Among the experimental projects, one can highlight the transaction of the member bank of the FinTech Association, Alfa-Bank.

10 What prevents the implementation of smart contracts in real life?

It is necessary to level out existing shortcomings: technological, legal, organizational. At the legislative level, a step forward has already been taken in the form of bills from the Bank of Russia and the Ministry of Finance. Now there are infrastructure barriers, not all market participants are technically able to use smart contracts, but still key moment- these are legal issues. Until they are resolved, companies will be afraid to fully use this technology, since there are no proven mechanisms in the legislation to protect participants in the transaction.

Since the world was introduced to the first digital Bitcoin currency, not much time has passed. But this short time brought a lot of new things into the life of humanity. It cannot be said that these innovations have covered 100% of the planet's population, but they have ceased to be something accessible only to a narrow circle of specialists. In any case, gone are the days when the vast majority of users knew only the word “Bitcoin”, and few people understood what was hidden behind this word.

Now many people are interested in the crypto sphere, follow its development, delve into the essence of the processes taking place there and do the right thing. Because the range of application of new technologies and new financial instruments is constantly expanding, and soon they will enter our everyday life and it will be very difficult, if not impossible, to do without them.

In order to make our contribution to the cause of eliminating general cryptocurrency illiteracy, we decided to tell you about such an interesting and useful phenomenon as “smart” contracts or, as they are also called, smart contracts.

It is worth noting that the concept and term “smart contract” did not appear in connection with the beginning of the cryptocurrency era. This happened much earlier, back in 1994, and the author this term became a certain Nick Sabo, an IT specialist.

In simple words, then this concept implies a self-executing contract, it is based on a transaction that is triggered by one or another event (this can be anything from another transaction to a weather forecast). To complicate things a little, a smart contract is nothing more than a digital contract (a form of computer algorithm) in the form of a code. His entire “life” is contained within the framework of the blockchain. Support and management is carried out by a network of computers. Everything is written in it possible options developments and deception is impossible here.

“Smart” contracts were invented in order to make it possible to exchange certain assets (money, valuables, real estate, etc.) without involving third parties. In the sense that, under other conditions, the transfer of these assets will necessarily require the intervention of an intermediary, who will keep them and monitor the implementation of the agreements. And only when the agreed conditions are met, he will transfer the assets to one of the parties to the transaction. In such a simplified presentation, all this does not sound so scary, but imagine contacting notaries, paying for documents and waiting for their execution, contacting financial institutions, and if the agreed conditions are violated, going to court, and you will understand how much a smart contract simplifies and speeds up the procedure .

Contracts, which are commonly called “smart”, can be conditional or unconditional. Their differences lie in the difference in the conditions embedded in them that are necessary to trigger programmed actions.

All the information necessary to execute the conditional option is contained in its “native” blockchain. And it doesn't matter what kind of information it is. It can be absolutely anything, the main thing is that it is concluded in the same blockchain within which the contract is executed.

Now about the second type of smart contracts, unconditional. Here the data is requested from outside, it exists outside of . For example, the results of some elections, sports competitions, even the marriage of a popular singer. That is, any event the fulfillment of which will trigger the execution of the contract. True, in in this case, among other things, there must also be a connecting link between the real world and the blockchain, called a trusted oracle. It is the oracle that supplies information about the event that triggers the execution of the contract. Here, naturally, the problem of user trust in this or that oracle arises, although a decentralized method of obtaining necessary information(voting by a group of token holders).

Today this type agreements are applied quite widely, affecting various spheres of human life. But there are several areas where their use is being particularly actively promoted. These are trade, insurance business, elections, gaming industry, taxation, etc.

To cover the topic completely, we will give several examples of the practical application of “smart” contracts, from which the principle of their operation will become clear to you:

  1. Trade (delivery of goods). It's no secret that in modern world The popularity of online shopping is growing every day. This saves effort, time, and often money. As a rule, cash on delivery payments are used for settlement. If you have encountered such a situation, then you know that when paying for goods you have to pay several a large amount than the purchase price. If smart contracts are used, then the buyer does not have to overpay.

Everything happens as follows. The required amount is debited from the buyer’s account and moved to the blockchain, where it is recorded and remains until you receive the goods. As soon as the purchase falls into the hands of the customer, the funds are transferred to the seller’s account. What is important is that such a document can cover various situations.

For example, you can set a condition according to which a significant delay in delivery entails a refund to the buyer. Or vice versa, if the buyer does not receive the goods on time, then he is automatically charged a certain fine for this, the remaining money is returned to his account, and the goods are again delivered to the seller.

  1. Sphere gambling. A simple example. You have a friend and you are both betting on the outcome of some football match. The bet amounts are debited from your accounts and stored in the blockchain until the end of the game. Once the game ends, the results are verified by the smart contract and the winner receives the amount due to them.

If the teams draw, then the participants receive their money (bet) back. It would seem that there is a well-established scheme for betting through a bookmaker, why do you need anything else? Firstly, you do not have to pay the bookmaker for services (commission), and, secondly, there is no risk of getting caught by a dishonest bookmaker, which, unfortunately, happens from time to time.

  1. Inheritance of property. We are all mortal and sooner or later we leave this world. Those who have passed away are left with some property (real estate, money, etc.) that they would like to transfer to specific heirs. Inheritance matters are usually handled by lawyers (executors). Their responsibilities include transferring the inheritance into the hands of certain people, but if these persons take an unscrupulous approach, the will of the deceased may not be fulfilled or will be fulfilled in a slightly modified form (part of the property may be transferred to completely different people to whom it was bequeathed).

At using smart contract, any violation or change of the will is excluded. After the death of a person, the contract checks the register of the deceased and, if the fact of death is confirmed, then all the assets left by him are transferred to the possession of those people to whom they were intended by the deceased.

  1. Rental of property. If you need to rent an apartment or carry out any other real estate transactions, then a smart contract will be very useful here.

Let's focus on rental housing. You (tenant) and the owner of the apartment (landlord) enter into a “smart” agreement for certain time. The amount of the deposit and payment for the first month of residence is sent to the blockchain, after which the tenant, that is, you, receives the keys to your new home.

In order for the contract to be fully implemented, the lock of the rented apartment must be connected to the Internet. If you do not pay for your stay on time, it will be automatically blocked. The deposit, after the end of the agreed rental period, will be returned to the tenant (you) or transferred to the landlord's account if you have somehow violated the contractual terms (for example, damaged furniture). These are only approximate main points of the contract. They can be much broader and relate to any issues important to the parties.

There are a number of advantages of using smart contracts in various areas of our lives. We present to you the main ones:

  • this type of agreement provides users with independence from intermediaries; there is now no need to resort to their services;
  • since smart contracts are on the blockchain, their terms cannot be changed in any way, which is proof of their security;
  • when concluding such contracts, there is an opportunity to save money, since the absence of intermediaries allows us to develop more favorable conditions;
  • the parties to the transaction do not incur any costs, because fulfilling the terms of the contract allows them to immediately exchange assets.

But you can't idealize this tool building business relationships. There are also some disadvantages here:

  • first of all, this is the lack of legal status, because cryptocurrency is involved here, and not a single state has yet accepted it as an official instrument for carrying out financial transactions;
  • Each smart contract must provide for all probable situations and scenarios, that is, in complex transactions, the creation of such a document requires special attention and is not immune to errors;
  • and, finally, a drawback that only time can correct - there are still very few users who understand the essence and advantages of “smart” contracts.

But the disadvantages listed above do not at all detract from the importance and potential of smart contracts. There is no doubt that this technology for formalizing contractual relations will eventually gain a foothold in our Everyday life, but only as things connect to the World Wide Web.

We tried to simply and clearly explain to you the essence of such a concept as “smart contracts”, and also showed the possibilities of their application using examples. I would like to hope that we were able to prove the necessity of using this technology in human everyday life. After all, with all the problems that are present in blockchain technology, its advantages over centralized systems it's hard not to notice.

As for the disadvantages listed above, they cannot be perceived as inevitable. Rather, these are temporary shortcomings. And many developers around the world continue to work on eliminating them. Moreover, these efforts are already bearing fruit, and we will have better technology in the not-too-distant future. So the time is not far off when old, outdated forms of contracts will only be a memory, and humanity will begin to use their safe, reliable and accurate digital analogues en masse.

Sometimes the technical space of cryptocurrencies can seem a little confusing and filled with puzzles. Not all users understand what certain words mean, and the more complex the concept, the more difficult it is to understand. Such words include smart contracts or “smart” contracts.

The term smart contract was coined by computer scientist Nick Szabo in 1994. It is in his honor that one of the Ethereum units is named Szabo. It is 0.000001 ETH.

Smart contracts, simply put, are contracts that execute themselves. In its most basic form, a smart contract can consist of a transaction that is triggered by some event, such as another transaction or upon reaching a certain block height (the position of the block relative to other blocks in the chain).

The goal of smart contracts is to completely eliminate the need to involve third parties. Without a smart contract, a transfer of funds associated with the fulfillment of a certain condition can only be carried out by working with an intermediary, who will hold the funds and transfer them as soon as the condition is met. Smart contracts allow such transfers to be made without intermediaries and associated fees.

There are 2 types of smart contracts: conditional and unconditional. They differ in the ability of conditions to trigger specified actions in a smart contract.

Conditional smart contract receives all information from the blockchain in which it operates. This information can be represented by a certain transaction, a certain block height, the execution of another contract, etc. In general, any information that can be found in the blockchain.

Examples: provably fair lotteries, multi-signature transactions

Another type - unconditional smart contracts, which request information located outside the blockchain. This could be anything from the results of a football game to weather reports or election results. Whatever comes to your mind. However, to execute such contracts, it is necessary to have a trusted oracle.

The oracle is the missing link between the blockchain and the real world. With the help of an oracle, a smart contract can receive information about external events, which triggers it. Of course, this requires the user to trust the particular oracle. However, this can also be achieved using a decentralized method, when a group of token holders vote on a specific outcome of an event and thus launch a smart contract. Such a system is used by the Augur prediction market. We discussed the topic of oracles in more detail in a separate article:

Examples: sports betting, prediction markets

Smart contracts can be used not only to transfer funds, but also for more complex tasks. The smart contract system can be used to build decentralized applications, which is already being done on the Ethereum network by projects such as Augur, FirstBlood and others.







2024 gtavrl.ru.