Smart contracts - are a kind of algorithm, or program that runs on Everscale or other blockchains, like Ethereum, which was the first to come up with the idea of smart contracts. They work in accordance to a prescribed set of rules that are programmed by developers. When all conditions prescribed in the contract are met, the contract is executed.
For instance, let's examine the case of digital asset swaps. These kinds of transactions are by default anonymous and do not require an intermediary so as to complete them. For this to happen, we require smart contracts, which include all necessary information: currency A and B, amount, sender address, receiver address, and so on. In this case, only when all conditions set in the respective contract are met, is the transaction completed.
Smart contracts use cases.
Smart contracts are the building blocks necessary to ensure the functioning of decentralized projects (DeFi, DApps, etc.), due to the fact that they eliminate the need for intermediaries. They are used to ensure that the stipulated set of conditions is followed in the correct algorithmic sequence.
The algorithm itself is written inside the blockchain, so the rules for transactions are mandatory for all participants and manipulations are not possible.
How smart contracts actually work.
Smart contracts are programmed in blockchains (in our case Everscale) and, respectively, work within the network. They perform the same functions as traditional contracts written on paper. The difference is that they are not written on paper, but with the use of mathematical algorithms and programming languages. This makes them secure, efficient, cheaper, and much faster, considering the fact that the intermediary is no longer needed.
As in a paper contract, the conditions that were set in the contract are subject to mandatory implementation. Therefore, only in this case will the transaction mentioned above (digital asset swap) be completed and participants in this transaction will receive what they were supposed to. It should be noted that after the correct execution of the transaction, the respective smart contract becomes part of the registry, getting into the blockchain. To add, it can be viewed by anyone with access to the internet.
The basic principle of a smart contract is the complete execution of conditions set in the contract.
In order to start developing your own dApps please consult Getting started page which provides a complete step-by-step guide.