It was first spoken by Nick Szabo in 1993, where he introduced the concept of DIGITAL DISTRIBUTOR.
The computer engineer gave an example:
“If a user enters data or values, they receive compensation from the machine such as inserting a dollar and getting a sandwich in the real world.”
With this example Nick Szabo introduced the smart contract which would then be born with Ethereum.
How smart contract works
Smart contract is a computer protocol that executes a command in the blockchain without third parties.
Within the smart contract we find the information that multiple users interact with each other to exchange certain information.
This information is composed of data and contains for example a payment transfer information, or an action using a Dapps, etc.
For example a smart contract could be a Cat of the DApps Cryptokitties or an object using in Decentraland.
Every smart contract must be executed in the blockchain otherwise it cannot work.
In addition, each user who performs the function remains anonymous but a code identifying him appears in the name of his name.
It also works as a multi-signature account, which is executed after a certain number of consents.
In short, we can say that a smart contract is:
- Works without third parties;
- Manages agreements between users;
- It can be multi-signature;
- It can contain any type of information;
- Archive information on an application such as a Dapps;
- It runs on the blockchain.
Smart contract on blockchains
On the Ethereum blockchain, the smart contract uses a “Tuning-Complete” language, ie it supports multiple calculation instructions.
In fact, reading Ethereum’s White Piper, it is defined as “Autonomous Agents.“
Everyone, on the Ethereum blockchain but also on others, can build a smart contract using the tool that each platform makes available.
And each of them have their own protocol that must be respected in order to function independently.
For example on Ethereum we have the ERC-20 protocol on Tron the ERC-10 protocol, in Eos the Eos21 and so on.
The operation of the smart contract must be confirmed by the network, in addition the user must pay a commission to the network in order to execute it.
Payment takes place either in the form of a Token, for example in Ethereum, in Ethere, or by using the resources allocated for example in Eos, the Ram is used.
Then there are other types of smart contracts that, like those used in the Steem blockchain, called Smart Media Tokens, use voting functions between websites or social networks and contain information such as video content.
La costruzione di Smart contract
In ogni blockchain si può costruire uno smart contract personalizzato che può fungere da Dapps oppure si potrebbe creare un Token.
In rete esistono diverse guide che parlano della creazione di smart contract in elenco ne metto alcuni sulle varie piattaforme.
La programmazione dei contratti deve avvenire con linguaggi come C++, Solidity, linux, che sono quelli più utilizzati.
Inoltre sulle varie piattaforme si ha la possibilità di trasferire un smart contact scritto in questi linguaggi tra una blockchain ad un’altra.
Un esempio è quello che ha fatto Tron passando dalla rete di Ethereum alla rete propria Tron.
The smart contract function is becoming very important to date.
With the birth of the Blockchain, the function of these contracts becomes important because there is an automation in the transactions.
We think of a network of payments that processes billions of data per second, a normal network would take longer to maintain this pace, but with the smart contract we would have a much faster and more precise processing.
Furthermore, this technology consumes little space compared to normal calculation databases, proving to be lighter and less expensive.
It is finding many fields of application, as it is proving to be an excellent technology.