BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Popular Science Corner 08 | The Outstanding Work of Ethereum: Smart Contract

欧易情报局
特邀专栏作者
This article is about 1794 words, reading the full article takes about 3 minutes
How does Ethereum's smart contract work and what does it do.
AI Summary
How does Ethereum's smart contract work and what does it do.

We said that the biggest feature of Ethereum is the introduction of the concept of "smart contract". Then, in this issue, we will start with its most important concept of "smart contract" and talk about how it works, and how it works. what effect.

In a nutshell, smart contracts have two main functions: one is to process transactions more conveniently, and the other is to develop Dapps (that is, blockchain applications) more flexibly. Next, we will explain to you one by one.

1. Smart contracts can process transactions more conveniently

Let's talk about how smart contracts can make transactions more conveniently. Here we need to understand two concepts: Ethereum virtual machine and Ethereum account:

(1) Ethereum Virtual Machine

"Virtual machine" is a term in the computer field, which can be understood as a virtual environment in which operations can be performed at will without affecting computer performance.

Ethereum is essentially a virtual machine, except that it is a peer-to-peer, decentralized virtual machine (English abbreviation EVM). Like all blockchain technologies, nodes all over the world will run software on their own computers. This "world-class computer" containing nodes all over the world is called the Ethereum Virtual Machine (EVM).

We can understand the Ethereum virtual machine as a system that is used to create a running environment for Ethereum smart contracts.

(2) Ethereum account

Ethereum has set up two kinds of accounts: one is a normal account (English abbreviation is EOA) that we can operate; the other is called "smart account".

1. Normal account

"Normal account" (that is, EOA account) only has the current amount of Ethereum money in it, which is controlled by our private key and can initiate transfer transactions.

When transferring Ethereum from the Ethereum "normal account", the transfer method is similar to Bitcoin:

I transferred 3 Ethereum from my account to Yiyi's account. This transfer uses a normal account. You need to enter Yiyi's wallet address and the transfer amount, which is very similar to Bitcoin transfer, so I won't say much.

2. Smart Account

In the "smart account", there are not only the amount of Ethereum money, but also the program code. The execution of the code is triggered by the transaction. Whenever a corresponding message is received, the code will be executed. This smart account is the carrier of the smart contract .

When transferring Ethereum from the Ethereum "smart account", virtual machines and smart contracts are involved. Here is an example:

I decided to transfer 3 Ethereum to Yiyi on the day of salary payment, which means that we have reached an agreement. Then when I pay salary, the virtual machine will run a specific code, and 3 Ethereum will be automatically transferred from my smart phone. Transferred 3 Ethereum from the account to Yiyi.

2. Smart contracts can develop Dapp (blockchain application) more flexibly

Above we introduced how smart contracts can make transactions more conveniently. Next, let’s talk about another major function of smart contracts: it allows us to develop Dapps (that is, blockchain applications) more flexibly.

Bitcoin is a monetary system, while Ethereum aims to be a platform. The Ethereum system is somewhat similar to our current Android and Apple systems. Developers can freely develop various applications on the system:

Ethereum is designed as a flexible system that can be modified according to requirements. It allows users to create their own operations that meet their own needs. In this way, the Ethereum system can serve various decentralized blockchain applications. , not just limited to digital currencies.

The core of Ethereum lies in "Ethereum Virtual Machine (EVM), the concept we mentioned above, this virtual machine can execute complex codes with arbitrary algorithms. In computer terms: Ethereum is "Turing complete" , developers can use existing programming languages ​​(such as "Java, Python") to create contracts and various decentralized applications on the Ethereum Virtual Machine.

Smart contracts make Ethereum "decentralized applications" have unlimited imagination and stronger vitality. Smart contracts can handle various business logics to make full use of the capabilities of the Ethereum blockchain, making the blockchain more scalable, and making Ethereum the largest blockchain development platform at present. We can use smart contracts in various scenarios, such as financial derivatives, insurance, real estate, legal processes, etc.

This is also an important measure for us to call Ethereum the "Blockchain 2.0 Era", because it breaks away from the function of Bitcoin as a digital currency, and applies the blockchain technology to more fields.

3. Ethereum and Ethereum (ETH)

The Ethereum system also involves coins. Ethereum (English code ETH) is a cryptocurrency generated by the Ethereum network, and it can also be called "Ethereum". In the smart contract system of Ethereum, Ethereum plays an important role: most of the current ICO projects are based on applications developed on Ethereum, and developers need to pay Ethereum to run projects on Ethereum.

As a development platform for blockchain applications, Ethereum has attracted a large number of developers and ordinary users to participate in the platform and use the platform for application development and transactions. Therefore, the participation of users in the Ethereum network is more active, and the demand for Ethereum Continued growth. Of course, the plunge of Ethereum also has a lot to do with the massive cash-out of these projects.

To sum up, in this issue, we mainly introduced the biggest feature of Ethereum: smart contracts, and several terms related to smart contracts: Ethereum Virtual Machine, smart accounts. To sum up, the Ethereum virtual machine is used to execute smart contracts, and smart accounts are the carriers on which smart contracts can be executed.

ETH
Welcome to Join Odaily Official Community