Day 4. Overview of Ethereum

Ethereum, apart from offering digital currency transfer functionality, also possesses a platform for executing applications. It is expected to play a significant role in various industries and domains, shaping the future of the digital economy. This guide explains the overview of Ethereum.

TOC

Smart Contracts

Ethereum is a blockchain that functions not only for digital currency transfers, like Bitcoin, but also as a platform for executing applications. This platform, known as the Ethereum Virtual Machine (EVM), provides more advanced functions compared to Bitcoin’s network, which serves as a simple distributed ledger. Specifically, the execution of programs called smart contracts is possible on this platform, enabling the development and service provision of distributed applications (dApps).

Smart contracts are programs that codify the terms of agreements or transactions and the actions to be executed when these terms are met. By being programmed and deployed on the Ethereum network, they can be executed automatically. Unlike traditional contracts and transactions that involve human processing and judgment, smart contracts offer precision.

Solidity (programming language)

The aforementioned smart contracts are written in a language called Solidity (also the main theme of this tutorial). Solidity is a language specialized for developing smart contracts, providing a toolkit for writing code to be executed on the EVM. It has the following characteristics:

  • Static Typing: Solidity is a statically typed language, meaning it requires explicit declaration of variable and function data types. This enhances the safety and accuracy of the code.
  • Object-Oriented: Development in Solidity is done in units called contracts, akin to classes in typical object-oriented languages. Contracts can contain variables and functions and support functionalities like inheritance and polymorphism (details to be covered in later guides).
  • Events and Messaging: Contracts can define events, which are useful for sending notifications to frontend applications, among other uses. Moreover, contracts can utilize messaging functionality to send data to other contracts.

While some specialized terminology is used, it is hoped that understanding will gradually deepen as you proceed through the chapters on the Solidity language.

Ethereum Currency (Ether)

Ethereum also functions as a cryptocurrency and is expressed in three units: Ether (ETH), Gwei, and Wei, in descending order of size. The relationship between these three units is as follows:

1 ETH = 1,000,000,000 Gwei (10^9) = 1,000,000,000,000,000,000 Wei (10^18)

These figures can be very large and may be difficult to grasp intuitively. In such cases, converters that calculate and display values in each unit can be useful.

Reference: Ethereum Unit Converter

Ethereum Network

The Ethereum network consists of the Mainnet, the primary production network, and the Testnet, which is used for development and testing purposes. Furthermore, when developing with web3 frameworks such as Hardhat, a virtual network is created on your local host (your own computer).

There are multiple testnets, each with its own name. As of June 2023, the main testnets in use are the Goerli and Sepolia networks (previously used networks like Ropsten, Rinkeby, and Kovan are now deprecated and will be phased out).

The typical development workflow involves developing and testing locally, deploying and testing on the testnet, and then deploying on the Mainnet if everything is in order.

Representative Token Standards

ERC (Ethereum Request for Comments) is a set of standards proposed to standardize tokens and smart contracts on Ethereum. ERC standards are used to ensure interoperability and compatibility on the Ethereum network, helping developers create applications more effectively. Below are some of the prominent ERC standards and their summaries:

ERC-20 (and ERC-677)

ERC-20 is the most commonly used token standard on Ethereum, standardizing fungible tokens. ERC-20 tokens can be issued, transferred, and exchanged on the Ethereum network. The standard defines basic token functionalities like balance checking, token sending and receiving, and transaction event notifications. ERC-677 and 777 are extensions of ERC-20, maintaining backward compatibility while adding extended functionalities.

ERC-721

ERC-721 standardizes non-fungible tokens (NFTs). With ERC-721, tokens with unique identifiers (token IDs) can be created, allowing each token to be unique with different values and characteristics. ERC-721 is widely used to represent individual ownership of digital art, game items, virtual real estate, and more.

Fungibility vs. Non-Fungibility
To simplify, fungibility is like currency (a 10,000 yen note from John has the same value as a 10,000 yen note from Emily), whereas non-fungibility is like paintings (a hand-drawn painting by Michael and another by David may sell for the same price, but each has unique characteristics making them one-of-a-kind).

ERC-1155

ERC-1155 is a standard for managing multiple tokens within a single smart contract. It allows for the creation and efficient management of different token types (either fungible or non-fungible) within the same contract. This standard is used for efficient handling of multiple assets, such as in-game items or token management in multi-chain environments.

Let's share this post !

Author of this article

After joining IBM in 2004, the author gained extensive experience in developing and maintaining distributed systems, primarily web-based, as an engineer and PM. Later, he founded his own company, designing and developing mobile applications and backend services. He is currently leading a Tech team at a venture company specializing in robo-advisory.

Comments

To comment

CAPTCHA


TOC