Popular Science: The key in DeFi: What is a smart contract

Nowadays, our lives are almost inseparable from contracts. To be bigger, work is to sign a labor contract with a company, to buy a house is to sign a house purchase contract with a real estate company, and to buy insurance is to sign an insurance contract with an insurance company; Takeaways, taxi rides, and lottery tickets are all contracts with related service providers. It can be said that the contract is used where there are people.

Even if we bet with others, it is a kind of contract, but if one party denies it, it will become difficult to fulfill the contract. If there is a kind of contract, the rules are determined in advance, and once the relevant clauses are triggered, the contract will be automatically executed without human intervention, and there is no need to worry about denial . Is there such a contract? Really, this is a smart contract.

1. What is a smart contract

Intelligent contract (Smart Contract) is a concept put forward in the 1990s by cryptographers Nick Szabo, because of the lack of credibility of the execution environment, intelligent application and development contracts have not been, until Ethernet Square appeared, only to be smart contract “resurrection”.

So what exactly is a smart contract? Simply put, a smart contract is a contract that uses computer language instead of legal language to record terms and is automatically executed by a program . In other words, a smart contract is a digital version of a traditional contract, which runs on the blockchain network and is automatically executed by the program.

Vending machines and ATM teller machines can be understood to some extent as machines that execute smart contracts, but these are not smart contracts in the true sense.

2. What are the characteristics of smart contracts?

Compared with traditional contracts, smart contracts have three major characteristics:

1. The content of the contract is open and transparent.
Smart contracts are deployed on the blockchain, and the content of the contract is naturally open and transparent.

2. The content of the contract cannot be tampered with.
Similarly, the content of the smart contract cannot be modified due to deployment on the blockchain.

3.
The smart contract that runs permanently on the blockchain is also jointly maintained by the network nodes on the blockchain. As long as the blockchain is present, the smart contract can run forever. There is a sense of brotherhood that “the chain is in the contract.”

Compared with traditional contracts, smart contracts with three major characteristics of blockchain have the following advantages:

1. To trust.

Since the smart contract is based on the blockchain, the content of the contract is open and transparent and cannot be tampered with. Code is law. Based on the trust in the code, traders can conduct transactions with peace of mind and security in an untrusted environment .

2. Economical and efficient

Compared with traditional contracts, disputes are often caused due to differences in the understanding of contract terms; smart contracts can avoid differences through calculation language and hardly cause disputes, and the cost of reaching a consensus is very low. On the smart contract, the result of the arbitration comes out and the execution takes effect immediately. Therefore, compared with traditional contracts, smart contracts have economic and efficient advantages.

3. No need for third-party arbitration

Suppose Xiong Da and Xiong Er bet on whether it will rain tomorrow, and the party who loses needs to give the other 100 yuan. If the loser denies, the winner will not be rewarded. For this reason, it is inefficient and time-consuming to find a third-party arbitration institution. But if the bet is written on the smart contract, when the bet is reached, they will each put 100 yuan into the smart contract address, and the smart contract will be automatically executed according to the final result, and the winning party will take all the rewards. It can be seen that there is no need for third-party arbitration for smart contracts.

3. Are smart contracts really smart?

The above are all the advantages of smart contracts. Are smart contracts really smart and have no disadvantages? In fact, smart contracts also have their shortcomings.

As mentioned above, the immutable nature of smart contracts makes it easy to establish trust. But at the same time, there is a bad side . If there are loopholes in the smart contract, hackers can use the loopholes in the smart contract to make money for themselves.

To give a simple example, a vending machine originally sold for 5 yuan for a drink, but due to negligence, it was written as 5 cents. After the administrator found it, he could immediately correct it. But if this vending machine calls a smart contract on the blockchain, then this error cannot be corrected until the drinks in it are sold out.

On the other hand, the smart contract itself cannot obtain (perceive) external information . It involves the need for external information to arbitrate the contract, and it needs to write relevant information to it before it can make a ruling. For example, Xiong Da and Xiong Er bet whether it will rain tomorrow. The smart contract itself does not know whether it will rain the next day. It needs to provide information for it through other information sources, such as data from the Central Meteorological Observatory. After this information, smart The contract can make a ruling.

From the above two points, smart contracts are neither perfect nor smart.

Four. Summary

In summary, regarding smart contracts, we know:

Smart contract is a contract that uses computer language instead of legal language to record terms and is automatically executed by a program . Deployed on the block, it also has the characteristics of openness, transparency, non-tampering, and permanent operation of block chain data.

Compared with traditional contracts, smart contracts have the advantages of trustlessness, safety, efficiency, and no need for third-party arbitration. But smart contracts are not perfect, and they are not smart, or their smartness is very low.

The article mentioned that the execution of smart contracts does not require a third-party ruling. At the same time, it is mentioned that when the execution conditions involve external information, the smart contract cannot perceive it, and relevant information needs to be input to the smart contract to trigger the smart contract to execute the ruling. Do you think these two statements contradict each other? Welcome to the message area to share your views.

Author | Yan Wenchun

 

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/popular-science-the-key-in-defi-what-is-a-smart-contract/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Leave a Reply