What Are the Smart Contracts and How They Work
17th September 2020
In 1996, long before the Bitcoin and Ethereum appeared, the American cryptographer and programmer Nick Szabo described the principle of smart contracts. He said that it is a program that used mathematical algorithms to perform operations. The algorithm was supposed to carry out the transaction only after all the terms of the contract, on both sides, were fulfilled.
For 17 years it was just a concept, until, in 2013, the founder of Bitcoin Magazine, Vitaly Buterin, developed the idea of a Blockchain network that would embody the full potential of smart contracts. On July 30, 2015, the network was launched and the crypto community was able to use smart contracts for a variety of purposes.
What Is a Smart Contract and How Does It Work
A smart contract is an algorithm that works according to the principle: if "X", then "Y". i.e:
- If "the performer handed over the work", then "the system automatically transfers him the reserved amount."
- If "the contractor did NOT hand over the work", then "the reserved amount will be returned to the customer's account."
This is the simplest example to demonstrate how smart contracts work. This technology allows us to exchange everything: money, goods, real estate, securities, and other assets. Let's look at examples of the practical implementation of smart contracts.
The Simplest Examples
An Escrow service on the Aliexpress trading platform can be considered a smart contract. When the buyer pays for the goods, the amount of the order is debited from his account, but the seller's account is credited only after the goods are delivered and the buyer confirms that everything is in order.
Another example is an automatic account top-up or utility service payments. Some bank applications provide this opportunity. Users specify the payment time and value and the system automatically settles the payment.
Smart contracts allow omitting realtors, thereby providing savings on commissions. The deposit and the monthly payment amount is put into the contract. In this case, the deposit is booked, and payments are immediately credited to the account of the lessor.
When the lessor makes the first payment, he gets the placement key. If the is no monthly payment, the electronic door lock will be blocked, and the deposit will be transferred to the lessor account.
Moving on to the blockchain. Smart contracts are the most convenient way to conduct ICOs for new crypto startups. The principle is simple:
- The investor reserves the amount of money.
- The startup issues tokens.
- The investor receives several tokens equivalent to the investment amount.
- The funds are credited to the startup account.
- If the startup does not issue, the funds are returned to the investor.
Everything is in the auto mode. Neither the startup nor the investor is involved in the value exchange. Everyone creates their own (money, tokens), and the smart contract does the rest.
Benefits of Using Smart Contracts
Execution speed. The use of smart contracts eliminates the basic bureaucracy problem. All processes take place instantly and automatically. Users only have to confirm the execution.
Saving. The absence of necessity to use the intermediaries' services allows us to save on commissions from real estate to the securities placement on the stock exchange.
Safety. The fact that the main part of the transaction is carried out by the algorithm significantly reduces the possibility of encountering fraud.