11. What is a Smart Contract?

riddo
Ceta Network
Published in
5 min readMay 31, 2018

After being the technology responsible for delivering to us the cryptocurrency market, Blockchain is also being used within the Fintech, logistics, education and online security sector, along with to the creation of Smart Contracts, among other use cases.

A Smart Contract is a programmable code tool (scripts) that is stored in a blockchain network and that is capable of being executed and enforced by itself, autonomously and automatically, without intermediaries or mediators. The authorship of the smart contract concept is usually attributed to Nick Szabo, who in 1994 started talking about his applications. The idea was suspended in time until the encryption protocols and blockchain technology put on the table the necessary infrastructure to start it up.

It is a technology that allows one or more contractual terms to be performed between several agents that respond to a Boolean logic (“if this, then this”).

Which basically means, is that it’s main objective is to translate into logical formulas what was agreed between the parties. For example: If A receives the quantity X of B, then B acquires the ownership of good Y, which until then was A. Any contract that includes any condition (and everyone has it) is susceptible to being codified. They could be made in any transaction that requires a registered agreement between parties, such as the contracting of financial products or insurance, guaranteed deposits, purchase or sale operations of financial instruments …

Smart Contracts are stored in a specific address in the block chain. This address is determined when the contracts are compiled and sent to the block chain. When an event occurs in the contract, a transaction is sent to that address and the distributed virtual machine executes the operation codes of the script using the data sent with said transaction.

A smart contract is valid, without depending on authorities, due to its nature: it is a code visible by all and cannot be changed by existing on the blockchain technology, which gives it a decentralized, immutable and transparent nature.

Oracles

Smart contracts could also depend on things that happen outside the blockchain, but for that to happen, the contract must define certain reliable data sources known as “Oracles”.

The oracles are computer tools that allow validating the conditions provided in the smart contracts. They usually refer to external information to decide whether a clause of the contract has happened or not. In this way, once the oracle obtains the information and contrasts it, the contract is executed and the transaction occurs.

For example, a smart contract could work as an accident insurance:

• To be part of the contract you must deposit 5 Ethers to the address of the contract and inform the address Ether of your Mrs.

• The code says that if the oracle informs us that you have had an accident, 500 Ethers will be paid to your wife.

• The oracle is a computer that is continually looking at the relationship of accidents on the newspaper’s website. When he sees your name there, he notifies the contract and the contract executes the deposit to your lady.

A huge potential

- Business

Too often, supply chains are hampered by paper-based systems, where forms have to pass through numerous channels for approval, increasing exposure to losses and fraud.

The Blockchain overrides this by providing a secure and accessible digital version for all parts of the chain and automates tasks and payment.

- Government

Intelligent contracts would alleviate all concerns by providing an infinitely safer system that would require, in general, less deployment. In addition, smart contracts could increase low turnout. Much of the inertia comes from a clumsy system where we have to stand in line, show the DNI, wait to be taped and put a paper in an urn.

- Administration

The Blockchain not only provides a ledger as a trusted source, but also reduces potential communication and workflow problems due to its accuracy, transparency and automated system. A blockchain ledger would streamline the entire administration process

- Vehicles

An example is autonomous vehicles or automatic parking, where smart contracts could put into play a kind of ‘oracle’ that could detect who was at fault in a crash; the sensor or the controller, as well as innumerable other variables. When using smart contracts, an auto insurance company may charge fees differently depending on where and under what conditions customers are operating their vehicles.

- Health care

Personal health records could be encoded and stored in Blockchain with a private key that would grant access only to specific individuals. the contracts would provide transfers and access to medical records after the approval of multiple signatures between patients and providers.

Facilitate Access to health data of the population by granting health research organizations access to certain personal health information. In exchange, through contracts, micropayments are automatically made to the patient for participation.

Characteristics

- Autonomy: Thanks to its algorithm these contracts can perform calculations, save information and send transactions to other accounts.

- Confidence: Your documents will be encrypted in a digital financial book, where only the parties involved can enter.

- Backup: The documents will be duplicated within the different blocks of the chain where they can never be deleted.

- Savings: Save time thanks to your automation, and save money by eliminating the presence of intermediary lawyers.

- Accuracy: Smart Contracts only execute the code that is provided to them, ensuring that mistakes are not made.

- Security: They are much safer than traditional contracts.

What does a Smart Contract look like?

The contracts can be encoded in any Blockchain, but mainly Ethereum is used as it provides unlimited processing capacity.

An example of Smart Contract in Ethereum.

Protocols and platforms for smart contracts or smart Contracts

The technical development of intelligent contracts is very incipient. However, there are already several protocols and platforms that are working so that they become an everyday reality, under a greater or lesser level of development. Next, we list protocols or platforms that can be used to create smart contracts:

- BitHalo and BlackHalo

- Codius

- Counterparty

- Ethereum

- RootStock

Despite all the comments, although blockchain is still at an early stage of development, we can safely say that the potential it offers us will allow us to introduce changes in the way of “exchanging value” through digital channels . If we combine the principles of a smart contract with the creativity of many developers on the planet, the result is never-before-seen possibilities, accessible to all and at costs bordering on gratuity.

Thus, in the same way that the internet brought us the exchange of information in an agile and simple way, this technology will introduce a new way of exchanging value between businesses, institutions and individuals since, as we have seen previously throughout the article, its uses area will expand to practically all areas of daily life.

--

--

riddo
Ceta Network

Spanish CM Elastos https://t.me/ElastosSpa // Business Development Manager @ Ceta Network