The emergence of Bitcoin brought to the world not only the concept of cryptocurrency, but also the decentralized registry technology itself, which began to be used in industries different from digital finance.
Different types of smart contracts in the context of blockchain can be considered as a universal mechanism of interaction between 2 or more entities with mutual obligations. They guarantee strict compliance with the clauses of the contract and allow to remove the third party – intermediaries – from the process.
What is a smart contract
The term means an algorithm of actions fixed in the code of the blockchain, which is automatically launched when the agreed conditions are met. The simplest example is the sale or transfer of cryptocurrency from one person to another. Such transactions are anonymous and are not regulated by regulatory organizations. The use of smart contracts avoids fraudulent transactions and ensures the correct execution of the transaction.
What they are for
A smart contract is the basic element on the basis of which decentralized applications work. The environment where DApps operate has no controlling authority, which means it is trustless. Smart contracts act as a guarantor that the terms of the contract will be honored, and automatically. Since the rules of smart contracts are prescribed in the blockchain, they cannot be changed. Participants are obliged to fulfill their obligations under all contractual clauses.
History of emergence
Nowadays, most people associate the concept of smart contracts exclusively with cryptocurrency. But for the first time, the concept of self-executing digital contracts appeared back in 1996. It was proposed by an American scientist cryptographer Nick Sabo. He developed and presented to the public an algorithm for digital currency (Bit Gold). At that time, the ideas were not realized, but after 2008, when Bitcoin and blockchain technology appeared, the protocol was called the immediate predecessor of the Bitcoin architecture.
5020 $
bonus for new users!
ByBit предоставляет удобные и безопасные условия для торговли криптовалютами, предлагает низкие комиссии, высокий уровень ликвидности и современные инструменты для анализа рынка. Поддерживает спотовую торговлю и торговлю с плечом, а также помогает новичкам и профессиональным трейдерам с помощью интуитивного интерфейса и обучающих материалов.
Earn a 100 $ bonus
for new users!
Крупнейшая криптобиржа, где можно быстро и безопасно начать путь в мире криптовалют. Платформа предлагает сотни популярных активов, низкие комиссии и продвинутые инструменты для торговли и инвестиций. Простая регистрация, высокая скорость операций и надежная защита средств делают Binance отличным выбором для трейдеров любого уровня!
The full realization of Sabo’s ideas took place in 2013, when the Ethereum platform appeared. To create an application, it is not necessary to develop a new distributed ledger. Therefore, the cryptocurrency etherium is considered the first digital asset using smart contracts.
Principle of operation
In simple words, smart contracts work on the blockchain and represent parts of the program code. Through mathematical algorithms and programming language, it describes the conditions, the fulfillment of which will lead to the realization of the transaction. The results of such a transaction also get into the blockchain and become part of the register. Therefore, the main factor for any smart contract is a complete and correct description of the terms of the agreement.
Communication with the outside world
The blockchain is an isolated environment. To work with it, you need a mechanism to input variable data from the outside world. These are digital identifiers, values of cryptocurrency rates, and confirmation of the fact of a trade operation. In the blockchain ecosystem, oracles fulfill such a role:
- Hardware elements or measuring devices and sensors that record changes in parameters (temperature, humidity, closed electrical circuit).
- Nodes (nodes) of the system or participants in the network that work to support it.
- Add-ons on top of the blockchain. Often may have their own consensus protocol running on top of the underlying registry.
Oracles are not an element of the blockchain and do not pose a threat to its integrity. They collect information from external sources and process it to make it understandable to the system’s algorithms. There are other options, though. For example, in the Aeternity platform, the oracle system is integrated into a distributed ledger.
Varieties
Different criteria can be specified to classify smart contracts:
- Execution environment (centralized or distributed).
- Degree of anonymity (confidential, fully or partially open)
- Initiation mechanism (restricted or pre-defined).
Often, agreements are also categorized by degree of automation. They are categorized based on the need for paper:
- Fully automated.
- Partially (with a hard copy).
- Automated predominantly in the vault.
Bitcoin and Ethereum blockchain
When Bitcoin came into existence in 2008, its distributed ledger was not intended to create and utilize Smart Contracts functionality. It was designed to read data on transactions received and sent. However, in the Bitcoin blockchain, it is possible to implement selective Smart Contracts that are based on simple logic functions:
- Escrow. In transactions, digital assets are first deposited with a 3rd party who monitors compliance with the terms of the transaction.
- Safekeeping. Blocking access to the account until a certain point.
- Multi-signature. A transaction requires confirmations from a number of predetermined participants.
- Pledge. In case of inactivity of the cryptocurrency wallet after a given period of time, funds are transferred to another address to “heirs”. Every time the account owner uses his vault, the time counter will become zeroed.
The creation of more complex smart contracts required developers to search for new solutions and create platforms of a different type. The first such project was Ethereum.
The main differences between Ethereum and Bitcoin blockchains are the Solidity programming language and transaction status. Ethereum perceives the transaction as a full-fledged part of the ecosystem, while Bitcoin – as an isolated element.
Another difference was the ability to develop a smart contract that would generate new tokens and the introduction of a common ERC-20 standard. This simplified the interaction between different platforms, wallets and services.
Applications
Smart contracts optimize and speed up many similar processes and reduce the need for third party (intermediaries) involvement. This reduces costs and eliminates human error. Smart Contracts technology is universal, its importance can hardly be overestimated, and its application areas are increasing daily. There are already quite a few industries using this feature where digital contracts are beneficial, which can be seen in real-life examples of smart contracts.
Healthcare
The healthcare industry utilizes a large amount of information that is constantly moving around: patient charts, prescribed medications, test requests and results, health insurance. This is only a small percentage of the data used in treating and examining patients. At the same time, some of the information is confidential. Creating a single database based on blockchain will automate the transfer and reconciliation of materials while maintaining anonymity.
Lending
Obtaining and disbursing loans is an area where smart contracts will bring significant benefits. Payment history, automatic loan repayment, fraud detection – these can be prescribed in blockchain code.
Smart contracts can also optimize the tracking of asset movement and monitoring of collateral statuses in mortgage lending. In banking, a lot of processes can be automated. By doing so, there is a chance to reduce overhead costs.
Banco Bilbao Vizcaya Argentaria (BBVA) is a bank headquartered in Spain that already uses smart contracts to issue loans.
Electoral process
Voting mechanism is one of the most discussed topics in elections, referendums. Studying this issue, analysts at Horizon State were confident that smart contracts based on a decentralized registry could become a tool for impartial registration of votes.
Media
For content producers in the fields of art and intellectual property (music, music videos, books and paintings), copyright and remuneration are important. Using smart contracts in the media industry can be used to credit payments and distribute funds between the author and the service that provides it.
IoT
The Internet of Things (IoT) is a promising and rapidly developing trend. It implies the unification of electronic devices and personal gadgets into a single system, which can be blockchain.
Rent
The whole algorithm of renting things, transportation or real estate consists of several simple and repetitive operations:
- Selecting a rental object.
- Making a deposit.
- Periodic payment for renewal (not always).
This can be written into the blockchain code, resulting in less overhead and big time savings.
Deliverables
Smart contracts are handy for combining supplier, consignee and carrier information into one database. This will avoid confusion if there are changes at any stage, a new link is added to the supply chain or the price of materials/finished products changes.
For example, S7 Airlines organized the process of refueling its aircraft through a digital contract with Gazpromneft-Aero. As a result, fuel supply planning and settlement have become automatic.
Clearing
This is a complex branching chain of non-cash settlements involving several entities (legal entities and individuals) with mutual obligations. In the process, a lot of time is spent on coordination, funds are spent on commissions for money transfer. The document flow is very large and complex, which leads to errors.
Blockchain technology will make it possible to carry out all calculations automatically and record the results in a distributed register, which is available for audit to all participants in the process.
Analysts at Santander InnoVentures investment fund have calculated that the global introduction of smart contracts could reduce overhead costs in the banking sector by 15-20 billion dollars as early as 2022.
Gambling
The use of smart contracts in gambling increases audience trust. Since all the conditions of betting in online casinos or lotteries are prescribed in the blockchain code, the risk of fraud is eliminated. Determination of winners, calculation and payment of winnings is automatic.
As an example, you can consider the gambling platform Xether, in which it is enough to have etherium for betting to participate in the game. Registration is not required.
ICO
Launching an initial coin offering for a new cryptocurrency is the most successful example of using digital contracts. Even at the stage of development of a smart contract, you can immediately prescribe in the code linear conditions that the application will follow:
- Capture all investors.
- Accrue the right amount of tokens.
- Control the legitimacy of transactions.
Creating Smart Contracts
Anyone can develop and implement the Smart Contracts feature. But this applies to simple variants, where ready-made templates are used. If something more complex or oriented for a non-standard task is needed, then knowledge of the program language and an understanding of the smart contract architecture will be required.
Advantages and disadvantages
Digital contract technology is at the very beginning of its development. But despite its great potential, its implementation in everyday life is relatively slow. The table summarizes the different views on such protocols.
Pros | Pros |
---|---|
The role of intermediaries is leveled. | People are distrustful of the new technology. |
Information about the terms of the contract and their observance is stored in a distributed form. In simple terms, this increases the level of security. | Uncertain legal status. |
Automation of processes reduces the time to comply with the terms of the contract. | Settlements are made in cryptocurrency, which will not always be acceptable to the participants of the transaction. |
Transparency. At any time, each of the participants in the transaction can audit and verify compliance with the terms. | It is necessary to have a more developed oracle system. This requires improving the quality of external sources of information. |
With Smart Contracts, new business models and financial services are emerging. | There is a high risk of making mistakes when translating legal regulations into program code. |
The future of such technologies
Most of the obstacles to widespread, widespread adoption of smart contracts have a legal basis. But given the potential of blockchain technology, the legal issues will be resolved very soon.
Popularization, a detailed description of the structure of smart contracts, and the benefits that come with their use will overcome people’s mistrust. Already now such contracts can replace most of the document flow in management and finance.
Frequently asked questions
❓ What platforms other than Etherium are used to develop smart contracts?
Depending on your goals, you can use Tron, Lisk, Cardano, Hyperledger Fabric, Nem, Stellar, NEO, Ontology, Cardano services.
🔧 Can Smart Contracts technology be hacked?
Yes, but very difficult. The digital contract is written in the blockchain, so it is resistant to hacking attacks.
📝 What programming languages are used to develop decentralized applications?
Common ones include JavaScript, Solidity, Fe, Rust, Vyper, Script, Serpent.
📗 If cryptocurrencies are sold using a smart agreement, will it protect against fraud?
Yes. When the terms of the transaction are spelled out correctly, fraud is eliminated.
📌 If all parties to a working smart contract want to change some of the terms, can this be done with a multi-signature?
Yes, only if such logic has been spelled out in advance.
An error in the text? Highlight it with your mouse and press Ctrl + Enter.
Author: Saifedean Ammous, an expert in cryptocurrency economics.