A Beginner's Guide to Smart Contracts: Where is the "Smart" and Where is the "Contract"?

share
A Beginner

For beginners who are still exploring blockchain, the term "smart contract" is definitely not unfamiliar. Literally, it means "intelligent contract form." However, it is not as simple as you might imagine, but it's not that difficult either. Just keep reading.

Table of Contents

Foreword

In fact, the concept of smart contracts was proposed as early as 1997 by technology expert Nick Szabo, who referred to it as the "God Protocol". In his notes, he wrote:

This is a perfect protocol controlled by a trusted third party, just as God is present among all beings. Everyone will submit records to God, and God will calculate and return the results. God has discretionary power, and no one can see the content of others.

In simple terms, it eliminates the position of intermediaries and uses a "trustless" third party to collect, process, and transmit information. You may wonder why smart contracts have only been widely discussed and used recently after so long.

Concept of Smart Contracts

The concept of smart contracts is quite simple. It is like an automated program where if you input X, the smart contract will produce Y based on the preset conditions. To illustrate, it's similar to a vending machine: you input X=insert $10 + press for milk tea, Y=the vending machine automatically dispenses milk tea.

The reason why it has taken until now to be gradually adopted is that the earlier example was just a vending machine. Initially, Nick Szabo's idea was to create software that could automate the transfer of value among individuals, but there was no platform suitable for hosting this software at the time, much like needing a "super huge vending machine".

Subsequently, the concept from Satoshi Nakamoto's whitepaper gave birth to blockchain! In 2013, a 13-year-old genius named Vitalik Buterin proposed a new generation blockchain, known as Ethereum, as a platform for smart contracts. Anyone can use smart contracts on Ethereum, and this giant vending machine is a decentralized platform composed of a consensus mechanism by everyone.

At this point, you may not fully grasp the importance of blockchain to smart contracts. Let's briefly introduce a few points:

  1. "Tamper-proof": Smart contracts deployed on the blockchain are not at risk of alteration, maintaining the fairness of the contract.
  2. "Transparency": Data on the chain is public, allowing contract participants to review the code for any issues.
  3. "Automation": In blockchain, it is run by miners, and the execution of contracts is generally absolute.
  4. "Decentralization": This is the concept derived from blockchain that allows smart contracts to achieve trustlessness without external forces.

Applications of Smart Contracts

Smart contracts are currently utilized in a wide range of fields such as financial loans, management systems, banking systems, insurance, real estate, IoT, and even in games. Imagine playing a gambling game and occasionally suspecting that the gaming company is cheating to make money. With the support of transparency, this problem is easily resolved.

Moreover, it is not only decentralized institutions that can use smart contracts. Centralized entities like banks and e-commerce companies can also use them to streamline complex processes. Furthermore, incorporating blockchain elements allows for integration across systems, where data is stored on the blockchain and processes run through smart contracts. For example: borrowing money from a bank, data = your account balance; smart contract = bank review, transfer.

Challenges Faced

Various smart contracts can be applied from simple to complex scenarios, as shown in the diagram below:

However, as mentioned earlier, once the contract code is set, it cannot be changed. So, what happens if the initial input X was incorrect? For instance, if the price of a milk tea changes to $5, what should be done?

Here, we must mention the concept of "Oracle". If blockchain is an island where data on it cannot interact with real-world data, then smart contracts are the highways to the island, and Oracle serves as the interchange connecting the highway, allowing cars on the surface roads to pass through.

In conclusion, smart contracts ultimately originate from humans and require manual input. Unless one day AI replaces humans (hopefully not), the issue of avoiding errors in input X is still being addressed. There are related projects working on this, such as ChainLink. Stay tuned for more updates.

Further Reading

  • 【Newbie's Guide】Quickly Understand What Forks Are, Splitting into Soft Fork vs. Hard Fork?
  • Understanding the Lightning Network in Three Minutes!

Join now to get the most comprehensive information on fintech, blockchain insights, and industry examples!