Our mission is to provide accurate technology knowledge to individuals worldwide, and our website is not monetized.

What is a Smart Contract? Explains how it works and its relationship to Ethereum (ETH)

Smart contracts” are a typical feature of Ethereum (ETH).
Many of you have probably heard of it, but don’t know what it actually does.

In this article, we will focus on smart contracts, which are attracting a great deal of attention in various industries such as finance, real estate, gaming, and public institutions, and introduce their mechanisms and examples of use.

TOC

What is a smart contract?

A smart contract is a mechanism that automatically executes contracts without human intervention.

It is a computer protocol proposed in 1994 by a jurist/cryptographer named Nick Szabo and developed and offered by Vitalik Buterin, the inventor of Ethereum, using blockchain technology.

Smart contracts allow for pre-programming of contracts and their execution terms.

Ethereum, like Bitcoin (BTC), uses blockchain technology, but its greatest feature is this smart contract functionality.

Advantages of Smart Contracts

Since blockchain technology is used in ethereum’s smart contracts, it is possible to fulfill two conditions: the contents of the contract cannot be tampered with, and the contract is executed automatically without the intervention of a central administrator.

Thus, the greatest advantage of smart contracts is that they can automate the contracting process without the need for a third party, thereby shortening the transaction period and reducing labor costs.

The use of these smart contracts eliminates the need for the installation of excessively costly servers that were previously required for similar transactions. This has led to various demands from the financial industry, the real estate industry, and public institutions such as government offices.

In the case of banks, it is said that the reduction in servers can reduce costs by as much as $20 billion per year. For these reasons, Ethereum, with its smart contract functionality, is gaining tremendous support from all quarters.

Relationship between Smart Contracts and Gas

Gas , simply put, is the fee required to use Ethereum.

Most crypto assets, including Bitcoin, require a fee to be paid to the “miner,” or the person who did the work of approving the transaction, when the money is transferred.

In the case of Ethereum, in addition to this transfer fee, a fee is also required to execute a smart contract. These fees for Ethereum transactions are collectively referred to as Gas.

Two types of fees (Gas) of Ethereum

  1. Fees for money transfers
  2. Fees required to execute smart contracts.

Gas is converted to ETH (Ethereum), and miners are paid in ETH.

To properly understand Gas, you also need to know the two terms Gas Price and Gas Limit. Let’s take a look at each of them in turn.

Gas Price

Gas Price refers to the price per Gas, usually in units of “gwei”, which is the unit used to express the quantity of Ether, the token of Ethereum.

In addition to gwei, there are many other units of Ether.

スクロールできます
UnitsEther
wei (minimum)0.0000000000000000000001ether
kwei (smallest)0.00000000000000000000001ether
mwei0.000000000000000001ether
gwei0.0000000000001ether
szabo0.000001ether
finney0.001ether
ether (ETH)1ether
kether1000ether
mether1000000ether
1000000000ether1000000000ether
tether (max)1000000000000ether



In principle, the Gas Price can be set freely by the user; changing the Gas Price setting determines the amount of commission to be paid.

In general, miners tend to prioritize mining transactions with higher rewards. Therefore, a higher Gas Price usually results in a faster transaction, while a lower Gas Price results in a longer transaction time. When Ethereum remittances are jammed, be aware that if the Gas Price is set too low, the transaction may not be completed for any length of time.

Note that the average Gas Price as of October 30, 2020 is 85 gwei (= 0.000000085 ETH).
Reference: Etherscan

Gas Limit

Gas Limit is the maximum amount of commission (Gas) that a user can pay for a transaction.

For example, if the Gas Limit for a transaction is set at 5,000 Gas, the transaction will not be executed if the amount exceeds 5,000 Gas at the time of execution, and if the amount is less than 5,000 Gas, the remaining amount will be returned to the user.

The maximum fee (Gas) for a money transfer or smart contract can be calculated using the Gas Price and Gas Limit.

Maximum value of Gas (ETH) = Gas Price × Gas Limit × 0.000000001

If the Gas Price is set at 85gwei and the Gas Limit is set at 5,000 Gas, the maximum amount of commission (Gas) would be as follows.

85gwei × 5,000Gas × 0.000000001 = 0.000425 (ETH)

Calculating Gas is quite complicated, but if you always set the Gas Price and Gas Limit about the same, you can keep track of the approximate fee without having to calculate it every time.

Major Examples of Smart Contracts

Smart contracts, which automatically execute contracts without human intervention, are used in a variety of services due to their convenience.

Here are three major examples of smart contracts in use.

1. DeFi (decentralized finance)

DeFi (DeFi ), which boomed in the crypto asset industry in 2020, uses smart contract functionality.

DeFi ( Decentralized Finance ) is a generic term for financial services and ecosystems built on the blockchain.

More specifically, DeFi (Decentralized Finance) can be defined as “a system of financial services, such as banks, securities, and crypto asset exchanges, that are provided using blockchain.

DeFi uses smart contracts to allow these financial services to be transacted directly between parties without intermediaries.

2.CryptoKitties

This blockchain game allows players to raise and breed fictional cats called CryptoKitties. Owned cats can be bought and sold among users using crypto assets and other assets.

The buying and selling of CryptoKitties uses the smart contract functionality. This allows users to transact directly and securely with each other.

3. Etherisc (Etherisk)

Etherisc is a decentralized insurance platform that utilizes smart contracts.

Because it uses smart contracts, Etherisc can automatically determine whether insurance claims can be paid or not and execute the payment. Automating the claims payment process reduces labor costs and allows users to take advantage of the service at a reduced fee.

Currently, Flight Delay Insurance is offered to compensate for flight delays.

In this way, smart contracts are currently being put to practical use in a variety of fields.

Smart contracts are a representative feature of Ethereum. As smart contracts become more popular in various industries, the demand for Ethereum is expected to grow.

Summary

We have explained the functions of smart contracts, examples of their use, and an overview of Gas (fees).

Smart contracts, which automatically execute contracts without human intervention, have a number of advantages, such as reducing labor costs and improving work efficiency.

In addition, due to their convenience, smart contracts are expected to be further put to practical use in a variety of industries, including finance, real estate, gaming, and public institutions.

As mentioned earlier, smart contracts are a typical feature of Ethereum. Therefore, it is highly likely that demand for Ethereum will grow as smart contracts become more widespread.

Let's share this post !
  • Copied the URL !
  • Copied the URL !
TOC