Read the smart contract of the blockchain in one article

52CBDC
本文约2699字,阅读全文需要约11分钟
What is a smart contract? what's the effect?

first level title

No.1 What is a smart contract? What's the deal with blockchain?

Is a computer protocol designed to facilitate the negotiation or performance of a contract by informational communication, verification or enforcement. Smart contracts can execute reliable transactions without third parties. These transactions are trackable and irreversible. A smart contract contains all the information about the terms of the contract and automatically executes all conceived actions.

A basic smart contract model consists of four parts: contract participants, contract resource collection, automatic state machine, and contract transaction collection. Among them, the contract participants are the transaction parties; the contract resource collection is the assets, accounts, and digital assets owned by the participants; the automatic state machine is composed of state registers and combinational logic circuits, which can be carried out according to the preset state according to the control signal. State transition is the control center for coordinating relevant signal actions and completing specific operations; the contract transaction set is the content of the contract agreed by the participants, including responsibility obligations and reward and punishment mechanisms, and is the next action or behavior set of the smart contract, which controls the contract resources and respond accordingly to external information.

As early as 1995, Nick Szabo proposed the concept of smart contracts, but due to the lack of digital systems and technologies that can support programmable contracts, it has not been able to achieve applications and breakthroughs. Later, the blockchain, the underlying technology of Bitcoin, was born. Its characteristics of decentralization, non-tamperability and open source make smart contracts have the basic conditions to run. To put it simply, a smart contract is a pre-set and non-tamperable computer protocol, and a blockchain is equivalent to a computer program that can run this protocol. It works like an if-then statement in a computer program:

If, that is, if so, write the pre-agreed conditions between the transaction parties here, just like the rights and obligations that bind each other in the contract. It means that the parties to the transaction write their respective assets, contract terms and other pre-agreed content into the computer-executable code in digital form through an agreement, and the smart contract responds and stores the received information, which is quite In a temporary and credible safekeeping asset party.

first level title

No.2 What is the difference between smart contracts and traditional contracts?

Smart contract: Prevent the occurrence of breach of contract through prior agreement and high default cost (mortgage assets). Once the contract is breached, the program will be executed in accordance with the pre-agreement irreversible contract conditions, and the defaulting party will suffer asset losses. Smart contract technology can be widely used around the world, and the contract is automatically judged and executed by the computer, and the cost is lower.

first level title

No.3 What is the role of smart contracts?

①Increase the cost of breach of contract and reduce breach of contract: the corresponding operations of the smart contract are irreversible, so once the content of the contract agreed in advance, once one party fails to fulfill its commitment for some reason, the smart contract will immediately pass the prior agreement of the two parties. Compensation for assets, funds, resources, etc., while any form of compensation for the non-breaching party is mostly at the cost of the assets of the defaulting party. This cost is often very high, so it can effectively reduce malicious acts such as fraud or breach of contract and accidental future disputes and reduce reliance on trusted third-party intermediaries.

②Improve efficiency and reduce costs: Smart contracts are used as a pre-agreed transaction method, and the transaction conditions are set in advance. The trading parties do not need to worry about wrangling and renegotiation of conditions caused by various interest disputes in the traditional transaction process. Once the agreed conditions in the smart contract are triggered, the computer program will automatically execute the corresponding contract, which is uncontrollable by humans, which will help all parties to the agreement reduce transaction friction and improve transaction efficiency.

At the same time, through the set of transaction transactions set in advance by the smart contract, all transaction behaviors in the transaction process will correspond to the corresponding execution operations, thus effectively reducing the cost of monitoring, execution and settlement, and the arbitration and execution costs that may be caused by breach of contract, as well as the traditional Expensive upfront costs in the transaction process may be completely eliminated.

③Provide people with more fair opportunities: Inclusive finance is a goal that governments of all countries and major corporate giants are striving to achieve. How can smart contracts effectively promote the development of inclusive finance? First of all, we know that smart contracts will make the defaulting party pay a huge price, and then we also understand that banks and other financial institutions were unwilling to provide financial services to poor areas and poor people in the past, precisely because they were worried about the huge losses brought about by the poor’s low repayment ability. risk.

first level title

No.4 Current problems in smart contracts?

① Lack of legal recourse: From the above introduction to smart contracts, we know that once the conditions for smart contract execution are triggered, all operations are irreversible, that is, people cannot deviate from these rules after making the rules. So if a person enters into a smart contract agreement with a usury because of an urgent need for money, but the behavior of usury is illegal, and the usury regulations are originally the overlord clause, once the conditions are triggered, how will the result of personal injury to this person be defined? Which leads us to our first problem - lack of legal recourse. That is, when running hand in hand with the law to create a more orderly world, how can smart contracts and the law be effectively combined to achieve perfect compatibility?

② Lack of space reserved for human beings: the operation is also irreversible, so once smart contracts are widely used in various transactions, a society where all results will be highly deterministic will be formed, which is unprecedented in human history. Eliminating the risk of default brings greater efficiency, but because of the lack of room reserved for humans, it may generate more controversy and bring more chaos. For example, the code shows that the contract has been fully implemented and no breach of contract has occurred, but one party to the agreement is not satisfied with the result, how to deal with and define this problem.

③Security issues: As we said earlier, a smart contract is a computer protocol, and a blockchain is a computer program that can run this protocol. The data of the block chain is open to everyone, and anyone can query the block chain data and develop related applications through the open interface, so the entire system information is highly transparent.

Thus, all users on the blockchain can also see the blockchain-based smart contracts, but this makes all vulnerabilities, including security holes, visible and may not be fixed quickly. Then the exposure of security vulnerabilities becomes threatening to system security and asset loss that may be caused by malicious attacks. The solution to this problem needs to be further improved and matured by blockchain technology.

If you need to reprint, please indicate the URL of the original article

If you need to reprint, please indicate the URL of the original article(52cbdc.com)