Smart contracts allow the exchange of funds or other assets without mediators. For a regular deal you need help from a notary or a lawyer. In the case of cryptocurrency transactions, a smart contract acts as a notary.
Smart contract is a pre-written algorithm with all the rights and obligations of the parties. Smart contracts not only store information about the rules for conducting transactions, but also automatically “monitor” the fulfillment of all conditions.
Smart contracts can be written in any blockchain, most often they are written on Ethereum, because it provides almost unlimited possibilities for creating and working with such contracts.
A smart contract is usually written to the blockchain, and the logic of the contract is stored in the block. Also, the block stores all messages related to this smart contract.
Mandatory attributes of a smart contract:
private decentralized environment (for example, Ethereum), in which all data of the smart contract is recorded and which supports the inputs and outputs for oracles (information providers); using electronic signature methods based on private and public keys; the subject of the contract and the necessary instruments for its execution; accurately described terms of the contract, confirmed by the signatures of the participants.
Smart contracts can be used not only in the field of cryptocurrencies, but also in other areas.
Pros:
Cons:
There are many platforms that support working with smart contracts and their creation. Let’s take a look at the most popular ones.
Ethereum. The most popular blockchain for working with smart contracts. Provides ample opportunities for writing contracts and working with them. You can create any contract by paying for the platform resources with ETH coins.
Bitcoin. The most popular blockchain is great for working with transactions, but the possibilities for smart contracts are limited.
NEM. This platform works directly with the blockchain code and, unlike Ethereum, is more scalable and can process up to 4000 transactions per second.
NXT. An open platform with ready-made smart contracts. You can use already written contracts, but you cannot write your own.