How work Ethereum Smart Contracts

Like many ideas in the blockchain industry , there is confusion among consumers about what is called “smart contracts”. This is a new technology that has become a reality thanks to public blockchain networks. Smart contracts are difficult to understand because the term partially confuses the core interaction it actually describes.

While a standard contract outlines the terms of a connection, usually one that can be legally enforced, a smart contract requires a connection to a cryptographic code. Put another way, smart contracts are programs that perform exactly as they were set up by their creators.

The smart contract was first conceived in 1993. The idea was originally described by computer scientist and cryptographer Nick Sabo as a kind of digital vending machine. In the popular example, it shows how users can enter data or value by receiving a final item from a machine, in this case food or a soft drink. On the Ethereum network, cryptocurrency users can send 10 ethers to a friend on a given date using a smart contract. In this case, a contract is created, including the data in it, so that the desired command can be executed.

Ethereum is a platform that is built specifically to create smart contracts.

But these new tools are not intended to be used in isolated cases. They are also believed to be able to build blocks for “decentralized applications” and even entire decentralized autonomous companies.

How smart contracts work

It is worth noting that the Bitcoin network was the first to support smart contracts in the sense that it could transfer value from one person to another. The node network only validates transactions if certain conditions are met.

But Bitcoin contracts are limited to dealing with cryptocurrency. In contrast, Ethereum replaces the more restrictive BTC programming language, replacing it with one that allows developers to write their own programs.

Ethereum allows developers to program their own smart contracts or “standalone agents,” as the Ethereum White Paper calls them. The language is called Turing-complete, which means that it supports a wider range of computational instructions.

Smart contracts can:

  • They function as “multi-signature” accounts, so that the funds are spent only when the required percentage of users agree.
  • Manage agreements between users when one buys insurance from the other, for example.
  • Provide utility for other contracts, similar to the work of a software library.
  • Store application information, such as domain registration information or membership records.

The power in numbers

Extrapolating this last point, smart contracts will probably need the help of other smart contracts. When one makes a simple bet on the temperature on a hot summer day, it may cause a series of contracts to occur.

One contract would use external timing data and another contract could settle the bet based on the information received from the first contract when the conditions are met. The performance of each contract requires the payment of ether transaction fees, which depend on the required processing power.

As explained in our What is Ethereum guide , Ethereum executes a smart contract code when a user or other contract sends a message containing sufficient transaction fees.

The Ethereum virtual machine then executes smart contracts in byte code or a series of units and zeros that can be read and interpreted by the network.